Advise for managing characters' animations in the long run?

Godot Version

4.3

Question

So I got my first 3D model with some animations exported from Blender as GLTF format. Now, what if I would like to add or modify more and more animations for this particular 3D model? Can I safely just re-export from Blender and just replace the existing .glb file in Godot without any problem? Is there any concern that needs to be addressed?

Yeah, you can. Here is the tutorial for Godot 3. There are some changes in animation in Godot 4, but the general principle is the same.

1 Like

no.
you are supposed to create TWO files. one with the model with skeleton, and additional copies with your animations.
the model is imported normaly but the animation is imported as animation library.
then in AnimationPlayer you can load the animation library.

for humanoids, use a humanoid bonemap. for other skeletons, disable “rename bones” and make sure they use the exact same skeleton and you don’t modify it.

then you can create additional animations in new files. I think you could also modify the animations.

2 Likes

I’ve never tried that, but I guess it could work ! I guess the worst thing that could happen is the MeshNode being invalid, you’ll probably have to delete the old mesh node from the Scene Tree and put it back again once you’ve re-exported the model in the project file manager.

@jesusemora would you mind elaborate some more on TWO files? How would the whole process work? From the export menu of Blender, I can see I can select what to export, but it would still be a .glb file, no? Then, how would this be when you are to inherited a .glb file as a scene…? Or am I missing something here?

in blender, you need a file with the rigged model. it doesn’t need textures but has to be UV wrapped.
export this as a GLTF file, it will work as the character for your game.
disable rename bones. I’m not sure if this will work without a humanoid, since mine uses one:

in blender, take the file and save it as a copy. in this file, create your animations.
export this as a GLTF file. in godot, import as animation library.
tut_animation_library
here’s the settings for importing the animation file, disable rename bones:

additional animations can be added by overriding this file, or you can create new files with different animations.

in godot, in your AnimationPlayer, load an animation library and add your animations.
tut_animationPlayer


done! you can add additional animations to your character anytime you want

2 Likes