Using BioVision Motion Capture Files

The BioVision Hierarchy (bvh) file format is used to store animation information that was created using motion capture. It provides information such as the length of each limb of the person/animal who's motion was captured. It does not describe the appearance of the person/animal itself. This information can be used by 3D Canvas to create an animated skeleton.

What follows is an explanation of how to use BioVision motion capture create a skeleton for a character. This tutorial is intended for advanced users of 3D Canvas.

If you have a character model that has been specifically designed to work with a particular BioVision file, or you plan to design a model around the BioVision skeleton many of the following tasks will be unnecessary.

This tutorial is intended to be used with a jointed model. If you are planning to use a skeletal model, simply change the import style to one of the bone styles, and replace the hierarchy related steps with the standard technique for skinning a skeleton. Note that placeholders will still be created. Once you have oriented the placeholders you can delete them to expose the underlying bones.

This tutorial covers the worse-case situation for BioVision imports, where the model does not match in any way the BioVision import.

For this tutorial we are going to use a cartoon-style model of a mobster.

This model has been provided by Viewpoint. It was modeled with 3D Studio.

Click here to download the Mobster model in 3D Canvas format.

BioVision has a number of sample motions available at their website. Click here to download the walking motion that we used to create this tutorial. Click here (497K) to view an animation created with this BioVision file. It is something of a gorilla-style walk which seems appropriate for the model.

 

TutorialBioVision1.gif (15583 bytes)

 

The BioVision Hierarchy (bvh) file was created using a human so the body parts will not match our cartoon character. We will need to do a considerable amount of resizing. This will be easiest if working with a couple of views of the character model.

Select View Selection from the View menu. Choose the icon that indicates two vertical-oriented views.

Right-Click on the right view, and select View->Orthographic->Front from the popup menu

Also we will be working with animation key-frames, so show the Animation Toolbar using the View menu.

 

TutorialBioVision2.gif (21342 bytes)

 

To resize the BioVision animation information to fit our skeleton will require some estimation and a little bit of trial-and-error.

The first step is to do a trial import of the animation information to see how it compares with our character model.

Select Import->BioVision Motion Capture (bvh) from the File menu.

Find the motion capture file that you want to import.

There are a number of options provided for BioVision imports. Importing BioVision files can be time consuming. Since this is simply an import test we only need to import one key-frame of the animation. Enter a key frame range of 1 to 1 in the Include Keys: fields and click OK.

 

TutorialBioVision3.gif (6984 bytes)

 

3D Canvas created a skeleton made up of Limb Placeholders from the BioVision file.

These placeholders are temporary body parts that you will eventually replace with the body parts of your character.

This skeleton is far too large for our character. The important thing to remember when importing BioVision files is that the length of the legs of the character must match the length of the legs of the BioVision skeleton. This ensures that the character's stride will be correct.

There are two options here, you can increase the size of the character to match the skeleton, or you can reduce the size of the skeleton to match the character. For life-like human characters this is usually an easy task, since the length of the limbs will typically match fairly closely. But for our cartoon character this is going to be more difficult.

Increasing the size of the character model is easy. Simply alt-click on the root of the model (usually the hips) and ctrl-drag to scale.

Reducing the size of the skeleton after importing isn't really practical since it would require repositioning each bone at each time interval in the animation. This is a job that is too large to be done post-import. The solution is to change the size of the model during the import. The BioVision Import options provide options to resize the skeleton during the import.

 

TutorialBioVision4.gif (27432 bytes)

 

A BioVision import creates a "pedestal" for the imported skeleton. This is simply a flatted cube that indicates the start position of the animation sequence. This pedestal can be used to move the imported skeleton and animation sequence to a new location and orientation. It also can be used for deleting the entire imported skeleton.

Alt-click on the pedestal and select Delete from the File menu to delete the imported skeleton.

Re-import the skeleton, this time however select a Percentage of Original Size of 30% as well as Include Keys: of 1 to 1.

30% isn't a magic number. By comparing the imported skeleton with the mobster model I estimated that I needed to reduce the size of the skeleton to 35%. A couple of trial imports later I hit on the ideal import percentage of 30% to give the correct leg length. Note that you could have left Percent of Original Size at 100% and entered 30% for each Joint/Bone in the Hierarchy Components but that would have been incorrect. That would not have resized the animation position. It is essential that Percentage of Original Size be set such that the length of your character's legs match that of the imported skeleton.

We now have an imported skeleton with correct leg lengths. Unfortunately, that seems to be the only thing that is correct. Since we have a character whose body shape is a caricature of a real body we will have to do considerable resizing to fit. If we were using a character based on the real world, we might be done resizing.

