Rigid Body Simulation
Rigid body simulation is one of my favorite topics. I've been reading about it for a long time now, and implemented various simulators over the years. This is not a closed project, but something that's likely to stay active for a long time. I ultimately would like to blend several already existing parts of my code into the same simulator. Those parts are, for example, rigid body simulation, cloth simulation and characters.
The image below shows my first rigid body attempt in ICE. Click on the picture to download the demo.
A more advanced version is available as a stand-alone test below (click the picture).
Later I re-implemented everything in Flexine. Here are some more recent snapshots capturing the results :
(Click on each picture to see larger versions)
At some point I tried some stress tests, such as the funnel one. Here's a version with a lot of simultaneous contacts :
And the same with spheres :
I recently implemented mesh-mesh contact generation in order to directly support arbitrary meshes in my simulator. Below are the very first snapshots ! In all of them, I waited until the meshes came to rest. So far it seems quite stable, with no visible jittering (I disabled the option that removes meshes from the simulation when they almost don't move anymore, just to be sure :)
- The very first test involving a knot and a bunny. You might be able to spot little yellow vectors, representing contact forces.
- Stacked meshes! They're all handled as meshes, even spheres. Here's the same shot in wireframe.
- A bunny, a bowl, and a weird star-shaped object. The two last ones come from a Havok scene.
- You didn't see the star-shaped object ? It was underneath....
- The cow-knot test. Here you can see that current version generates way too many contacts ! Here you can see a bug that happens from time to time : it that particular scenario objects get stuck together because of applied forces..
- An improved version with better contacts. A bit slow, so far.
- Interlocked tori...
- Tori again and again and again and again and again !
- A bunch of dead bunnies.
- Great earring or what ?
Here's a little demo to test various scenes.
Here's another little demo to test cube-vs-mesh contacts. It might also replay previous scenes better or faster.
This simple page is quite insufficient to capture all I'd like to write about this topic...