Importing into Unity and setting up in Mecanim

VIDEO - Importing into Unity Mecanim

Steps to import into Unity Mecanim

1. Drag one of our FBX files into Unity

Drag motion capture FBX file from your computer into Unity. The primary FBX file with our animations can be used. Note that the frame rate for this file is 60fps, so you may wish to reduce the frame rate in a 3D application before import or use the keyframe reduction inside Unity after import to reduce the file size. The Unreal Engine fbx file included with our animations supplimentary files can also be used in Unity if you prefer.

Drag motion capture file into unity project

 2. Set model as a Humanoid

Select the animation in your project window and then in the inspector select the Rig Tab. From the 'Animation Type' window select the Humanoid option. Finally hit the Apply button so the setting saves. Once Saved click the configure button to go into the rigs setup page.

Set model as a humanoid character in unity mecanim

3. Set T Pose

In the inspector hit the pose drop down menu at the bottom of the bone list. Select 'Sample Bind-Pose', then select 'Enforece T-Pose'. This will set the character into a T-Pose so Unity mecanim system can retarget the animation properly. Once you have done this click 'Apply', and then select 'Done'.

Set T Pose in mecanim

4. Preview animation and adjust settings

Now if you click on the animation in your project asset browser, you can select the Animation Tab and preview the animation. The small icon in the bottom right of the preview window allows you to select a humanoid model you already have in your project or to view the animation on unitys default character.

There are also a number of settings you can change for the animation in the inspector panel above the preview window. These include settings for animation compression and a number of other settings to loop the animation and adjust how its root motion works.

Animation Compression

In the top section there is an option to adjust the animation compression. The 'Optimal' setting will do its best to compress the animation as optimally as it can. From this menu, you can also turn animation compression off altogether or set your own keyframe reduction by selecting the 'Keyframe Reduction' option. When this is selected you can adjust the 'Rotation Error' and 'Position Error' values. Higher values result in less frames (more compression) and lower values result in less compression and a higher fidelity. How these are set will depend on the animation and specific use case.

Preview animation in Unity and adjust animation compression

5. Playing on a character

The animation can now be accessed through an animation controller and played on a humanoid character in your scene. In your animation controller you may want to select the animation and turn on the foot IK. This will stop any floor slide that appears on the new character when it animates.

Play animation in unity on a humanoid character using an animation controller

 6. Hit run to view in Unity

mocap dance animation in Unity Game Engine