Motion capture data pipeline

From Blue Mars Developer Guidebook

Jump to: navigation, search
There are security restrictions on this article

Back to Tutorials

This is the motion capture pipeline, assuming you have received mocap data in an .FBX file that uses the standard Blue Mars skeleton. This is actually the older method using the CryExport plug in for max. The process has become a lot easier if you first follow the Exporting the animation to Collada (.dae) tutorial and use our conversion tools (How to convert an animation from Collada (.dae) to .dba).


Step 1: In 3DS Max, go to File > Import and import the .FBX file that contains the animation. The only required option to check is "Animation", the rest is up to you. Be sure to Convert Incoming World Coordinate to Z if your mocap data is in a Y-up scene. This might cause your characters to face the wrong way, but we will fix that later.

Image:mocap_pipeline_01.jpg




Step 2: Select the entire skeleton hierarchy by double clicking on the Bip01 bone in the Schematic View.

Image:mocap_pipeline_02.jpg




Step 3: Go to File > Save Animation... and save out the animation as an .XAF file. You should use the same file name as the .FBX file but with the extension .XAF. Click on "Save Motion" to save out the animation. Now you can close this file. There is no need to save this file because we created a new .XAF file already.

Image:mocap_pipeline_03.jpg




Step 4: Now open up the .MAX character file. The character mesh should be skinned to the Biped skeleton and in bind pose. Double click on the root (Bip01) bone to select all the bones in the hierarchy.

Image:mocap_pipeline_04.jpg




Step 5: Go to File > Load Animation... and the Load XML Animation File dialog box will open up. Select the .XAF file but do NOT click Load Motion yet. (a) In the File drop-down box under the Motion Mapping/Retargeting section, make sure you have the correct .XMM mapping file selected. (b) If you don't have an .XMM file you can make one in the next step. Click on "Edit Mapping" (whether you have the .XMM file or not).

Image:mocap_pipeline_05.jpg




Step 6: The Map Animation dialog window should open up. At the top under Filters, make sure "Animated Tracks" is checked like above. (a) If you need to create the .XMM mapping file, you can do so now by scrolling down both the CURRENT: and INCOMING: columns under the "Map Track To Track" section of and double clicking on the same bone in each column (ie Bip01 in CURRENT and its equivalent bone in INCOMING) and then clicking on the <- arrow. (b) This will map the track so that the bone selected under INCOMING will have its keys mapped to the bone selected under CURRENT. Click "Load Motion" when you're done to load the animation. (c) Depending on how long the animation is, it can take up to ten minutes to load the file.

Image:mocap_pipeline_06.jpg




Step 7: Now open up the Time Configuration properties (a) and change the End Time of the animation to match the last frame number that has keys on it. (b)

Image:mocap_pipeline_07.jpg




Step 8: We must now make sure the character is properly oriented. Since Max is Z-up, characters can sometimes end up facing the opposite direction after loading mocap data to it. The correct orientation for characters is to face +Y. An easy way to know if your character is properly oriented is to change the camera to the FRONT view (you can use the hotkey 'f' to change view). (a) You should see the BACK of your character when you do.

Image:mocap_pipeline_08a.jpg

If the character is facing you, then you will have to turn it around. First, select the root (Bip01) bone. (b) Then open the Motion rollout menu (c) and open the Biped section. (d) Click on the "Move All Mode" button, which is located on the bottom right of the menu. (e) Image:mocap_pipeline_08.jpg




Step 9: To turn your character around, change the rotation of Z to 180. (a) It should look like the picture above.

Image:mocap_pipeline_09.jpg




Step 10: If the character's feet aren't touching the ground, you can fix this by adjusting the Z position offset. (a)

Image:mocap_pipeline_10.jpg




Step 11: Once the character is properly oriented and touching the ground, click on "Collapse" to freeze your changes to the offset. (a)

Image:mocap_pipeline_11.jpg




Step 12: Now we have to make sure the Locator_Locomotion is correctly set up. First select the Locator_Locomotion. (a) If this animation is for a walk cycle or any cycle that will move the character, skip down to Step 13a. Otherwise, keep reading.

Image:mocap_pipeline_12.jpg




Step 13: Open the Move Transform Type-In box. Make sure you are transforming in World space (a). In the Move Transform Type-In box, set the X, Y and Z values to 0 (b).

