Character skeleton definitions

The skeleton of a character is typically defined as a hierarchy of segments. Each segment has a parent segment (except for segments known as "roots") and possibly one or more children segments. The motion of a child segment depends on the motion of its parent segment, the transformation data of the child relative to its parent is known as the local transform. The global transform of the child is the motion of the child relative to the global coordinate system. The motion for a segment consists of translation, rotation and scale values. A local transformation matrix for a segment is created by first constructing a separate matrix for the translation, rotation and scale values. These matrices are then composted to give you the full child transformation. For example:

M = SRT

It's possible to vary the composition order of the component matrices but that is almost never done with motion capture data. By always using the SRT composition order it makes it possible to construct the composite transform by first creating the rotation matrix (which fills the upper left 3x3 of the matrix). Then poking the translation values into bottom portion of the matrix (in positions [3][0], [3][1] and [3][2] of the matrix), and then multiplying the top three rows of the matrix by the scale values (top row is scaled by X, second by Y and the third row by Z).

The global position of segment is determined by composing the child transform with its parent's transform, its parent's parent's transform, and so on. Like so:

Mglobal = Mlocal Mparent Mgrandparent

Conversely, if you know the global transform of an object and you know the parent's global transform you can construct the local transform by using the inverse of the parent's global matrix::

Mlocal = Mglobal [Mparent]-1

This is not something you'll do when importing a motion capture file but it's a calculation you will need when exporting motion capture data.

In addition to the transformation information for a segment there is often information about how the segment is to be displayed or drawn. This usually takes the form of a segment axis (or direction) and a length value. Nearly always this information will coincide with the translation offset information of a child of that segment. For example, the axis of the forearm segment will go from the elbow (the 0,0,0 point of the forearm segment) to the wrist (for this example let's say that is at location 0,10,0 relative to the elbow). So in this case the axis of the forearm will be the positive Y axis and he length of the forearm is 10. In any case, the information is often redundant but it's important to keep it separate because there are places where you would want to draw the segment differently than how the actual transformation information is composed. This will become clear after contrasting some of the different file formats. It's also important to note that some formats use scale information to convey length, it's usually a bad idea to do it this way but it does happen so be aware of it.

When a skeleton is defined it is specified as a set of parent-child relationships with the translation offset of each child from its parent being known. The translation offset of a child from its parent almost never changes, however some of the more flexible formats provide for those cases when you do want the translation data to change (usually only slightly). This initial skeleton definition doesn't have any rotation data (that is, the rotation data values are zero) and is often referred to as the "zero pose" or the "basis pose" of the skeleton. The zero pose can be of any configuration you want, some prefer to use the "Da Vinci" pose for a character where the arms and legs are splayed out in an X formation, others use a pose that has the arms straight out to the front (called the "zombie" pose) with the legs straight up and down, sometimes the arms are also straight down or they can be to the side. It really doesn't matter, the resulting motion will be identical, it's only the representation of the data that changes.