Rigid body simulation for 3D character animation

Martin Kleppmann

Implementation notes for falling boxes

Each of the ten boxes is modelled as a symmetric hollow body. All boxes and the table are specified as meshes in an XML input file. The table is held in place by three 'nail' constraints. These simulations exhibit a range of different collision types: each example starts with a vertex/face collision when the first box hits the table, and is followed by a sequence of vertex/face, edge/edge and compound collisions. Whenever a collision cannot be clearly classified as either vertex/face or edge/edge, the algorithm searches for a plane which contains as closely as possible the line of intersection between the two colliding meshes. This plane is then used as the contact plane for computing the impulses and resting contact forces.

The fully elastic version of this simulation looks unrealistic because it behaves as though the boxes were made of extremely bouncy rubber. The version with elasticity 0.2 is much closer to what one might expect in a real-life scene, but the contrast between the two is interesting. At the end of the low-elasticity simulation, several boxes can be seen in a frictionless glide over the surface of the table. They cannot penetrate the table due to a resting contact force.

[Home | www.kleppmann.de]