This tutorial is about how to transfer a custom rig including animation from Autodesk Maya to a game engine such as Unity.
The main problem for this process is that most of what makes up a character rig, such as controls, constraints, connections, expressions will not always get properly imported into the game engine.
One way to get around this is to build a rig that includes only the features that can be read by the game engine, which are usually joints and maybe ik controllers. The downside of using such a limited rig for animation is that the animation process itself becomes a real pain because all the nice controls that can make animating a breeze are missing.
So, how to get around it? The most common way is to have two rigs setup: One for animating, that includes all the controls and one for exporting the animation into the engine, which mainly only consists of joints and the characters skin. This is the safest way to make sure that the transfer works nicely.
When using this two rig setup the animation needs to get transferred from the animation rig to the export rig. And this is done by connecting the two rigs, so that the animation rig drives the export rig which is then baked and exported.
Of course this can be all done by hand but it’s much easier to have some scripts to do all the work and make sure that no errors occur.
The set of mel scripts used in the tutorial can be downloaded here: