18-12-2023, 11:24 AM
(This post was last modified: 18-12-2023, 11:25 AM by josemendez.)
(18-12-2023, 10:32 AM)Christoffer Wrote: Hi!
Still working on a proper spooling-simulation - adding rope onto a spool.
In order to lock a particle i set its invMass to zero, store the particles offset from the spool and rotate the offset each update. The locked particle moves around the spool as intended.
However, each time a particle is locked, the "next" particle in line to be locked will jump slightly as if the previously locked particle straightens out the "bone" (see pictures below).
I am unable to determine if it is due to me setting the position slightly off, or if there is something happening behind the scenes between the locked particle and the next one.
When a particle is locked, the particle in question does not seem to move at all, which makes me believe that this is physics-related.
Is there any way to get around this?
Locking a particle in place will just prevent the simulation from updating its position. Bend constraints work by straightening out groups of 3 particles - projecting them onto a line, so if one of the particles in the group is impossible to move due to being locked then the other 2 will move more to compensate and get all 3 to sit straight.
In a real-world situation this would also happen: imagine pinching a flexible tube in place between two fingers, as you slide the fingers along the cable the section that's free would straighten out and bend less, up to the point where the cable is completely straight. In a discretized rope this is more noticeable as you can't smoothly "slide" the locked position along the rope, you lock/unlock specific points instead.
(18-12-2023, 10:32 AM)Christoffer Wrote: Might this be caused by the orientation of the particle? I am not the greatest at physics, but i might get it to work properly with some additional pointers
Ropes do not use particle orientation at all, only rods do. See:
http://obi.virtualmethodstudio.com/manua...setup.html
(18-12-2023, 10:32 AM)Christoffer Wrote: Also, is there any way to prevent the rope from making a twitch/skip when adding a new particle? Or at least to smooth it out a bit? Im having to start the simulation quite far from the actual spool to not get twitches from particles spawning.
This happens because adding a new particle increases the mass of the entire rope suddenly and changes its discretization, this leads to a sudden "jump" in dynamics as the rope adjusts to its new mass. This is similar to the locking issue. Ideally ropes should be continuous, but in a computer everything needs to be discretized so unfortunately there's no way around this.
kind regards,