Hello, Three.js newbie here. I’m trying to export a skinned character animation from Blender, and display it in my web page.
I have a skinned character in Blender, and if I export it with GLTF, I can load the model into my app and display it just fine.
So then I add an animation in Blender. I put in place two keyframes (at frame 1 and frame 20), rotations only. When I play the animation in Blender, my character flaps its arms up and down. I export this, and now my GLTF has one animation. But I also get a whole bunch of warnings like this, one for each bone:
THREE.KeyframeTrack: unsupported interpolation for quaternion keyframe track named [various bone names].quaternion
Looking into the gltf animation file, I see each bone has a QuaternionKeyframeTrack, which has a:
createInterpolant: ƒ InterpolantFactoryMethodGLTFCubicSpline( result )
in it. The three.js source code implies that CubicSpline isn’t supported for Quaternion animation. So I go into Blender, select each of my two keyframes in the Dope sheet, and set the Key’s Interpolation Mode to Linear. Now when I play back my animation in blender, the arm flapping is at constant speed instead of accelerating in the middle. So not Cubic Spline any more right? Just linear, which is supported.
I re-export as a GLTF from Blender with this new Linear animation… and get exactly the same error message when I load my file with three.js. The factory is still GLTFCubicSpline.
When I try to play back this animation with the AnimationMixer and clipAction calls, I don’t get any error message, but nothing moves! I’m assuming that’s cause of the earlier interpolation warning message, although I don’t know for sure.
Any thoughts as to how to get my animation to play? Thanks in advance.