Motioncapture Tutorial

What you will need

Importing MoCap Data

We will match MoCap data to the avatar model using Character Studio, which is standard in 3DSMax.

The free mocap resource that we will be using is located here. For more information on this resource, navigate to the About link at the top of the page.

In this tutorial, we will be creating a Golf Swing for your avatar. The mocap data is stored in BVH format, and is located here. At the end of the Import Stage, we will create a BIP file that can be used with the avatar models.

Start with the Male/Female avatar 3DSMax scene files. First, create a new Skeleton Biped. Select it and click the Motion tab. Navigate to the Motion Capture section, and click Load Motion Capture file. Select the downloaded BVH file, and ignore the warning message- it's a naming convention issue, nothing more.

The figure above shows the Mocap Conversion Settings. The only difference from the default settings is the Up Vector field- set this to Y.

Once the import is complete, select your new Biped and click the Motion tab section Biped. Now select Save file to save the animation as a BIP file. Delete the Biped you had created in the previous step.

We will be using the BIP file to create our custom avatar animation for Twinity.

Preparing Animation for Export

This stage explains the procedure to prepare the Imported animation for Twinity. With the Golf Swing, this procedure is relatively simple. We will go over a more advanced animation example in a later tutorial.

First, open up the Layers panel, and freeze the _animator layer, and hide the _modeller layer. You only need to work with the biped layer.

Select the avatar biped, then click on the Motion tab and turn off the Figure Mode. Select Load File and load the BIP file created in the previous section.

Once the load is complete, the first thing you will notice is that the position of the Biped has been shifted, and the golf swing animation is matched correctly to the avatar model. We will use the Workbench to shift the starting position of the Biped back to the Origin. To open the Animation-Workbench-Window click the workbench-button in the Motion tab section Biped Apps.

The figure above shows the Position Curve of the Biped (Bip01) along the X axis. The y-axis of the graph shows that the Biped isn't located close to the origin (i.e. X=0, Y=0).

Firstly, let's list the Workbench tools that you will find useful -

  • The Select tab on the left allows you to select different parts of the Biped.
  • The drop-down list next to the Controller button, allows you to select which curve to work with- we will be working with the Pos Curve and the Rot Curve of Bip01.
  • The X, Y, Z buttons allow you to select curves in the X, Y and Z dimensions.
  • The Zoom Horizontal Extents and Zoom Value Extents in the bottom right corner allows you to frame the curves before you start working on them.

Follow the settings in the above figure to shift the X-position of the Biped to the origin. Select all the keys and shift them vertically till the first key (at frame 0) is at the X=0 position. The figure below shows the modified curve.

Now perform the same procedure to shift the Bip01 starting Y position to the origin.

With this particular animation, there is a sudden 90 degree Biped rotation between frames 0 and 1. We can fix this using the Workbench. Select Bip01, and then select Rot Curve . Select XYZ in the drop-down list next to Rot Curve and Z. Now select all the keys except for the first key. Now shift all the remaining keys vertically down till the curve looks like the figure below.

The animation we have just created is now ready for export to Twinity!


This section details the procedure to Export your completed custom animation to Twinity. First, hide all objects apart from the biped. Use the Layers Panel to do this. This is very important.

Next, export the completed animation to the .DAE (Collada Format) using the Export function in 3DSMax.

Editing the twml file

This section details the creation of the associated TWML file. TWML files can be edited using text editors such as Notepad++ and PSPad.

The TWML Specification lists fantastic examples to add your Custom Animations to your Avatar.

POINT TO NOTE: Ensure all of the Export Files (i.e. the .twml, .dds, .dae, .max files) are at the same location for simplicity.

Refer to the Downloads section below for the sample twml file and 3dsmax scene file.

Using your Custom Animations in Twinity

To use your custom animation, select the option to Load Action. Select My Computer, and navigate to the location on your computer where the twml file is saved.

POINT TO NOTE: You need to be a Premium Member to upload Customized Content to Twinity from your computer.

Select the twml file you have created, and then click Purchase.

Cleaning up Custom Animations using Workbench

The above procedure can be used to very quickly create custom Twinity animations from MoCap data. However, in most cases there will be issues.

These issues will mostly deal with extreme positioning of the Biped bones. Such issues can be fixed using the Workbench. We will go over this procedure in the next tutorial.

Twml example

<package caption="Guy Golf Swing" icon="icon.jpg"> 
    <description>Guy Golf Swing</description> 
    <avatar_animation path="motioncapture.dae" trigger="begin" 
        repeat="1" blend_in="200" skeleton="male"/>