This page contains information about the physics engine I'm writing. It's based on the paper "Non-convex rigid bodies with stacking" by Eran Guendelman, Robert Bridson and Ronald Fedkiw. You can find the paper here. Also see my other page here, as it contains source code to an earlier demo that is based on the same ideas.

It also supports the accumulated impulses scheme described by Erin Catto here in the downloads area. Penetration is handled by splitting the impulse, with the penetration-correction part not adding to the momentum.

Scroll down to the bottom of this page for some notes on the implementation. They actually refer to the versions prior to 0.61 - hopefully I'll get a chance to update the notes at some point.

You can download my test executable that uses the library here (9 Nov 2007). Extract everything before running it. It includes the source code for the complete engine licensed under the zlib license.

All screenshots below came from a slightly older version of the demo running at interactive frame rates (on my 2GHz Athlon machine). The current version looks prettier!

You can see a movie of it (version 0.70) running a wall/pyramid (128 boxes along the base) here. This was running rather slow on my machine, but I think it's rather elegant how the wall collapses!

The initial setup - all objects start active (except the ragdolls) then naturally asleep after a second or so. The box stack (behind the "jenga" stack) is 50 blocks high. There are two chains (box and sphere) in the background.

Here are some notes on the implementation that might be useful if you want to try writing something similar:

Back home