Rigid body simulation for 3D character animation

Martin Kleppmann

Implementation notes for pendulum systems

The double, triple and eight-part pendulums are set up in a very similar way. Each segment is modelled as a rigid cylinder with constant density. The top end of the top segment is held in place by a 'nail' constraint. Each pair of adjacent segments is connected by a ball-and-socket joint. Initially, all segments are at rest, the first segment is rotated by 45 degrees anticlockwise from the equilibrium position, and all other segments hang straight down.

The simulation does not employ an XML input file; instead, the objects representing the bodies and the constraints are directly created by the Java test case. The simulation results were exported to Blender and rendered using the internal renderer and orthographic projection.

While pendulums are simple examples of articulated bodies, the rope simulation is an attempt at a more ambitious system. It is modelled as a cylindrical mesh bound to a chain of 25 bones. The ground is a separate mesh, and in the simulation its position is fixed by three 'nail' constraints. This input data is represented as an XML file. Collision detection is performed on basis of the meshes, thus the rope can collide both with itself and with the ground.

The joints between adjacent segments of the rope are of ball-and-socket type, and their rotation is limited to a maximum of 15 degrees about each axis. The simulated rope is therefore very stiff. I am not entirely sure how realistic I should consider this simulation; its behaviour looks strange at first, but this is mainly due to the assumptions put into the model. I believe that the simulation correctly obeys the model, although the model would have to be refined in order to produce genuinely realistic-looking rope.

[Home | www.kleppmann.de]