BVH File Format and Transformations
[The BVH Format - Motion Capture (Animation)]

This is a quick description of the BVH file format and how transformations work. More...

Collaboration diagram for BVH File Format and Transformations:

This is a quick description of the BVH file format and how transformations work.

The format itself is pretty basic (see http://www.google.com/search?q=bvh+file+format for examples) but getting the transformations correct is a bit tedious.

The BVH format consists of nodes (ROOT, JOINT, or End Site objects), each with a position relative to their parent. Each node also defines how to extract data from each animation frame relevant to that node. Typically that is rotation information.

Suppose two joint objects are defined as such:

    JOINT Elbow
    {
        OFFSET   2.5 0 0
        CHANNELS 3 Zrotation Xrotation Yrotation
        JOINT Hand {
            OFFSET   0 3.5 0
            CHANNELS Zrotation Xrotation Yrotation
        }
    }

Here we've got an Elbow joint with a child Hand joint. Furthermore, each has 3 angles of rotation, and all 3 rotation angles will be specified in each frame of animation.

With no rotations, the Hand is located 3.5 units from the elbow, in the Y direction. And the Elbow is located 2.5 units from its parent, in the X direction. (these positions are from the OFFSET element)

Let's suppose the Elbow was the root object, at the origin. What is the location of the Hand? It is at X=2.5, Y=3.5, of course.

But now suppose there are rotations in the animation frames. Now more complicated matrices have to be calculated for each step. It roughly works like this for each node:

So in particular, rotations of a given child node don't affect its own translation. Rotations of a given child node only impact its descendants.