Image:mocap_pipeline_13.jpg




Step 14: Now change to the rotation tool and set the X, Y and Z values to 0 like you did before. (a)

Image:mocap_pipeline_14.jpg




Step 15: Now go back to the Motion rollout menu (a) and open the "Key Info" section (b). Make sure you are at the first frame of the animation, frame 0. Click on the "Record" button to set a key frame (c), and then set both Position Space and Rotation Space to "World" (d).

Image:mocap_pipeline_15.jpg




Step 16: Now go to the Utilities rollout menu (a) and click on "CryEngine 2 Exporter" (b). This will open up the exporter options.

Image:mocap_pipeline_16.jpg




Step 17: Select the Locator_Locomotion node (a) and under the "Object Export" menu, click "Add Selected" (b). If there is already something in the list, click on "Clear List" first (c). Then go to the "Bone Export" menu (d). Once again, if there is already something in the list, hit "Clear List" first (e). Then select the root (Bip01) bone (f), and click "Add Selected" (g). When you are ready, hit "Export Bones" to export the animation into a .CAF file (h). The .CAF file contains the bone animation data.

Image:mocap_pipeline_17.jpg





Step 18: You will have to add the .CAF file to a .CAL (Character Animation List) file to be able to run it in the Sandbox editor. You can use any text file to make the .CAL file. For each animation you want in the game, you need to add another line. The format of each line is: UNIQUE_IN_GAME_ANIMATION_NAME = FILENAME

  1. filepath statements allow you to specify what directories are valid .CAF directories.


Image:mocap_pipeline_18.jpg






Step 13a: If you are exporting an animation that moves the character (such as a walk or run cycle), you must follow these steps. First, go to the first frame of the walk cycle. (a)

Image:mocap_pipeline_13A.jpg




Step 14a: Then, select the Locator_Locomotion node (a). In the Move Transform Type-In, zero out the translations for X, Y and Z (b).

Image:mocap_pipeline_14A.jpg




Step 15a: Switch to the rotate tool and zero out the rotations for X, Y, and Z. (a)

Image:mocap_pipeline_15A.jpg



The next few steps are for the CryExport plug in, which we are no longer supporting. If you opt to use it, the following steps will help you export the animations. However, we are now using the .dba format for animations so you should export as a .dae file and follow these steps instead: Exporting the animation to Collada (.dae)

Step 16a: Now we need to set a key on this frame. Open the Motion Rollout menu (a) and expand the Key Info section. (b) Hit record to set a key (c), and set the Position Space to Body and Rotation Space to World. (d)

Image:mocap_pipeline_16A.jpg




Step 17a: Now we have to set another key for the Locator_Locomotion at the last frame. Go to the last frame (a) and set another key frame like before (b).

Image:mocap_pipeline_17A.jpg




Step 18a: Now, change the Position Space from "Body" to "World" (a).

Image:mocap_pipeline_18A.jpg




Step 19a: Go back to the first frame (a) and change the Position Space from "Body" to "World" (b).

Image:mocap_pipeline_19A.jpg




Step 20a: Now go to the Utilities rollout menu (a) and click on "CryEngine 2 Exporter" (b). This will open up the exporter options.

Image:mocap_pipeline_16.jpg




Step 21a: Select the Locator_Locomotion node (a) and under the "Object Export" menu, click "Add Selected" (b). If there is already something in the list, click on "Clear List" first (c). Then go to the "Bone Export" menu (d). Once again, if there is already something in the list, hit "Clear List" first (e). Then select the root (Bip01) bone (f), and click "Add Selected" (g). When you are ready, hit "Export Bones" to export the animation into a .CAF file (h). The .CAF file contains the bone animation data.

Image:mocap_pipeline_17.jpg




Step 22a: You will have to add the .CAF file to a .CAL (Character Animation List) file to be able to run it in the Sandbox editor. You can use any text file to make the .CAL file. For each animation you want in the game, you need to add another line. The format of each line is: UNIQUE_IN_GAME_ANIMATION_NAME = FILENAME

  1. filepath statements allow you to specify what directories are valid .CAF directories.


Image:mocap_pipeline_18.jpg

Back to Tutorials

Problems with this wiki page? Contact us either by: Support Email or Support Ticket System

Blue Mars Guidebook Privacy Policy
Blue Mars Guidebook Community Guidelines

Personal tools