Kiel Figgins  -  Character Animator

Film         Broadcast         Personal         Resources         Reel         Resume         Contact         Store        


Store > Support > Game Ready


Adjusting Game Ready Rigs to work with Unreal Engine's Root Animation

Written by Jack Tondeur (Twitter - @JackTondeur)


Getting the Character into Unreal
Creating and Importing the Root Motion Animation


Getting the Character into Unreal
Firstly you need to export the rig from maya in such a way that Unreal correctly identifies the root bone. To do this the joints need to be removed from their current hierarchy. This can be done as follows:

1. Open the GameReady rig file and select the skeleton’s root as seen here.




2. Then, middle mouse click and drag the root out of it’s current hierarchy into some empty space, it should then look like this in the outliner. Note: I would not advise saving the rig like just to avoid it causing any problems when animating (though it shouldn’t really make a difference).




3. Select the root and in the top menu bar choose Select > Hierarchy (I believe this is in Modify > Select Hierarchy in older versions of Maya.




4. You will now have the entire skeleton’s hierarchy selected, but we also need to select the mesh so in the outliner hold Ctrl and select each mesh piece. You should see each piece highlighted in the viewport as it is selected.




5. Making sure you have mesh and skeleton selected, go to File > Game Exporter




In the game exporter the Model tab should be opened by default. Most of the default settings should be fine to use, just make sure to change it from “Export All” to “Export Selection” and also to add a file location and name. These options are highlighted in the below image.




Once you’re ready, click export and then it’s time to move to Unreal.

6. In Unreal navigate to the folder you wish to import the character in to and click on “Import”, highlighted in yellow below.




Navigate to the .fbx that was exported earlier and select it.

The following window should pop up.




The default options should be fine. Click Import (there may be some warnings but don’t worry about those) and then you should see the character and any materials that were assigned to it along with a skeleton and physics asset file as seen below. In this example I’d not set up the materials in maya so they are just showing as white.







Creating and Importing the Root Motion Animation
1. In maya, once you’ve referenced in the game ready rig, click the little eye icon above the character’s head.




2. Next find the “Root Move Vis” option in the channel box and set it to 1, due note that some older rigs don't have this control so will be unable to proceed as followed, you'll need to break the constraints and manually animate the joint. This will show a new control between the character’s legs, this is the root motion control.






3. Once you’ve completed your animation with root motion. Select the root joint in the outliner and in the menu go to Select > Hierarchy as you did when exporting the character.






4. Once again open the Game Exporter but this time go to the animation tab. The default settings should be fine but ensure to change it to “Export Selection” again and set the desired path. You can click the plus icon to add and define as many animation clips as you need.




5. Go back to Unreal and press the import button again from earlier and navigate to your new animation. The default options should be fine however you need to make sure that your previously imported skeleton is selected in the “Skeleton” drop down.




7. You might get a warning but don’t worry about this for now. Once your animation file has been imported, double click on it. This will open the animation in the preview window. It may be rotated strangely but this will be fixed shortly.

It is helpful at this point to turn on bone visibility to be able to see if root motion is working more easily to do this select the Bones > All Hierarchy option shown below in the viewport character menu.




8. To fix the 90 degree issue you can add a 90 degree import rotation and press reimport animation as shown below, though this will also be fixed once root motion is turned on. This is caused by the fact that we removed the skeletons root from its hierarchy in maya to export it but didn’t use this version to animate. If you animated with the version of the skeleton no longer in the hierarchy then this won’t have happened.




This 90 degree issue is caused by the fact that we removed the skeletons root from its hierarchy in maya to export it but didn’t use this version to animate. If you animated with the version of the skeleton no longer in the hierarchy then this won’t have happened.

If you have selected the option to show bones you should notice that there is a red bone showing as the character moves away from the origin. This is a good sign as it means the engine has detected root motion.




9. Now it is as simple as ticking the “EnableRootMotion” box in the options on the left.




10. You will notice that your character is now stuck to the spot, this is normal as the preview has extracted the root motion, if you wish to see how the root motion is affecting the character then select the “Process Root Motion” option in the Character > Animation menu in the viewport.




And that’s it you now have your rig animated with root motion in Unreal!