Unity 3D is one of the most popular open-source game engines available today. Along with an easy-to-use interface, it allows you to import files from most major designing programs, such as Maya (.mb or .ma), Cinema 3D (.c4d, .c3d), Studio Max (.max), and Blender (fbx.).
At first, importing a character into Unity can seem intimidating. In this tutorial, I hope to make it simple, so that you may bring your carefully sculpted character to life!
Finding Free Animations
If you have created your own animations, that's awesome—we will discuss importing them into Unity shortly. If you've created your character or would like to purchase a stock character, let's talk about where we can find some.
Mixamo is a great option (recently purchased by Adobe). They provide basic free animations and custom bone rigging that can animate your character in minutes. Once you sign up, you can choose different characters and animation kits. Separately, you can use the free preset animations from Unity or purchase animation packages from the Unity Asset Store.
Since this tutorial is about importing an animated character, we won't get into the specifics about Unity. Let's open Unity by starting a new project.
Tip: Unity understands the T-Pose, so before importing your character, aim to save him in a default T-pose.
Preparing Your World
Your character may have many different components, and that's why it's important to create a new folder. Right click on the Project Window > Create > New Folder. For the purpose of this tutorial, let's name it character.
Now let's add a plane for our character to stand on. Go to GameObject >3D Object > Plane. We will also need to adjust the camera by moving the arrow for a better view.
Importing Your Character
Time to import your character. Click and drag your character's file (fbx, cd3, etc.) into the folder you created in Unity. All of your character's elements, including materials, will be imported into the same file.
Setting Up Your Rig
To set up the rig, right click your character and choose humanoid. A new window will open with your character, and this is where Unity attempts to match your character's rig (muscles and bones).
A good rig match will show in green. See the example below.
After your character is configured, click Done and Configure. Save your scene. We can now drag your character into the game world.
Animator Controller Basics
Time to add his animation. Go to Create > Animator Controller, and name it MyController.
After you add the animator controller, you will see a new tab. This is where we will add our character's animation. You may have multiple animations, but for the purpose of this tutorial we will talk about adding one. Each State (box) will represent an animation.
Click on the clock to the right of Motion. A window will open with your imported animations, so click and drag one into that box.
Tip: The default animation will be in orange.
To edit your animation settings, double click on the State. A box will open under the Inspector Window. Here you can edit the speed and loop time if you wish your animation to loop.
When you right click on a state, you can create transitions. This is used for multiple animations—for example, walk to run. Let's right click and create a New State, and then add a transition from Entry to New State. See the example above.
Tip: You can use your middle mouse button to zoom in and out.
Go to the Scene tab and click on your character. You can now drag your animator controller into the controller box in the Inspector Window. See the example above.
In conclusion, you should now have an understanding of how to import and add an animation to the animator controller.
Time to see our character in action. Click the Play button on top of the Scene Window. Congratulations! You have just imported your animated character into Unity!
Subscribe below and we’ll send you a weekly email summary of all new Game Development tutorials. Never miss out on learning about the next big thing.Update me weekly
Envato Tuts+ tutorials are translated into other languages by our community members—you can be involved too!Translate this post