This tutorial steps through the process of bringing an animation from Maya into the Unreal Engine. First install the free Unreal Engine via the link on the Software & Tools page and follow the installation instructions, and be sure to download the latest version of the free AZRI Rig (v1.1).
IMPORTANT: There is a known issue with AZRI Rig v1.0 (fixed in v1.1) where duplicate-named joints prevented exporting. Download the latest version of the AZRI Rig or use this workaround. In the Maya outliner, copy/paste *JNT_L_PonchoSideDriven_4* (including asterisks) into the search box and Shift+Right Click the plus (+) sign to reveal the duplicate-named joint. Double-click the last joint in the chain to rename it to JNT_L_PonchoSideDriven_5.
01. Creating An Unreal Project
We’re going to start from the default 3rd-Person project in Unreal, then replace the assets with our own AZRI character and animations to get us up and running.
- Open up Unreal (after following the link and installation instructions on the Resources page).
- In the starting Unreal Project Browser, under the New Project tab select Third Person.
- Give your project a name like Test_01 and hit the Create Project button.
- In the Content Browser in the lower left of the Unreal Editor screen, navigate to the Content folder, RMB-click create a new folder named AZRI, with two new folders within named Character and Animations.
You can jump right in and start playing this test game project by hitting the Play button at the top of the screen. Starting with a template project like this is a great way to begin prototyping as you conform it to your own design. Setting up a clean folder structure is essential to maintain a clean and efficient working environment.
02. Exporting The AZRI Character
Now you’ve seen the basics of creating an animation on a video game character in Maya, the next step is to see it in game. Let’s start by sending your character over to the game engine.
- In a Maya scene containing only the AZRI Rig, open up the Game Exporter (Maya Menu: File → Game Exporter)
- In the Model tab change Export All to Export Object Set, choosing export_mesh from the new dropdown. Under the Geometry section ensure at least Smoothing Groups & Skinning are checked.
- In the Path section navigate to, (or create if it doesn’t exist) a folder in your Unreal Engine project (…Unreal Projects/YOUR_PROJECT/) and name it something like export. Give your mesh a name like AZRI_SkeletalMesh. Hit Export.
Employing Selection Sets ensures only the scene elements we require, (in this case the mesh and skeleton) are exported. This exports your character to the specified location, and needs only be performed once unless the character changes or requires updating.
03. Exporting An Animation
Next we’re going to export just the animations via a similar method. While the character file includes mesh, texture and joint/skinning data, for animations we need export only the export skeleton’s joint position and rotations to bring the character to life, so will instead export the export_skel set.
- In your animation Maya file, open up the Game Exporter (Maya Menu: File → Game Exporter) and in the Animation Clips tab, now choose export_skel from the Export Object Set dropdown. This ensures only animation-related scene elements (the skeleton position & rotation values) are exported.
- In the Animation Clips section hit the plus (+) button and enter a name for your animation – something like AZRI_test_01 should suffice for now.
- Set relevant Start and End frames for your animation. If not already done, in the Path section navigate to the same folder in your Unreal Engine project (…Unreal Projects/YOUR_PROJECT/export or similar). Hit Export.
You can set up multiple exported animation files from a single Maya scene file via the plus (+) button – this is especially useful for actions that must be cut into parts for playback in game, such as melee attack combos. Repeatedly exporting improving animations to be viewed in-game allows for rapid iteration, leading to higher quality results.
04. Importing The Character & Animation
Now we’re going to bring in the item(s) exported from Maya in steps 02 & 03. Many engines require both an export from Maya, then a subsequent import into the engine.
- In the Content Browser in the lower left of the Unreal Editor screen, make sure you are in your newly-created …AZRI/Character folder and hit Import.
- Navigate to the location you just exported your character to and hit Import (…Unreal Projects/YOUR_PROJECT/Import). Select the recently exported character.
- Repeat step 2. for any animations you may have exported, only importing them into the Animations folder. When importing an animation you’ll be asked to select a skeleton. In the Mesh section of the FBX Import Options popup select your recently imported character skeleton from the dropdown menu.
05. Viewing in The Animation Editor
Now to check that our character and animation came in correctly. Animations can be individual checked in the Animation Editor, allowing easy appraisal before hooking them up to be playable in the game proper.
- In the Content Browser in the lower left of the Unreal Editor screen, double-LMB-click on an animation. This will open it up in the animation editor.
- Rotate the viewport with Right Mouse Button, move with Left Mouse Button, and zoom with Middle Mouse Button Roll.
- Pause and unpause playback with the Space button, and scrub the animation forward and backwards via the timeline at the bottom of the screen similarly to Maya.
- Select different animations by double-LMB-clicking them in the Asset Browser in the lower right.
If all came in well, you have just brought your first AZRI character animations into a game engine and can view them with more accurate lighting, textures and camera than in Maya, all in realtime.
Now the next logical step is to get AZRI playable. For that you’re best to continue with Unreal’s official tutorials, only swapping out their character for AZRI. You can take your first steps to creating great playable game animation here.