Blender to gltf, walk cycle animation shortly pauses in the beginning

Here is a walk cycle animation I created. In blender, it’s running smooth trough the whole cycle:

In Babylon (and three.js too) I have the problem that the animation pauses for a short time in the beginning (when right foot is approaching the ground):

As both babylon and three have this behaviour, I thought this would be a bug in the blender exporter. But if I import the glb in blender, it is playing without a pause. I noticed that the playback range did not seem to have been exported, as blender imported it with 250 frames while the animation is only 24 frames long.
Because in my animation the 1st and 25th frame are the same and I have set it to end at 24, I thought babylon might be playing the 25th frame (twice the same as 25 = 1) due to blender not exporting the animationLength. Thus I set a KeyFrame at frame 24 and deleted the KeyFrame at frame 25, but this did not help either.

I’m out of Ideas on where to look for the problem anymore. I’d appreciate some input on that. If necessary I could upload the blender file.

Did you bake your animations keys, to test with 1 key per frame?

1 Like

Thanks that doesn’t solve it, but through that I found out, that babyloon indeed seems to be playing frame 25 + 1 which leads to the pause. If I bake the animation, or set a KeyFrame at frame 24 and remove the one at 25 I don’t have this double playing anymore.
But then I have the problem that there is no interpolation between the last and the first frame of the animation, thus the foot jumps a bit.

I guess that might be a bug with the Limit to Playback Range option in Blender.

Maybe using a Cycles modifier, then baking could help key interpolation?

One thing is, did you import this animation into Blender? There is an old topic that did that, and they had the frame rate set at the default of 24. This will change the time of each frame slightly.

Regardless of whether of importing or not, it is a good idea to change the frame of your scene friendly to 60 & 30 for exporting. See

Another options is to use the Bablyon JSON exporter.

Thanks to both of you. I found the issue, it is a bug in the blender exporter. In gltf2 animations start at t=0, in blender animations start at t=1 by default. The blender exporter doesn’t take this into account and stores animations in gltf2 beginning with t=1 (or wherever you startet it). Thus there is a small pause at the beginning of the animation.

Shifting the animation by one to the left in blender, to start at t=0 is a workaround for that.

1 Like

Animation seems to always use frame_start = 0 · Issue #387 · KhronosGroup/glTF-Blender-IO · GitHub :wink:

1 Like