NeuroAgent

How to Add Multiple Animations in Blender for Godot

Complete guide on adding multiple skeletal animations to a single 3D model in Blender with proper export to Godot. Learn the steps for creating, configuring, and using animations.

How to add multiple skeletal animations to a single 3D model in Blender for subsequent export to Godot?

NeuroAgent

Adding Multiple Skeletal Animations to a Single 3D Model in Blender for Export to Godot

To add multiple skeletal animations to a single 3D model in Blender for export to Godot, you need to create separate Actions for each animation in the Animation Editor, then configure the export using the Godot Blender Exporter with the “Include All Actions” option, and properly import the file in Godot with the appropriate animation settings.

Table of Contents

Model and Skeleton Preparation

Before adding animations, ensure your model is fully ready:

  1. Check vertex weights: Make sure all vertices of your model are properly weighted to the skeleton bones. Use Edit mode and select bones to verify that vertices recolor correctly.

  2. Object center: Set the object center to the character’s base position (usually at the center of the feet or hips). This is important for proper animation functionality in Godot.

  3. Bone hierarchy: Verify that the bone hierarchy is properly set up with a single root bone (typically called “root” or “hip”).

  4. Scale normalization: Ensure your model has the correct scale. Godot works better with models at 1:1 scale.

Important: All animations must be created for the same Armature with identical bone structure. Changing the bone structure between animations will cause export errors.

Creating Multiple Animations in Blender

To create multiple animations for a single model, follow these steps:

Basic Animation Setup

  1. Switch to Animation mode in Blender
  2. Make sure your Armature is selected
  3. In the Dope Sheet window, select Action Editor

Creating the First Animation

  1. Click New to create a new Action
  2. Give it a descriptive name, such as “idle”, “walk”, “run”
  3. Set the animation time range in the timeline
  4. Create keyframes for the desired poses and movements
  5. Repeat the process for each animation

Organizing Animations

python
# Example of naming Actions in Blender
"idle_loop"      # Looping idle
"walk_forward"   # Walking forward
"run_forward"    # Running forward
"jump"           # Jump
"attack_sword"   # Sword attack

Tip: Use prefixes to group animations (e.g., “loop_”, “once_”, “combat_”) for easier management in Godot.

Optimizing Animations

  1. Remove redundant keyframes: Use Clean Keyframes to remove unnecessary keyframes
  2. Trimming: Ensure each animation starts and ends in the proper pose
  3. Interpolation: Adjust keyframe interpolation types for smooth movements

Setting Up Export to Godot

To properly export animations, use the Godot Blender Exporter:

Exporter Installation

  1. Download the latest version of Godot Blender Exporter
  2. Install it in Blender via Preferences > Add-ons
  3. Activate the Godot exporter

Export Settings

  1. Select your model in Blender
  2. Go to File > Export > Godot GLTF (.glb/.gltf)
  3. Configure the following parameters:
Parameter Recommended Value Description
Include Actions ✅ Enable Exports all animation actions
Animation Mode
- Loop ✅ For looping animations
- Root Bone Root bone Usually “root” or “hip”
- FPS 30 or 60 Animation speed
- Compress** ✅ Enable Reduces file size

Export Format

glTF
Recommended formats:
- .glb (binary, better for Godot)
- .gltf + .bin (if separation is needed)

Compression settings:
- Draco Compression: ✅ for models
- Mesh Quantization: ✅ for optimization

Important: Verify that all animations appear in the action list before exporting.

Importing and Using Animations in Godot

After importing the model into Godot, you need to configure the animations for use:

Model Import

  1. Drag the .glb file into your Godot project folder
  2. Select the model in the inspector
  3. Configure the import:
gdscript
# Example import settings
[remap ani]
importer="scene"
type="PackedScene"

[remap mesh]
importer="mesh"
type="ArrayMesh"

[remap animation]
importer="animation"
type="AnimationLibrary"

Creating AnimationPlayer

  1. Add an AnimationPlayer node to your character
  2. Create an AnimationLibrary for managing animations
  3. Set up animation states:
gdscript
# Example code for animation control
extends CharacterBody3D

@onready var animation_player = $AnimationPlayer

func _ready():
    # Load animations
    var animation_library = preload("character_animations.tres")
    animation_player.animation_library = animation_library
    
    # Play animation
    play_animation("idle")

func play_animation(anim_name: String):
    if animation_player.has_animation(anim_name):
        animation_player.play(anim_name)

Setting Up Animation Blending

For smooth transitions between animations, configure blending:

gdscript
# Setting up animation blending
animation_player["parameters/idle/blend_time"] = 0.2
animation_player["parameters/walk/blend_time"] = 0.3
animation_player["parameters/run/blend_time"] = 0.4

Solving Common Problems

Problem 1: Animations Not Importing

Solution:

  • Check that all Actions in Blender have unique names
  • Ensure the “Include Actions” option is enabled in the exporter
  • Check for errors in the Godot console

Problem 2: Animations Playing Incorrectly

Solution:

  • Verify keyframes in Blender
  • Make sure all animations have the same loop length (for looping animations)
  • Adjust keyframe interpolation types

Problem 3: Model Distorting During Animation

Solution:

  • Check vertex weights with bones
  • Ensure there are no conflicts in the bone hierarchy
  • Verify model and bone scale

Problem 4: Animations Too Large in Size

Solution:

  • Enable Draco compression in export settings
  • Optimize the number of keyframes
  • Use animation caching in Godot

Sources

  1. Official Godot Documentation - Animation System
  2. Blender Manual - Animation Workflows
  3. Godot Blender Exporter GitHub Repository
  4. GLTF Export Settings Guide
  5. Character Animation Best Practices

Conclusion

Working with multiple skeletal animations in Blender for Godot requires attention to detail at each stage:

  1. Preparation: Always start with a properly prepared model and skeleton
  2. Organization: Use a clear naming system for animations
  3. Export: Properly configure export parameters, especially “Include Actions”
  4. Import: Set up AnimationPlayer in Godot for proper animation playback
  5. Debugging: Regularly check animations at each stage of the pipeline

Create backups of your files and test animations at each stage. Experiment with blending and transition settings to create smooth and natural character movements.