MotionBuilder tutorial: Motion Capture BVH data

MotionBuilder Tutorial: Driving model with Mocap BVH data file You can use a mocap data file to drive your model in MotionBuilder and then export it back to Maya or 3Ds MAX. MotionBuilder uses The Autodesk .fbx file format which is implemented in most of the major 3D packages. However to drive your character with mocap data you have to perform a lot of steps.

For the beginning lets have a look what mocap files MotionBuilder can use. As we can see in the Help Topics of the program, there is a list of five types of mocap data files. (*.asf, *.amc) (*.bvh) (*.htr) (*.trc) (*.c3d)

 

 

 

MotionBuilder Tutorial: Motion Capture BVH data tutorial

 

Acclaim (*.asf, *.amc)

The Acclaim format is a dual file format where the .asf file contains a definition of the skeleton and the .amc file contains the motion data used by the skeleton. It is possible to have multiple .amc files for a single .asf file.

When importing any Acclaim format, you can select only one .asf file and zero or more .amc files. If you choose to select no .amc files, a dialog box warns you that you are loading a skeleton with no data. If you continue, a skeleton structure is imported without animation.

When importing, an additional option lets you create a reference node for your skeleton.

Biovision (*.bvh)

The Biovision format is a file format for hierarchical or skeletal-based data. When importing this format, an additional import option (Create Reference Node) lets you create a reference node when importing your .bvh or .htr skeleton.

Motion Analysis (*.htr)

The Motion Analysis .htr format stands for Hierarchical Transformation Rotation. It is a hierarchical skeleton data format captured using Motion Analysis capture hardware.

When importing this format, an additional import option (Create Reference Node) lets you create a reference node when importing your .bvh or .htr skeleton.

Motion Analysis (*.trc)

The Motion Analysis .trc format is an optical capture format. When importing this format, an additional option lets you import data as optical segments.

Vicon (*.c3d)

The Vicon .c3d format is an optical data format captured using Vicon capture hardware. Two additional import options let you import data as optical segments and keep the Actor prefix when naming each optical marker.

 

In this tutorial we will describe how to use the BVH mocap data file to drive your model. The basic steps are very simple but if you do not have the elements prepared properly it can turn into a nightmare.

This is the sample of the code for the part of BVH file:

HIERARCHY
ROOT Center
{
OFFSET 0 0 0
CHANNELS 6 Xposition Yposition Zposition Zrotation Xrotation Yrotation
JOINT LeftHip
{
OFFSET 1.31741 0 0
CHANNELS 3 Zrotation Xrotation Yrotation
JOINT LeftKnee
{
OFFSET 0 -7.09406 0
CHANNELS 3 Zrotation Xrotation Yrotation
JOINT LeftAnkle
{
OFFSET 0 -6.89432 0
CHANNELS 3 Zrotation Xrotation Yrotation
End Site LeftAnkle_end
{
OFFSET 0 -1.19835 0
}
JOINT LeftToes
{
OFFSET 0 -1.19835 1.46409
CHANNELS 3 Zrotation Xrotation Yrotation
End Site LeftToes_end
{
OFFSET 0 0 0.599174

You can dovnload some free BVH files here

 

How to drive the model with BVH mocap data file

1. Import the BVH motion file into the MotionBuilder

2. On the first frame of the motion set the BVH skeleton reference into the T-Stance binding pose. Make sure the front of the BVH skeleton is facing the “Z” direction (see the MotionBuilder Tutorial: BVH – T-Stance in a minute )

3. Characterise the BVH skeleton with a MotionBuilder character template (see the MotionBuilder Tutorial: Custom characterize bone name template )

4. Import the model you want to drive through the BVH mocap data file.

5. Characterise the imported model with a MotionBuilder character template (you can use the same system as in step 3 if your naming bone conventions are different to MotionBuilder standards.)

6. In the control rig of the imported model choose input BVH Character

7. Play the animation

 

! NOTE: Always try to match the size and position of the BVH skeleton and your model as much as you can!

 

How to connect the characterised BVH with the driven model

STEP 1:

Import the BVH into the scene. Just drag and drop the BVH file into the work view. Click the Import option. (For instructions on how to add a path to your BVH file into the Asset Browser see the MotionBuilder Tutorial: BVH – T-Stance in a minute )

STEP 2:

Characterise the BVH skeleton with your prepared template. Put the skeleton in the T-Stance and click and drag the template in the scene. Now click on the small icon of the Character in the Navigator window and drag it over the skeleton. Then hit the Characterise option and you are done! Perfect!

STEP 3:

Select Biped option.

STEP 4:

Now as you can see, the Characterise option box in the Character Definition tab is checked. Good! That means that you have successfully characterized your BVH skeleton. Now you can bring your model into the scene . For this tutorial I used a model from the ClipArt disk from the original Autodesk MotionBuilder installation. You can use any model you have created and exported from Maya or 3Ds MAX. Drag and drop your FBX model in the work view. Choose the merge and no animation option.

STEP 5:

Characterize your imported model. I checked the characterize option only because I am using a model from the MotionBuilder ClipArt library and all the characters are already characterized. If you are using your own imported model you can use the same method as used in the MotionBuilder Tutorial: Custom characterize bone name template.

STEP 6:

Scale the size of your model to match the size of the BVH skeleton as much as you can.

STEP 7:

Go to the Character Controls window and in the drop down character menu choose the name of the model you want to drive. In my case it is the Goblin.

STEP 8:

Stay in the Character Controls window and hit the EDIT button. In the options choose Input>Character (BVH skeleton). Your model should snap onto the BVH skeleton position.

STEP 9:

Hit the play button and enjoy the animation.

In most cases of animation driven by mocap files, you will have to edit the motion and correct the movements. For this you can use separate layers and fix all the problems you are experiencing. To clean up the data, plot the animation on the rig and once you have editted it and made all the changes, plot the animation on the skeleton and save it as FBX. This file is then ready to import in Maya or 3Ds MAX.

 

Click the picture to download the movie