13
$\begingroup$

Using the Mesh option in Properties > Physics > Rigid Body > Rigid Body collisions as the collision shape often makes the simulation unstable (objects jittering, falling through other objects, flying out of the scene, etc.)
This still can happen even after cranking up the Step Per Second value in Properties > Rigid Body World.

What are some methods for getting stable simulations while colliding objects with holes in them that other objects need to fall through? (for example a torus)


The tips below are great, but I noticed that problems still tend to occur with collisions between to objects with Mesh collision shapes.

Are there any other solutions for getting decent collisions with two mesh shapes?

$\endgroup$
8
$\begingroup$

Jittering objects are normally caused by the collision margin. See the documentation:

Collision Margin

The collision margin is used to improve performance and stability of rigid bodies. Depending on the shape, it behaves differently, some shapes embed it, while others have a visible gap around them:

The margin is embedded for these shapes:

  • Sphere
  • Box
  • Capsule
  • Cylinder
  • Convex Hull: Only allows for uniform scale when embedded.

The margin is not embedded for these shapes:

  • Cone
  • Active Triangle Mesh
  • Passive Triangle Mesh: Can be set to 0 most of the time.

And:

Simulation Stability

The simplest way of improving simulation stability is to increase the steps per second. However, care has to be taken since making too many steps can cause problems and make the simulation even less stable (if you need more than 1000 steps, you should look at other ways to improve stability).

Increasing the number of solver iterations helps making constraints stronger and also improves the object's stacking stability.

It's best to avoid small objects, as they're currently unstable. Ideally, objects should be at least 20 cm in diameter. If it's still necessary, setting the collision margin to 0, while generally not recommended, can help making small object behave more naturally.

Here's a quick example scene for you to inspect.

$\endgroup$
  • 3
    $\begingroup$ Example file's link is broken! $\endgroup$ – Developer Jan 3 '14 at 1:56
  • 1
    $\begingroup$ dead link. need new example. $\endgroup$ – cantdutchthis Oct 25 '14 at 15:44
4
$\begingroup$

A few more notes:

  • Avoid object interaction of vastly different mass. (0.1U obj colliding with 100U object)
  • Avoid extreme dimensions (e.g. really long beam)
  • Prefer primitive shapes over convex hull.
  • Adjust stepping as already described.
  • Apply scale and re-centre origin? Not sure placebo or not, but it's has become a habit.

These apply in the game engine as well.

$\endgroup$
3
$\begingroup$

Try to split the torus in more parts and use convex hull/other method. A lot of "easy" to calculate parts often better than one "difficult" part.

$\endgroup$
  • 4
    $\begingroup$ Convex hull will not allow objects to fall through a torus. Mesh should be used. $\endgroup$ – Aldrik Jul 14 '13 at 16:38
  • 1
    $\begingroup$ @Aldrik I think they mean splitting it into separate (convex hull) objects and using constraints to hold them together. I haven't tested this yet, but it could work. $\endgroup$ – gandalf3 Jul 14 '13 at 19:10
2
$\begingroup$

In addition to the above I have found that triangulating the mesh helps if you're using quads. You can use the Triangulate Modifier or Ctrl+T in Edit Mode.

$\endgroup$
2
$\begingroup$

Using Mesh Collision shapes I found it extremely helpful to use triangulated surface mesh. poly and quads are very unstable, and cause objects to pass through each others. Increasing the iteration steps caused more realistic results but did not help with the collision problem.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.