0
$\begingroup$

Crossposted from the subreddit; I can't seem to get the animations perfect when exporting to GLTF. I've looked all over for posts on it or different export settings but nothing seems to work. Here is an example of what I mean:

This is the idle animation as it plays in Blender

Gif of low-poly character's idle standing animation in Blender. They have a slight bounce to their legs, arms, and ears

This is how the idle animation looks in a gltf viewer and when exported into Godot Same animation as above, except playing in an online gltf viewer, and whenever it loops the right arm jitters for a frame

All of the animations are slightly jittery like this, but the standing idle loop is where it is by far the most noticeable

As far as what I've already tried, I've got the animations stashed to NLA strips, I have already applied all modifiers, there are no shape-keys. I've even tried manually baking the animation and THEN exporting but that still doesn't seem to fix it. Is it something with the way the armature or IKs are set up or maybe my export options or something?

$\endgroup$
3
  • $\begingroup$ In the animation baking options, did you enable Visual Keying and Clear Constraints? If yes, please share your file $\endgroup$
    – Lauloque
    Commented Oct 20, 2023 at 19:49
  • $\begingroup$ Oh hey that does work, thank you! Though, is there an easier way to do this? Or am I just going to have to like, copy the rig to have an editable version with constraints still and then manually bake every animation? $\endgroup$ Commented Oct 20, 2023 at 20:10
  • $\begingroup$ Okay, new problem, baking animation with Visual Keying and Clear Constraints does work, but i can only bake one animation before the constraints are cleared and all the other animations break $\endgroup$ Commented Oct 21, 2023 at 14:30

2 Answers 2

0
$\begingroup$

The usual "manual" workflow for exporting animation is:

  1. Save your work file
  2. Bake your animation (menu Pose > Animation > Bake Action, Enable Visual Keying and Clear Constraints.)
    enter image description here
  3. Export your animation
  4. (Optional) save as a new "exported" blend file (as a debug if you have an issue and need to go to your baked animation to check for any issues)
  5. Go back to your work file

Some exporters do offer you some baking options on export, or bulk export your action tracks individually (though usually you can't do both at the same time), allowing you to skip some steps in that process.

The glTF exporter in particular doesn't seem to be able to bake animations on export, so you do have to bake manually, export and revert to before bake.

$\endgroup$
7
  • $\begingroup$ How would I bake every action for exporting when clearing the constraints from baking one action breaks all the others? $\endgroup$ Commented Oct 25, 2023 at 19:41
  • $\begingroup$ By doing what I wrote to do: save > bake > export> reload save $\endgroup$
    – Lauloque
    Commented Oct 25, 2023 at 22:55
  • $\begingroup$ But won't it override the file each time I export it? Like I do save > bake anim1 > export > reload save > bake anim2 > export and it overrides the first one so there's still only one baked animation in the final exported file. --- Unless you mean, to export every single animation as an individual glb file and then combine them all again in Godot? $\endgroup$ Commented Oct 26, 2023 at 13:58
  • $\begingroup$ One export = one file. If you export everything on the same file, you just overwrite the file with the new export. $\endgroup$
    – Lauloque
    Commented Oct 26, 2023 at 14:27
  • 1
    $\begingroup$ I tried that and it did fix some of the initial jankiness of the animations but had its own bag of jankiness that came in, so clear constraints seems to be the best bet. I just wish there was a better way to do it. Thank you though! 👍 $\endgroup$ Commented Oct 26, 2023 at 14:59
0
$\begingroup$

I figured out what was wrong with it!

It never had anything to do with the gltf exporter, after several trials and trying different models and export options I found out that it was my Elbow Constraints, the Elbow Pivot (that the elbow pole target was a child of) had constraints to remain in between the hand and shoulder. I removed the elbow constraints and it works.

Image of three constraints on the elbow pivot bone. First, a copy location to the upper arm, then a copy location to the lower arm at 0.5 influence, and then finally a damped track targeting the hand

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .