Export an animated character from Blender to Unity by exporting the character and its armature/animations as an FBX file from Blender, and then importing that FBX file into your Unity project.
Exporting your detailed 3D characters and their carefully crafted animations from Blender into a game engine like Unity is a fundamental step in game development pipelines. The most common and reliable format for this transition is the FBX file format, which is specifically designed to handle 3D models, rigs, and animations across different software.
Properly exporting ensures that your character's mesh, armature (skeleton), skinning (how the mesh deforms with the bones), and all associated animations are preserved and function correctly within the Unity environment.
Preparing Your Character in Blender
Before exporting, ensure your character model is properly rigged with an armature and that all necessary animations are created as Actions or NLA strips. Good practices include:
- Ensure your character mesh is parented to the armature using automatic weights or manual weight painting.
- All animations intended for export should be linked to the armature object.
- Check for any scale or rotation inconsistencies (applying transforms like Scale and Rotation can be helpful).
Exporting from Blender to FBX
The FBX format (.fbx) is Unity's preferred format for 3D assets due to its robust support for models, rigging, and animations. Here are the general steps and important settings to consider when exporting your animated character:
- Select Objects: In Blender's 3D Viewport, select your character's mesh(es) and the armature.
- Access Export: Go to
File > Export > FBX (.fbx)
. - Configure Export Settings: The FBX export dialog has many options. Key settings for exporting animated characters include:
- Path Mode: Set to
Copy
and click the adjacent box icon to embed textures. This is often convenient but can increase file size. Alternatively, useAuto
orRelative
and manage textures in Unity separately. - Limit To: Change from
All Scene Objects
toSelected Objects
. This exports only what you selected. - Object Types: Ensure
Armature
andMesh
are checked. - Transform: Apply
Scaling: FBX All
orFBX Units Scale
to potentially avoid scale issues.Apply Transform
is often checked, but test if your rig requires it off. - Geometry: Set
Smoothing
toFace
orEdge
. EnsureApply Modifiers
is checked if you want modifiers (like Subdivision Surface) to be applied permanently to the exported mesh. - Armature:
- Check
Add Leaf Bones
if you need small bones at the end of bone chains (like finger tips) to be explicitly created. - Ensure
Primary Bone Axis
andSecondary Bone Axis
are set correctly (often Y and Z, but test for your rig). - Ensure
Bake Animation
is checked. This is crucial! It bakes the animation data onto the armature bones. - Check
NLA Strips
and/orAll Actions
depending on how your animations are organized in Blender.
- Check
- Animation: Ensure the
Animation
checkbox is checked if you are exporting animations.
- Path Mode: Set to
Once you have configured the settings, choose a location to save the file and "And now finally click export." This action saves the FBX file with your character model, armature, and baked animations.
Importing into Unity
With the FBX file ready, "And now let's go to Unity."
- Import into Project: Locate the saved FBX file in your file explorer (like Windows Explorer or macOS Finder). "Now draw the fbx file right into unity's project manager." You can drag it directly into the Project window in Unity.
- Unity Processing: Unity will automatically process the FBX file, recognizing it as a 3D model potentially containing a rig and animations.
Configuring the Imported Model in Unity
After importing, select the imported FBX file in Unity's Project window. In the Inspector panel, you will see several tabs:
- Model: Contains settings related to the mesh geometry. Ensure
Import BlendShapes
andImport Visibility
are checked if applicable. Scale settings can also be adjusted here if needed. - Rig: This is vital for animation.
- Change the
Animation Type
toHumanoid
if your character has a standard human-like skeleton (recommended for compatibility with Unity's animation system and retargeting) orGeneric
for non-humanoid or complex custom rigs. - For
Humanoid
, clickConfigure
to ensure Unity has correctly mapped your armature bones to the Humanoid rig standard. Fix any mis-mapped bones. - Click
Apply
once configured.
- Change the
- Animation: If
Bake Animation
was checked during FBX export and the Rig is set up correctly, you should see a list of imported animation clips under this tab.- Here you can name the clips, define start/end frames, set loop properties, etc.
- Ensure the
Import Animation
checkbox is checked. - Click
Apply
.
Once these configurations are applied, your animated character should be ready to be dragged into a scene, and its animations can be controlled via an Animator component.
By following these steps and ensuring key settings are correct during the FBX export from Blender and the Rig/Animation configuration in Unity, you can successfully transfer your animated characters, bringing them to life in your game project.