In the next step, we will adjust the width of the hips. From the import it appears that the hips need to be about twice as wide as they are. That means they should be imported with at 60% (2x 30%) of the original size to get the right width. I did a couple of trial imports to determine the correct width of 55%.

 

TutorialBioVision5.gif (42286 bytes)

 

Delete the previous skeleton.

Re-import the skeleton, this time however select a Percentage of Original Size of 30% as well as a Include Keys: of 1 to 1. Also, this time go to the Hierarchy Components section and enter 55% for LeftUpLeg and RightUpLeg. The percentage entered in the Hierarchy Components section adjusts the relative position of a bone. Since we want to adjust the relative position of the hip joints, we adjust the position of the upper legs.

I have hidden a few items in this view of our character to make it easier to see the area we are working on. You can do this also by right-clicking on them and de-selecting Visible.  To make them visible again click Button-Toolbar-ShowObjects.gif (958 bytes) and Button-Toolbar-ShowBones.gif (149 bytes) on the Primary Toolbar.

 

TutorialBioVision6.gif (33676 bytes)

 

The placeholders of the leg are not oriented properly. Re-orient them using the Edit Control. This is a good test to see if they are the correct length. In this example they are not.

Delete the skeleton, and re-import selecting a Percentage of Original Size of 30% as well as a Include Keys: of 1 to 1 a LeftUpLeg/RightUpLeg amount of 55%, a LeftLowLeg/RightLowLeg amount of 25% and a LeftFoot/RightFoot amount of 35%. Again, these numbers were found by estimation and then trial and error.

 

TutorialBioVision7.gif (33392 bytes)

 

Re-orient the placeholders of the leg using the Edit Control. They should be the correct length now. Note that we do not want to reorient the foot bone in the direction of the foot. It is in-line with the calf bone and that is what the creator of the BioVision file intended.

Every time you delete an imported BioVision hierarchy and re-import you will loose the orientation of the place holders, so don't spend a lot of time in this stage perfecting orientations.

 

TutorialBioVision8.gif (32178 bytes)

 

Repeat this technique for all the remaining placeholders of the animation. For those who want to skip this step of estimation/trial-and-error bone length determination, I found these to be good percentages:

Percentage of Original Size: 30
Hips: 30%
Chest: 50%
Neck: 39%
Head: 30%
LeftCollar/RightCollar: 44%
LeftUpArm/RightUpArm: 120%
LeftLowArm/RightLowArm: 45%
LeftHand/RightHand: 40%
LeftUpLeg/RightUpLeg: 55%
LeftLowLeg/RightLowLeg: 25%
LeftFoot/RightFoot: 35%

Import the entire animation including all key-frames. In other words, don't change the Include Keys: fields this time.

Re-orient the placeholders as appropriate using the Edit Control. Take care to do as little rotation as possible to achieve the desired orientation. I found with this model that I had to orient the Neck and Head backwards to get an acceptable result.

 

TutorialBioVision9.gif (28571 bytes)

 

It is now time to move the character's parts from the original frame hierarchy to the new frame hierarchy.

This means moving each part one-by-one from the "Al" hierarchy to the "Pedestal" hierarchy.

In the example on the right I have moved the Torso-Lower from the "Al" frame to the "Pedestal/Hips" frame. The next step will be to move the Torso-Upper, Coat Buttons, Tie and Shirt from the "Al/Torso-Upper" frame to the "Pedestal/Hips/Chest" frame.

Repeat this process for all of the remaining character parts. Close unused frames as needed.

Also, delete all of the bones of the original model since that frame hierarchy is no longer needed.

 

TutorialBioVision10.gif (4518 bytes)

 

We now have a BioVision animated Character.

Switch to Animation Mode by selecting Button-Animation-Animate.gif (1005 bytes).

Press play Button-Play.gif (908 bytes) to preview the animation.

 

TutorialBioVision11.gif (35242 bytes)

 

The placeholder objects can now be removed if you wish. They were simply placeholders for the character's body parts so they are no longer needed.
TutorialBioVision12.gif (33632 bytes)

 

Use the pedestal to position and orient your animation.

Once you have done this, you can delete the pedestal.
TutorialBioVision13.gif (24350 bytes)

 

The information used by 3D Canvas to properly shade objects may be affected by moving body parts from frame to frame.

To correct this apply a Operation-Crease.gif (514 bytes) Crease operation to each body part.

Click here (142k) to view an animation created with this model.
TutorialBioVision14.gif (23210 bytes)