Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  What is the best solution for big ratio between rope and attached objects
#2
Hi!

Keeping in mind that large mass ratios are the bane of iterative solvers, and that both Obi and Unity's engine (PhysX) are iterative, you should simply either: a) avoid large mass ratios b) use a physics engine w/ direct solver for this. (Agx Dynamics comes to mind). Depending on your needs, using a reduced coordinates solver (articulations, in recent Unity versions) might also help.

If you're forced to use an iterative solution:

Quote:I set distance constraint iteration to 30, set substep to 8.

Use 30 substeps and 1 iteration. Both cheaper and better quality. Iterations should always be used to adjust constraint "effort" relative to other constraints, but since substeps are much more effective that iterations at improving convergence you should really try to increase substeps first, then adjust iterations if you want to spend some more time on specific types of constraint.

Quote:Can I do something more to make rope less elastic with this kind of attached objects mass with way bigger ratio than 10:1.

Increasing the amount of substeps is the only viable approach. Iterative solvers just aren't designed to deal with such huge mass ratios, pretty much all games use iterative solvers, so masses are clamped to not exceed a maximum ratio. It's like using a hammer to place screws, wrong tool for the task.

Quote:Can I find what force applies rope to the attached objects. Because of unrealistic heavy rope(150 tons), when I connect rope to the small boat, the rope itself start pulling small boat in his direction. If I can find what is the force of the rope, maybe can put opposite force to the small boat to balance this force and prevent small boat from moving.

You can, all constraints have a lambda array that stores positional lagrange multipliers for each constraint. To convert a lagrange multiplier to a force magnitude, divide by timestep squared:

Code:
force = batch.lambas[constraintIndex] / (deltaTime * deltaTime);

To access constraint data at runtime, see:
http://obi.virtualmethodstudio.com/manua...aints.html

However this won't work the way you think: F = ma, so adding an opposite force to "counteract" the force exerted by the rope will yield the exact same result as reducing the rope's mass or increasing the object's mass.
Reply


Messages In This Thread
RE: What is the best solution for big ratio between rope and attached objects - by josemendez - 24-08-2021, 04:23 PM