19
$\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$
0

5 Answers 5

13
$\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$
2
  • 5
    $\begingroup$ Example file's link is broken! $\endgroup$
    – Developer
    Commented Jan 3, 2014 at 1:56
  • 1
    $\begingroup$ dead link. need new example. $\endgroup$ Commented Oct 25, 2014 at 15:44
8
$\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$
1
  • $\begingroup$ "re-centre origin to geometry" work in my case, Thank you! $\endgroup$
    – Yang
    Commented Feb 20, 2020 at 4:43
8
$\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$
7
$\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$
4
$\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$
3
  • 5
    $\begingroup$ Convex hull will not allow objects to fall through a torus. Mesh should be used. $\endgroup$
    – Aldrik
    Commented Jul 14, 2013 at 16:38
  • 3
    $\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
    Commented Jul 14, 2013 at 19:10
  • $\begingroup$ Torus cannot be split into finite convex hull objects because its parts will always have concave segments. It's possible to approximate collisions with splitted parts as convex hull but even this requires lots of manual setup. $\endgroup$ Commented May 1, 2021 at 9:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .