Free Motion Capture Public Library, BVH File Animation Viewer

Drag To Drop and Upload unique bvh. Spaces and symbols replaced with '-'.

3166 Free Motion Capture

The Biovision Hierarchy (BVH) character animation file format was developed by Biovision, a motion capture business, to give motion capture data to customers. This format largely displaced an earlier format Biovision providing skeleton hierarchy information as well as motion data. Filer Provides Free Downloading, Hosting, and Social Media Content Educating and Connecting 3D Artists.

Biovision BVH The motion capture services provider Biovision created the BVH file format in the beginning to provide its clients access to motion capture data. The term Biovision hierarchical data is abbreviated as BVH. In order to give skeletal hierarchy information in addition to the motion data, they first devised the BVA format, which is covered in the following section. This format largely superseded that format. The BVH format is a great format overall; its only shortcomings are that it does not provide a complete definition of the basis pose (it only defines the translational offsets of the child segments from their parent; no rotational offset is defined) and it does not provide explicit instructions on how to draw the segments, but those are unrelated issues.

interpreting the file A BVH file is divided into two sections: the data portion holds the motion data, and the header section explains the skeletons initial position and hierarchy. Look over the Example1.bvh BVH sample file. The term HIERARCHY appears at the beginning of the header section. The term ROOT and the name of the hierarchys root segment that has to be defined come first in the next line. It is acceptable to construct another hierarchy after this one has been explained; this hierarchy would also be indicated by the term ROOT. A BVH file may, in theory, contain an infinite number of skeletal hierarchies. In actuality, the motion sections format—one sample at a time for everyone—limits the number of segments.

This turns the BVH format into a recursive definition. Every segment of the hierarchy defines its children recursively after containing certain data specific to that segment. A single left curly brace, is present on the line that follows the ROOT keyword; the brace aligns with the keyword ROOT. One tab character is used to indent a line that comes after a curly brace. This is largely done to make the file easier to read by humans, but some BVH file parsers require tabs, so if you are creating a BVH file, be sure to include tabs rather than just spaces.

The first piece of information of a segment is the offset of that segment from its parent, or in the case of the root object the offset will generally be zero. The offset is specified by the keyword OFFSET followed by the X,Y and Z offset of the segment from its parent. The offset information also indicates the length and direction used for drawing the parent segment. In the BVH format there isnt any explicit information about how a segment should be drawn. This is usually inferred from the offset of the first child defined for the parent. Typically, only the root and the upper body segments will have multiple children. The line following the offset contains the channel header information. This has the CHANNELS keyword followed by a number indicating the number of channels and then a list of that many labels indicating the type of each channel. The BVH file reader must keep track of the channel count and the types of channels encountered as the hierarchy information is parsed. Later, when the motion information is parsed, this ordering will be needed to parse each line of motion data. This format appears to have the flexibility to allow for segments which have any number of channels which can appear in any order. If you write your parser to handle this then so much the better, however, I have never encountered a BVH file that didnt have 6 channels for the root object and 3 channels for every other object in the hierarchy. You can see that the order of the rotation channels appears a bit odd, it goes Z rotation, followed by the X rotation and finally the Y rotation. This is not a mistake, the BVH format uses a somewhat unusual rotation order. Place the data elements into your data structure in this order. On the line of data following the channels specification there can be one of two keywords, either you will find the JOINT keyword or you will see the End Site keyword. A joint definition is identical to the root definition except for the number of channels. This is where the recursion takes place, the rest of the parsing of the joint information proceeds just like a root. The end site information ends the recursion and indicates that the current segment is an end effector (has no children). The end site definition provides one more bit of information, it gives the length of the preceding segment just like the offset of a child defines the length and direction of its parents segment. The end of any joint, end site or root definition is denoted by a right curly brace. This curly brace is lined up with its corresponding right curly brace. One last note about the BVH hierarchy, the world space is defined as a right handed coordinate system with the Y axis as the world up vector. Thus you will typically find that BVH skeletal segments are aligned along the Y or negative Y axis (since the characters are often have a zero pose where the character stands straight up with the arms straight down to the side). The motion section begins with the keyword MOTION on a line by itself. This line is followed by a line indicating the number of frames, this line uses the Frames: keyword (the colon is part of the keyword) and a number indicating the number of frames, or motion samples that are in the file. On the line after the frames definition is the Frame Time: definition, this indicates the sampling rate of the data. In the example BVH file the sample rate is given as 0.033333, this is 30 frames a second the usual rate of sampling in a BVH file. The rest of the file contains the actual motion data. Each line is one sample of motion data. The numbers appear in the order of the channel specifications as the skeleton hierarchy was parsed. Understanding the data Calculate the position of a segment you first make a transformation matrix from the local translation and rotation information for that segment. For any joint segment the translation information will simply be the offset as defined in the hierarchy section. The rotation data comes from the motion section. For the root object, the translation data will be the sum of the offset data and the translation data from the motion section. The BVH format doesnt account for scales so it isnt necessary to worry about including a scale factor calculation. A simple way to create the rotation matrix is to change 3 separate rotation matrices, one for each axis of rotation. Then concatenate the matrices from left to right Y, X and Z. An alternative method is to compute the rotation matrix directly. A method for doing this is described in Graphics Gems II, p 322. Modifying the offset information is easy, just poke the X,Y and Z rotation data into the proper locations of the matrix. Then the local transformation is completed then concatenate it with the local transformation of its parent, then the parent, etcetera.