This is an old revision of the document!


Working with Motion Capture Animation (BVH files)

It is possible to import motion capture animation into the pose editor. Motion capture is a technique that records real motion from humans with markers and converts that into a digital format. This is typically used for film effects but is also becoming increasingly used in games. Second Life is a popular MMO that uses motion capture animation for it's avatars.

Importing BVH Files

In order to see the Motion Capture folder, you need to put some BVH files in it first.

1) Copy your BVH files to the PoseEdit folder. This is under the Mod folder under your user data folder. The easiest way to find it is to go to your Windows Start menu, find the Thrixxx program folder and click on “Open Mod Folder”.

2) Get into the Pose Editor

3) Click the load button at the top of the Animation Panel

4) You should now see a “Mocap” folder option. Click it to see the BVH files.

Note: If you add additional BVH files you will need to restart the program for them to show up in the folder.

Where to find BVH files

BVH Files in the Second Life format work the best. There is a list of SL animation files at http://wiki.secondlife.com/wiki/Internal_Animations and a zip file of them in BVH format here

Here are some additional sources: (Note: these will probably all need massaging/converting. See the BVHacker section below)

Moving an animation into the correct position

You may find that the base position for the model is floating in the air or somewhere you don't want it. Here's a quick way to move the model into position.

1) Select all the keyframes (or just all the “hip” keyframes”) in the Key Frame panel (drag a box to select). This is so the adjustment will apply to all the keyframes and not just the current one.

2) Select the move hip joint in the joint layout view

3) Hold down “shift”. This will move all the joints that are children of the hip as well. Otherwise the hands and feet will stay in their current positions when the hips move.

4) Move the model into position using the move manipulator

You may also need to adjust the feet. See below.

Adjusting feet and other body parts

You may run into models that have feet or hands that look like this:

This can't be fixed by moving the whole body as outlined previously. The issue here is that the foot locators are not in the correct position. These are invisible objects in space that the feet are trying to reach for, similar to the ones that the elbows point at.

You can then reposition the whole body as needed.

Understanding the BVH file format

http://www.cs.wisc.edu/graphics/Courses/cs-838-1999/Jeff/BVH.html

If you find a BVH file that you really want to use but it's not in the correct format, you can try changing the joints to match the ones in the sample Second Life files. The BVH file can be edited in a simple text file editor like Notepad.

Using BVHacker to get BVH files working in the Pose Editor

BV Hacker is a free program that loads and manipulates BVH files. It allows you to preview the motion. It will also attempt to convert the data to Second Life format but it may not always do this successfully. Here are some common issues that you may run into and suggested solutions.

Fixing joint errors and getting the file to load in the Pose Editor

The Pose Editor needs to find the main joints that are used on the model.

Here are a couple of representations of the skeleton hierarchy used on the models. You may find that some versions of BVH have the Abdomen joint listed after the rThigh and lThigh joints. This is OK as long as they are still at the same level in the hierarchy.

Here's a diagram of the hierarchy that works in the Pose Editor Here's how that looks as a text hierarchy like you would see in the BVH file

Under the “hack” menu, select “Attempt SL joint naming”. This will attempt to rename the joints. It will probably give you a list of joints that it couldn't rename and recommend deleting them. This isn't a big issue, you can probably still import the file and the Pose Editor will ignore the extra joints.

If you still get errors after the “SL joint naming”, you can try manually renaming joints by right clicking on them. Ensure that all the joints in the Thrixxx hierarchy are represented. Additional joints will be filtered out so you can either leave them in or delete them.

Changing the speed of an animation

You can speed up the animation by using the “1/2 sample” button. This will cut out every other frame each time you click it effectively doubling the speed. There isn't an easy way to slow the animation down but you probably won't need to do that. Usually the mocap animations are too slow.

Cropping the animation

A lot of motion capture files have extra frames that you probably don't want. You can trim the animation by marking the start frame with the “Mark In” button and the end with the “Mark Out” button. Then hit the “Crop” button to trim out everything else.

Fixing joints that are in the wrong place

You may find that the animation converts but that the shoulders are too close to the body or the feet aren't rotated correctly. You can adjust the offset position of individual joints by using the Adjustment sliders on the right side. This applies both to translation (position) and rotation. Make an adjustment to the slider, save the file again and then reload in the Pose Editor. Repeat for any position or rotation issues until you get it right. Tip: if the feet don't rotate in the animation you can just delete the rotation keyframes for the feet in the Key Editor and adjust the rotation manually.

Scaling the joints

You can use “CTRL +” to scale the model up and “CTRL -” to scale the model down. Unfortunately, there isn't a way to adjust the scaling increments so you can just try to get the model within the right ballpark. If the joint scale is too large you will have the foot end effectors (where the feet are reaching to) too far down. If the scale is too small the model may be hunched over or have her arms too close to the body. If you experiment and keep reloading the model in the Pose Editor you can find the closest scale and adjust from there.

Making the BVH file interactive

* UNDER CONSTRUCTION *