The design and implementation of an Open Source animation tool.

July 15, 2007

Inverse Kinematics

Observant readers will notice that establishing parent/child relationships between pegs essentially gives us forward kinematics, as transformations applied to ancestors propagate down the chain to affect their children. A slight extension of the scheme also gives us inverse kinematics: we can introduce an additional manipulation mode which treats the links between the child being manipulated and its ancestors as rigid, propagating the effects of the child's motion back up the chain to influence its ancestors.

In this mode, the ancestors of the manipulated peg must accommodate the motion of the child through rotation (and, for the last ancestor in the chain, translation) in order to preserve the existing distances between parent and child. How far up the hierarchy the IK chain extends goes should be controllable, perhaps via the mouse wheel, and the affected parent/child links highlighted.

There is no special representation for IK data in the scene model; the motions of the pegs are simply recorded as if they had been directly manipulated. Animations recorded in this way do not require an IK solver to play back, which eliminates problems with unstable solutions: what you recorded is what you get at playback time, because the motions are baked in.

No comments: