Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Rope is still too stretchy
#1
Pregunta 
I am working on my crane simulator and I have 2 (related?) issues.

1. The rope I am using is still too stretchy. I want to simulate a stiff metal cable which should never stretch in length. On instantiation, or whenever i move the boom, the rope bounces the hook around like it is on a rubber band.

and 

2. When I adjust the angle of the boom, the rope and attached hook do not hang down properly. See attached screen shots. For the first screen shot, the solver was a child of the boom so I figured that what was causing the problem (the rope jutted out at the converse angle of rotation). So I moved the solver outside of the boom game object's hierarchy and attached the rope to a point on the boom (instead of to itself). That helped a little but as you can see in the second screen shot the rope is still behaving strangely. It is not straight and the hook game object isn't directly below the attachment point as it would be if gravity pulled on it

I think the second issue was because I had set the Sleep parameter for the solver too high (I was trying to make the rope less stretchy to solve issue 1) If I decrease the sleep threshold the rope does hang properly but moving the crane makes the hook flail around spastically.

How can i get a stiff rope that still hangs directly down without stretching?
Reply
#2
Hi!

(30-12-2021, 06:20 PM)rsauchuck Wrote: I am working on my crane simulator and I have 2 (related?) issues.

1. The rope I am using is still too stretchy. I want to simulate a stiff metal cable which should never stretch in length. On instantiation, or whenever i move the boom, the rope bounces the hook around like it is on a rubber band.

Just use more substeps for your updater component. Note that *zero* compliance is impossible to achieve in any realtime
iterative physics engine though. You can get arbitrarily close to zero by using more substeps/iterations. The manual contains an in-depth explanation on compliance (aka, elasticity) and substeps/iterations:

http://obi.virtualmethodstudio.com/manua...gence.html

Also keep in mind that large mass ratios will slow convergence down (again, just like in any engine).


(30-12-2021, 06:20 PM)rsauchuck Wrote: 2. When I adjust the angle of the boom, the rope and attached hook do not hang down properly. See attached screen shots. For the first screen shot, the solver was a child of the boom so I figured that what was causing the problem (the rope jutted out at the converse angle of rotation). So I moved the solver outside of the boom game object's hierarchy and attached the rope to a point on the boom (instead of to itself). That helped a little but as you can see in the second screen shot the rope is still behaving strangely. It is not straight and the hook game object isn't directly below the attachment point as it would be if gravity pulled on it

I think the second issue was because I had set the Sleep parameter for the solver too high (I was trying to make the rope less stretchy to solve issue 1) If I decrease the sleep threshold the rope does hang properly but moving the crane makes the hook flail around spastically.

How can i get a stiff rope that still hangs directly down without stretching?

Make sure you’re not rotating the solver when rotating the boom. Simulation takes place in solver space, so rotating the solver will rotate any actors on it and any external forces/accelerations such as gravity.

Kind regards,
Reply
#3
(30-12-2021, 07:16 PM)josemendez Wrote: Just use more substeps for your updater component. Note that *zero* compliance is impossible to achieve in any realtime
iterative physics engine though. You can get arbitrarily close to zero by using more substeps/iterations. 
...
...
Make sure you’re not rotating the solver when rotating the boom. Simulation takes place in solver space, so rotating the solver will rotate any actors on it and any external forces/accelerations such as gravity.
If I increase the substeps beyond 8 or so the hook begins to flicker and jump spastically on any movement of the crane/boom. Obi colliders are set to "nothing" so i dont think that is teh cause

The mass of the rigidbody is 10. I have tried multiple values.

I did move the solver out of the hierarchy of the boom but I had already done that when i took the second screen shot.

If I can figure out how to change the anchor positions of a character joint I may have to use that method instead and just use the obi ropes as decorative elements that don't actually "lift" the hook object, physically. However I really don't want to have to do that if i can avoid it.
Reply
#4
Hi!

(30-12-2021, 11:53 PM)rsauchuck Wrote: If I increase the substeps beyond 8 or so the hook begins to flicker and jump spastically on any movement of the crane/boom. Obi colliders are set to "nothing" so i dont think that is teh cause

More substeps result in increased simulation precision, so if anything flicker/jitter should be reduced. What you describe here is not to be expected at all. Could you share a video of this, or even better send a scene to support(at)virtualmethodstudio.com so that I can take a look? Thanks!

Quote:The mass of the rigidbody is 10. I have tried multiple values.

The rigidbody mass doesn’t mean much by itself. The important value is the mass ratio between the rope and the rigidbody hanging from it. For instance, if each of your rope control points have a mass of 1 and the weight mass is 10, the ratio would be 1:10 which is fine.

Quote:I did move the solver out of the hierarchy of the boom but I had already done that when i took the second screen shot.

Can’t see any screenshots/links in your post...
Reply