Obi Official Forum
Help Pulling Rigidbodies with bigger mass - 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 Pulling Rigidbodies with bigger mass (/thread-2747.html)



Pulling Rigidbodies with bigger mass - Eddy13 - 11-02-2021

Hello, 

I recently updated an old project and I see that there are some changes to the asset, and I can not recreate the old obi rope behavior that I had before. Unfortunately I could not find a solution in documentation, sorry if I missed it. Basically what I need is to use the rope to pull heavier objects. Kind of similar to crane example, but lets say if I need to pull Rigid body that has a mass of say 2000-4000. Right now if I try to pull a heavy Rigid body by changing rope length, the rope does not generate any pull. In the older Obi version I was able to set it up, but I don't remember exactly what I did, or did Obi rope had a much different behavior out of the box?


RE: Pulling Rigidbodies with bigger mass - josemendez - 11-02-2021

(11-02-2021, 02:15 PM)Eddy13 Wrote: Hello, 

I recently updated an old project and I see that there are some changes to the asset, and I can not recreate the old obi rope behavior that I had before. Unfortunately I could not find a solution in documentation, sorry if I missed it. Basically what I need is to use the rope to pull heavier objects. Kind of similar to crane example, but lets say if I need to pull Rigid body that has a mass of say 2000-4000. Right now if I try to pull a heavy Rigid body by changing rope length, the rope does not generate any pull. In the older Obi version I was able to set it up, but I don't remember exactly what I did, or did Obi rope had a much different behavior out of the box?

Obi's core solver has changed very little over time, so this can be due to one (or a combination) of 3 things:

1- You're using a static attachment, instead of a dynamic one.
2- Your rope has very small mass compared to the rigidbody.
3- You're using very few substeps/iterations.

1- Static attachments simply teleport the rope to whatever it's attached to. No physics of any kind involved. Dynamic attachments on the other hand, interchange forces between the rope and the object it is attached to, resulting in two-way coupling. You want to use dynamic attachments. See: http://obi.virtualmethodstudio.com/tutorials/attachments.html

2- All iterative solvers have trouble with very large or very small mass ratios. In some solvers such as Unity's own physics engine this trouble means jittering, explosions, and all sort of weird behavior. In Obi's case, this "trouble" manifests itself as stretching. If you try to pull a 4000 kg rigidbody with a 1 kg rope, the mass ratio (4000:1) will cause the rope to stretch a lot.

Increasing the rope mass (per control point, in the rope's path editor: http://obi.virtualmethodstudio.com/tutorials/ropesetup.html) so that the ratio is smaller will improve this.

3- Substeps and iterations determine the budget allowed for the physics simulation. Many substeps/iterations will yield more accurate simulations, at the cost of performance. You might want to use anywhere between 3-10 substeps for a rope that can reach close to zero stretch. For an in-depth explanation of this, see:
http://obi.virtualmethodstudio.com/tutorials/convergence.html

let me know if I can be of further help. cheers!


RE: Pulling Rigidbodies with bigger mass - Eddy13 - 11-02-2021

Thank you for the quick response. I had my attachments set to static. Now that I set them dynamic the rope does interact with my Rigid bodies, but I have a hard time getting a stable connection. No matter what mass/sub step settings I use I get an unstable connection between 2 objects. Its not a stretching problem anymore, but one of the connected rigid bodies will either start rotating around upon connecting them with a rope, or the connection will seem stable, but then at some point one of the rigid bodies will be suddenly flung into the air... This happens when the rope is relaxed or slightly stretched with not too much forces acting on it...


RE: Pulling Rigidbodies with bigger mass - josemendez - 11-02-2021

(11-02-2021, 08:51 PM)Eddy13 Wrote: Thank you for the quick response. I had my attachments set to static. Now that I set them dynamic the rope does interact with my Rigid bodies, but I have a hard time getting a stable connection. No matter what mass/sub step settings I use I get an unstable connection between 2 objects. Its not a stretching problem anymore, but one of the connected rigid bodies will either start rotating around upon connecting them with a rope, or the connection will seem stable, but then at some point one of the rigid bodies will be suddenly flung into the air... This happens when the rope is relaxed or slightly stretched with not too much forces acting on it...

Make sure the rope is not attached inside of or intersecting with the rigidbody, if it’s set to collide with it. The rope can’t be simultaneously inside and outside of the collider, so this will result in an unstable simulation. This situation along with its solution is described in the manual, see the last bit of: http://obi.virtualmethodstudio.com/tutorials/pinconstraints.html

Also if you’re using substepping and Obi < 6.0, make sure to enable “substep Unity physics” in the updater component.