problem regarding exporting armature animation from Blender to Godot

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Inces

Exporting animation in gltf format requires pushing down actions to NLA editor in Blender.
I was planning on designing animations in a way that only certain bone groups are keyframed with only rotation info. For example WALK animation was supposed to consist of rotation values for pelvis, legs and toes only. STRIKE : rotation of left arm and left weapon only. I need it this way in order to pass it to AnimationTree for blending, or blend them manually by simultanous playing in animationplayer.
However, after importing, animations become converted to full location/rotation/scale information for all bones of whole armature. Bones which had keyframes unspecified, now contain loc rot scal of 0 for first and last frame of animation. This cripples my design, as it makes blending extremely difficult.
I guess I could turn off unspecified bones channels using some kind of post-import tool script… but is there no way to export animations properly ?? Someone must know something :slight_smile:

I have found Blender’s push down system to be catastrophic to animations. I’ve taken to using completely different files for each animation of the same character.

Godot has recently gotten the ability to animate characters in the same way Blender does, so I’m going to see if I can completely replace Blender for character animations. I will be SOOOO happy if I can do that.

stormreaver | 2022-06-13 20:58

:bust_in_silhouette: Reply From: sante

Hi Inces. I don’t know if I understood really your question, but I had same kind of troubles with some of my characters… The problem itself is that blender don’t stores, in animations strips, things that have not to change their location, rotation and so on… But Godot don’t know original position of the character (and its skeleton…) in blender scene. So it happen that everything not moved during animation when imported in Godot, take a default (and generally wrong) value. Solution it’s extremely simple: in the first frame of animation, when in “pose mode”, press “i” key and select “Whole Character” to store all information about all the skeleton at beginning, also for bones you don’t need to move. This make possible to give Godot the whole beginning situation at start of animation.
If you would like to export only some bones, ignoring the others, I fear it is not possible, because a bone must be placed somewhere in the 3d space… I solved this problem simply thinking an initial “default” state, in AnimationTree. I mean you can export a “fake action” where your character do nothing and use it as a start point for all others. So, in Godot, it become that only some bones moves, when the others stay in same position of your default state.

Hoping can help you.

Thanks for answering, yes You did understand my question correctly :slight_smile:

So it is impossible to ignore part of armature during export. I hope it will be fixed in the future. So now I can only create a new animation based on imported one, and manually delete bones to ignore.
I always export T-pose as an 0 frame animation with starting loc-rot-scal info for every bone. This doesn’t solve my problem though, as I wanted to combine animations for certain body parts, like lower_body_walk + upper_body_two_handed_hold + head_and_pelvis_bounce_to_the_rythm, that kind of thing :slight_smile:

Inces | 2022-06-12 20:02