Obi Official Forum
Help Rope has too much slack - 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 Rope has too much slack (/thread-3056.html)



Rope has too much slack - greenisfun100 - 11-08-2021

I have been making a VR bridge construction game and have been using the Obi Rope package to do cables for my bridges. An ongoing problem I have had is that there always seems to be a little slack in the cables when I run the simulation. 

Here is a video for context.

https://drive.google.com/file/d/18ymaVwbl1QUmfucS62jYwUIAkCwwXlTk/view?usp=sharing

You can see the road of the bridge turns red meaning it is holding a great deal of its own weight rather than the cables.

My goal is to have the cables be stiff when bearing weight and not let the rest of the bridge sag.

Here is an example from a game that I have taken a lot of inspiration from.

https://drive.google.com/file/d/12PGBjVrj1HTTTfqt39bZMCDhQG5rRciH/view?usp=sharing

 I have tried several things such as manipulating the blueprints resolution, the number of solver steps on the obi solver (to the point of very low fps) and incorporating a slight reduction in the stretching compliance. The last one was the most successful but not quite what I want. Is there a better way to reduce or get rid of the slack in the cables? Thanks.


RE: Rope has too much slack - josemendez - 12-08-2021

Hi there,

Both videos you linked to are private, so I need permission to be able to see them.

(11-08-2021, 05:54 PM)greenisfun100 Wrote: My goal is to have the cables be stiff when bearing weight and not let the rest of the bridge sag.

Rope should be pretty stiff with the default parameters. This being said, the usual mass ratio limitations existing in all iterative solvers  (which account for pretty much 100% of all realtime physics engines) also apply to Obi: very heavy objects attached to very light ropes will cause the rope to have spurious elasticity. As a rule of thumb, the mass ratio between objects must not exceed 1:10.

(11-08-2021, 05:54 PM)greenisfun100 Wrote:  I have tried several things such as manipulating the blueprints resolution, the number of solver steps on the obi solver (to the point of very low fps)

A resolution of 0.5 should be enough for most ropes, and the default amount of substeps (4) should be enough too unless you're dealing with very long ropes and/or very large mass ratios. You could go a bit higher on substeps, but never needed more than 8 in any use case I've ever encountered. That's not enough to cause any performance issues.

(11-08-2021, 05:54 PM)greenisfun100 Wrote: and incorporating a slight reduction in the stretching compliance(*). The last one was the most successful but not quite what I want.

(*)This sounds way off. Compliance should be set to zero (its default value) unless you want stretchy ropes, since it's the inverse of stiffness. Any non-zero compliance value will result in elastic ropes, the higher your compliance value, the more slack your rope will have. More compliance = less stiffness.

This might be a shot in the dark, but make sure your solver's constraint relaxation parameters are all set to at least 1. (see: http://obi.virtualmethodstudio.com/manual/6.2/obisolver.html) In the past I've seen cases where the relaxation parameters where set to the minimum value (0.1, which results in constraints only being applied to 10% of their full strength) yielding very elastic ropes regardless of all other parameters.


RE: Rope has too much slack - greenisfun100 - 12-08-2021

I'm sorry about the videos not being available. I got the notification of you accessing them at about 3:00 am so I wasn't awake. Those should be available to you now.

Also I misspoke when I mentioned I reduced the stretching compliance. I had reduced the stretching scale so that the ropes would pull back a bit more. The stretching compliance is being left at 0.

I incorporated the changes you suggested with resolution and solver steps but I'm still getting the same behavior. I believe the mass ratio might be the problem. Do you suggest increasing the mass of the rope. In that case, how do you do that? Or do you suggest I reduce the weight of the other elements.

Something I also just realized is I only have obi colliders/rigidbodies on the cable connection points but not on any of the other components of the bridge. Could this be a problem? Such as the parts without the correct components don't receive the correct forces? Thanks.


RE: Rope has too much slack - josemendez - 13-08-2021

(12-08-2021, 03:06 PM)greenisfun100 Wrote: I incorporated the changes you suggested with resolution and solver steps but I'm still getting the same behavior. I believe the mass ratio might be the problem. Do you suggest increasing the mass of the rope. In that case, how do you do that?

You can increase the mass on a per-control point basis using the path editor (just like you can change rope thickness, color, etc). See:
http://obi.virtualmethodstudio.com/manual/6.2/ropesetup.html

(12-08-2021, 03:06 PM)greenisfun100 Wrote: Something I also just realized is I only have obi colliders/rigidbodies on the cable connection points but not on any of the other components of the bridge. Could this be a problem? Such as the parts without the correct components don't receive the correct forces? Thanks.

Unity works by redirecting any impulses/forces received by a collider to the first rigidbody found up their hierarchy. This works this way regardless of using Obi or not. So your platforms must have a rigidbody component (Obi will automatically add a ObiRigidbody component too). Then if you attach cables to the cable connection points (which I assume are children of the bridge platforms), impulses generated by the cables will be applied to the platform itself.


RE: Rope has too much slack - greenisfun100 - 13-08-2021

I tried several different values for the control point masses but it tended to cause more problems when I increased it so I returned it back to what I had it at. 

I think I can live with the current behavior so I will leave it as it is but thank you for your help.