Animation can be generated from 3D models by using keyframes. But how are these keyframes generated? These are a number of possibilities:
- Generate the keyframes automatically from a simulation, by using rules, such as the laws of physics.
- Manually by getting an animator to make small changes in each keyframe.
- By generating the keyframes from live action.
This last option is motion capture, this usually involves markers, such as light bulbs, being placed on the actor, the actor then makes the movements, which can be filmed from several angles. This will allow the 3D track of all the markers to be generated. This can then be linked to the 3D model to generate the animation.
BVH - BioVision Hierarchy file
There are a number of different file formats for holding motion capture data, one of the most common is defined by company called BioVision - http://www.biovision.com
This is designed for holding movements generated by motion capture, but there is no reason why computer generated movements should not also be stored in this way. It is a compact way of storing the motion, at it is independent of the details of the geometry. However this file data is specific to the hierarchy and body dimensions of the character, so although you can transfer movements from one character to another, you will have to scale it for each character model.
BioVision has two file types:
- BVA - has no hierarchy definition, each parameter such as translation, rotation and scale is absolute.
- BVH - has hierarchy information, each parameter such as translation, rotation and scale is relative to the parent bone..
BVH has 2 parts,
- model hierarchy
- motion data.
The model hierarchy defines the tree structure (objects and their 'parent-child' relationships). It also stores initial offset data for the parts with respect to the parent object, and also defines what "channels" of translation/rotation exist for the object in the motion data part of the file. A "channel" is either a translation in the x,y, or z direction or a rotation about the part's local x,y, or z axis.
The second section of the file contains the numeric channel data, in a series of 'frames', as well as a small header containing the value of the total number of frames in the animation as well as the animation frame speed, in seconds-per-frame. There will be a numeric entry for each channel from the above hierarchy section, appearing in the same order as which the various channels were defined. For a translation channel, the data is unitless and for a rotation channel, the number is an angular value in degrees. The rotation values are with respect to the point at which the object is attached to it's parent (as opposed to being with respect to the global coordinate system's origin).