I make a origami paper folding animation in blender using AnimAll extension to animate the vertices. I exported the gltf to contain the vertex animations using the method told by @domncurdy and it got exported fine with all the animations (i tested running the file on babylon’s viewer). It is not working fine on three js though. The animations are showing entirely different result. See the attached video.
let object = (gltf.scene || gltf.scenes[0]).children[0];
scene.add(object);
mixer = new THREE.AnimationMixer(object);
mixer.clipAction(gltf.animations[0]).play();
But I don’t know for sure if that’s why threejs can’t render it… i’m surprised it would break it entirely, and BabylonJS seems to render it OK. So I’ll have to keep looking at that.
Ok, the file you uploaded earlier is working in my viewer (https://gltf-viewer.donmccurdy.com/) except for one bug: the viewer thinks the object is much bigger than it is, and so the camera projection settings basically make it invisible. If I fix that (note I didn’t deploy the fix yet), I get a good result:
I do think there is a bug worth fixing in threejs here, but it shouldn’t block your demo from working… Can you share the code you’re using to view the model and play the animation? I’m wondering if there’s a mistake there, or if you made the same mistake I did.
I don’t have the exact bowl.glb model that is referenced in your code, but the file you attached above does seem to work if I drop it into that example. I tested with three.js r114.
Hi, @Click_Clock_Boom . I searched a lot but I can’t find this method to export from Blender using AnimAll (I’m animating vertices). Can you post here how, please?
Vertex animation isn’t supported by engines, or by glTF, so you’ll need to bake the animation into a series of morph targets. You can do this by:
Enable the MDD addon in Blender (Edit -> Preferences -> Add-ons).
Export to MDD (point cache).
Import the MDD file back into Blender.
Export to glTF again.