6
$\begingroup$

How can I keep the objects from intersecting or passing through one another in rigid body simulations?

problematic rigid body simulation

I have

  • checked the normals
  • applied all transforms for scale, position and rotation
  • set Origin > origin to geometry
  • increasing the Steps per second and Solver Iterations in the Rigid Body World settings (I tried with the maxima 1000 and 100)
  • set collision shape to Mesh and tried 0.4 or 0 as margins and source to final

https://drive.google.com/open?id=1R3VSiNKWK5TWL3tfe1ZYt2A8fLL8QoW1

$\endgroup$
2
  • 3
    $\begingroup$ Blender uses Bullet, which is generally a pretty capable and widely used rigid body solver, but it appears blender's integration of its collision detection is a bit lacking. From my experiments at least, it doesn't look like blender does inside/outside checks, and it also appears not to have the option for continuous collision detection. if both of these were supported, I suspect the problems you are showing would go away. $\endgroup$
    – Sazerac
    Commented Apr 23, 2019 at 8:37
  • $\begingroup$ Related posts: 1, 2 $\endgroup$
    – Leander
    Commented Apr 23, 2019 at 8:45

1 Answer 1

7
$\begingroup$

Work smart, not ...

Okay, so you realized Blender bullet solver implementation is not as strong out of the box. Therefore we have to help it out a bit.

  • Reconstruct your geometry with simpler shapes. In your specific file, I could just create the crate out of 5 cubes (the walls and floor) which are then parented to the crate geometry.
    simple shapes
  • Use simple rigid body shape wherever possible. I made the walls into Box colliders and the sphere into Sphere colliders.

Now, you realized, that the Steps per Second and Solver Iterations don't ensure a more stable simulation, if we just increase them. Here comes a workaround: We'll make our subframes into actual frames by slowing down the simulation and the speeding it up afterwards.

  1. Scale the keyframes apart by 6. The box now moves 6 times as slow.
  2. Adjust the speed of the rigid body simulation. I entered 1.0/6.
    rigid body world settings
  3. Adjust the playback speed. The fps will be 24*6 and the render steps can be 6. (Obviously the scene's end will have to be adjusted as well.)
    scene settings
  4. Increase the Solver steps and Iterations as needed. I used [500, 500], as shown in the above image.

The resulting simulation is stable, although my computer can't playback a 144 fps.

stable sim

$\endgroup$
1
  • $\begingroup$ I am wondering if there will be an improvement in the future whiteout these tricks? $\endgroup$
    – diniulian
    Commented May 2, 2019 at 18:31

You must log in to answer this question.

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