Help Non-stretched rope with extendable length - Printable Version +- Obi Official Forum (https://obi.virtualmethodstudio.com/forum) +-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html) +--- Forum: Obi Rope (https://obi.virtualmethodstudio.com/forum/forum-4.html) +--- Thread: Help Non-stretched rope with extendable length (/thread-709.html) |
Non-stretched rope with extendable length - Evgenius - 09-10-2018 Hello! I'm creating a crane and I need to pull big weights with the hook attached to two ropes. But the more weight I attach, the more stretchy become the ropes. Tethers are not a choice since I need to reel and extend the ropes. I've tried to increase distance constrain iterations, but it cost much of performance and doesn't work for all weights. Does anybody have a solution or any ideas? RE: Non-stretched rope with extendable length - josemendez - 09-10-2018 (09-10-2018, 08:18 AM)Evgenius Wrote: Hello! This is a fundamental issue of all iterative physic engines, which account for nearly 100% of realtime physics: the more you increase the mass ratio between two objects, the slower convergence becomes (and so, chains of constraints become stretchy). In most games this is avoided by one or a combination of: - Reducing the fixed timestep (Unity's default is 0.02, try 0.01 or 0.005). See: https://docs.unity3d.com/Manual/class-TimeManager.html - Reducing the rope resolution so that there are less particles in the rope, so convergence speed is not that much of a problem anymore. - Clamping the mass ratio between the rope and the weight attached to it (the usual maximum ratio is 1/10). - Attach the weight directly to the top of the crane by using a spring joint, and update the spring length so that it matches the rope's lenght. This way, the weight is supported by a single joint instead of a chain of distance constraints. This is similar to the concept behind tether constraints. In extreme cases where none of these are acceptable, ditch iterative physics entirely and switch to a specialized direct solver. I've yet to see one of these in a game due to their bad (for game standards) performance, relatively common in engineering/industrial scenarios though. RE: Non-stretched rope with extendable length - Evgenius - 25-10-2018 (09-10-2018, 08:44 AM)josemendez Wrote: This is a fundamental issue of all iterative physic engines, which account for nearly 100% of realtime physics: the more you increase the mass ratio between two objects, the slower convergence becomes (and so, chains of constraints become stretchy). How do I clamp the mass of the rope? Or should I change mass of the each particle? How to change mass of the pooled particles? For example, I've changed mass of every particle from 0.1 to 5, except the first one, it's fixed. But when I extend the rope, new particles come with the old mass 0.1. |