This blog serves as a step-by-step guide for users who want to learn how to take animations created in Rokoko Studio and import them directly into Unity. The process goes over using two different skeleton exporting processes in Studio, Rokoko Newton (Default) and Mixamo depending on whether your character has a custom rig or requires one made in Mixamo.
Exporting From Studio
Click the “Export” button to bring up the “Export options” box
Most of the default information should remain untouched however, you have the option to adjust the following settings:
If you have Virtual Production data, make sure “Export VP data” is checked
“Mimic file hierarchy” will export your files in the same hierarchy that they are in Studio
“Export Path” shows where the files will be exported out to
Default exporting file format is FBX, however, you can also change “Format” to BVH or CSV
“FBX Settings” allows you to choose between ASCII or Binary types
“Version” allows you to choose which FBX version you’d like to export as
“Skeleton” has four different choices depending upon where you plan to import the animation to: Rokoko Newton (Default), Maya HumanIK, 3ds Max Biped, and Mixamo
If you have a custom character with a custom Humanoid rig, choose Rokoko Newton (Default)
If you have a custom character that doesn’t have a rig, or you’re using Mixamo’s custom characters, choose Mixamo.
Once you have your settings set, click the “Export” button
Auto-Rigging Your Character
If your custom character is not rigged, we recommend using Mixamo’s auto-rigging feature (If you are using a custom character or a character already rigged from Mixamo’s site, skip to “Importing Into Unity”)
Locate the FBX, OBJ or ZIP file of your character and drag and drop it into the rectangular box
After the processing has finished, review your character to make sure their idle animation displays properly on your character
If your custom character is not in a T-pose, Mixamo will have you use their tool to locate particular joints to best rig your character. Once done, click the “Next” button
You may be presented with a prompt asking if you want to proceed with this character, click “Next” if you do.
You’ll now see your character in a T-Pose in Mixamo
Click the “Download” button to download your character from Mixamo
Within the “Download Settings” box you can choose between the formats FBX, FBX for Unity, and Collada.
Select FBX for Unity
You can also choose whether or not you want your character in a T-Pose or their original pose
After choosing your settings, click the “Download” button
Importing Into Unity
Click the Unity Launcher to open the Unity program.
Open an existing or new Unity Project (if this is your first time, we recommend opening a new project)
For the sake of organization, create two new folders titled “Characters” (to house your custom characters) and “Animations” (to house your animations)
Right-click on or within the “Characters” folder and click “Import New Asset”
Locate the FBX file(s) with your custom or Mixamo character, click “Import”
Click on the newly imported FBX
Note: If you imported a Mixamo character and the textures are missing do the following:
Click on the “Materials” tab in the Inspector
To the right of Textures, click “Extract Textures”
Create a new folder named “Textures” if you don’t already have one
Click the “Select Folder” button
After doing this, the textures should populate on your character
Right-click on or within the “Animations” folder and click “Import New Asset”
Locate the FBX file(s) with the recorded animations, click “Import”
Click on the newly imported FBX
In the Inspector, click the ‘Rig’ tab
If your character model contains a Humanoid rig then you need to change Animation Type to “Humanoid”
In the Inspector, click the ‘Animation’ tab
If the recorded animation is something that requires it to loop (walk, run, etc.), check the ‘Loop Time’ box.
If the length of the recorded animation needs to be adjusted, you can use the timeline to adjust the start and end times of the animation.
If the recorded animation contains root motion, the ‘Root Motion Node’ dropdown under ‘Motion’ allows you to set where on the rig the root motion is set.
If you want to preview how your animation looks on your custom character, drag and drop your custom or Mixamo character FBX into the preview window of their respective animation skeletons below the Inspector then press the Play button
If the animation isn’t playing properly within the preview window, we recommend going back through these steps to make sure your character and animation files are set up properly.
From this point forward, you should be able to now use your recorded animations in Unity. If you need help figuring out how to create a character controller or making transitions between different animations states, we recommend checking out our Working with Character Animations in Unity blog.
We hope this guide has helped you set up your character properly in Unity to allow your newly recorded animations to work! If you have any questions or continue to run into issues please reach out to our support desk.