Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Rope around collider
#9
(01-02-2023, 11:13 AM)josemendez Wrote: Mass/weight doesn't work like this, and is not at all the reason why the rope is stretching.

By itself, mass doesn't affect at all the dynamics of an object: have two objects of the same mass collide with each other, and the results will be identical regardless of them being both 10, 100, or 1000 kg. The important part is their mass ratio: how much mass one of them has compared to the other.

Same in a rope: reducing the weight of all particles won't make the rope stretch lessĀ  (and increasing mass doesn't make it stretch more) since the mass distribution is still exactly the same across all particles. If only some particles in the rope have higher mass than the rest, these will "pull" the rest of the rope around which can be useful in some situations.

Also note mass doesn't affect gravity at all: gravity is an acceleration (not a force), so all objects fall at the same speed regardless of their mass. No matter how heavy your rope is or how many particles are in it, gravity will always make it fall at the same speed.

The stretching you're experiencing is a basic consequence of how physics engines work: the more constraints an engine needs to simulate (in a rope, constraints are the "links" holding particles together), the slower convergence becomes. This is because corrections on a body (particle) need to "propagate" to neighboring bodies trough constraints over multiple iterations: the more constraints you have, the longer it takes for corrections to propagate to all particles in the rope because they have to traverse a path with more steps in it.

In some engines (like Unity's built-in engine), this low convergence speed manifests as instabilities: jittering, dancing objects, explosions, etc, because object velocities can't be corrected fast enough. In others like Obi, it manifests as spurious elasticity: things become stretchy/soft, because positional corrections can't be propagated across all particles given the current simulation budget. This is why you can't have arbitrarily long ropes at fixed cost: at some point you have to limit their length, or spend more resources simulating them, or reduce their resolution (less particles->less constraints).

There's two ways to fix this: increase the amount of distance constraint iterations in your ObiSolver (to spend more time propagating constraint corrections, which will allow these to reach further along the rope) or increase the amount of substeps in your ObiFixedUpdater to reduce the amount of correction required in the first place.

The manual contains a very in-depth explanation of what iterations/substeps are and how they affect simulation quality: http://obi.virtualmethodstudio.com/manua...gence.html

kind regards,

I reduced obiSolver gravity to -5 (half) and it looks better- at least I don't crash rope after this manipulation this easily... Also tryed your solution of constraint- doubled them or made relaxation to 2, but there were some unwanted behaviours- can't recall them now,,,
Reply


Messages In This Thread
Rope around collider - by alex798 - 30-01-2023, 05:30 PM
RE: Rope around collider - by josemendez - 31-01-2023, 11:47 AM
RE: Rope around collider - by alex798 - 31-01-2023, 02:55 PM
RE: Rope around collider - by josemendez - 31-01-2023, 03:19 PM
RE: Rope around collider - by alex798 - 31-01-2023, 04:20 PM
RE: Rope around collider - by josemendez - 31-01-2023, 09:38 PM
RE: Rope around collider - by alex798 - 01-02-2023, 10:51 AM
RE: Rope around collider - by josemendez - 01-02-2023, 11:13 AM
RE: Rope around collider - by alex798 - 01-02-2023, 11:45 AM
RE: Rope around collider - by josemendez - 01-02-2023, 11:51 AM
RE: Rope around collider - by alex798 - 02-02-2023, 10:38 AM
RE: Rope around collider - by josemendez - 02-02-2023, 11:03 AM
RE: Rope around collider - by alex798 - 02-02-2023, 11:26 AM
RE: Rope around collider - by josemendez - 02-02-2023, 01:42 PM
RE: Rope around collider - by alex798 - 02-02-2023, 02:28 PM