- Preparations
- Connecting an Actor to Motion Data
- Characterizing the XBot
- Making the XBot use the Mocap Animation Data
- Importing into Unreal
Preparations
We are going to use the xbot character as an example. You can download it from here. You need to create a free user account to get access to any materials. You can get it without any animation attached by clicking on the orange download button in the top-right hand corner on the site immediately after logging in.
Connecting an Actor to Motion Data
We will start by processing the mocap data.
Start MotionBuilder and choose File->New from the menu bar at the top (alternatively, press Ctrl + N), which opens an empty scene. On the bottom-right in the resources window, select the tab named Asset Browser, click on Templates -> Characters, and drag an Actor into your scene. It should look something like this:
Next you have to import your motion data capturing data. Click on File -> Motion File Import. Move to the location of the mocap data you want to use and double click on it. In the next window, choose the takes you want to import and then click the import button. Your mocap data will be imported into the scene. The markers' position will appear as small cubes on the scene.
Choose an animation frame that shows the marker cubes in a T-Pose from the animation slider located in the middle of MotionBuilder's window bottom.
Before starting the adjusting process you have to connect the optical data to your actor. For this, create a so-called marker set and assign your mocap data points to the set. MotionBuilder will then use the markers assigned to the respective body part to calculate the animation. To create a marker set, first select your actor from the navigator window located at the bottom left. Next look on the right side for a button called Marker set and click on it. Choose create from the list that pops up.
Next open the Opticals entry of the navigator. A list of all marker points will appear. Drag these markers onto their respective limb they belong to. This is a crucial step, so make sure to correctly assign the markers to the correct part of the actor. The mapping can be changed later, if you experience troubles with the animation. After you are done, it will look something like this:
Please keep in mind, that you can only assign up to 5 markers per body part.
Now rotate and scale your actor and its limbs such that the cubes are in the position that the markers were on the captured person. It is important to be as precise as possible here since small deviations might lead to weird looking results. It is advisable to have photographs of the person whose motion was captured (in the best case you have a photo of all marker locations of the person making a T-Pose during that mocap session). After you are done, it might look something like this:
If you are done aligning, save your progress as a new scene and give it a meaningful name (such as actor_aligned.fbx). This is useful if your alignments were not good enough, so you can continue from this point instead of starting over again.
Click on the Snap button. A Textbox will appear and ask whether you want to use translation and rotation for calculations (TR) or rotations only (R only). Choose either of them.
Your actor will then use the mocap data for its animation. You can check whether it went well by moving the animation slider.
Finally, save the scene as a new file.
Characterizing the XBot
Open a new scene. Then load your downloaded xbor character into the scene by going to File -> Open.
Now go to the asset browser in the bottom-right hand corner. Select a character asset located under Templates -> Characters. From the right window, choose a character and drag it onto any bone of xbot. A small textbox should open with the text Charecterize.
Click it and a new box will open, in which you should click on Biped. With this you have successfully characterized your xbot. Finally, just save this as a new scene (e.g. xbot_characterized.fbx).
Making the XBot use the Mocap Animation Data
After finishing both steps, all that is left to do is setting the mocap data as the motion source of the now characterized xbot character. For this, first, merge both .fbx files you created into the same scene. Next, select your xbot character from the navigator window and locate the source field on its properties in the Character Controls window on the right. Choose your actor as a source. Now, the xbot can use the animation data defined by the mocap data. Save your scene a final time.
Importing into Unreal
The only thing left is to import your newly created scene into your Unreal Project. First open your project. When the editor opened, navigate to the desired folder to import your animated character into from the content browser in the bottom-left part of the main editor window. If you can't see the content browser tab, you can activate it by clicking on Windows->Content Browser->Content Browser 1 in the menu bar at the top.
Make sure to choose a subfolder of Content (not C++ Classes, if it exists), since you can't import assets into there. Click on import and navigate to your created MotionBuilder scene. Remember to specifically import the animations, if you want to do animation retargeting later on. Otherwise the animation will not be imported as a seperate file. You can now use your character with mocap animations in your projects.