Hi. I want to store AnimationClip instances to disk (cloud storage). If I try to use GLTFExporter with options {animations: [animationClip]}
and no character model it fails with an error as it is looking for meshes and other things. So I assume I need to provide a “skinny skeleton”.
Is there a definition somewhere of the minimum parts of a GLB file needed capture the morph and bone names needed to export an AnimationClip in a GLB file? (I am tracing through the code, but it does not feel very efficient!)
The skeleton hangs off the SkinnedMesh, so you’ll probably need that at minimum for skinned animation. Then morph targets interact with the geometry, so if you’re exporting those, you may also need at least the pure geometry of the skinnedmesh (as opposed to maybe getting away with an empty geometry just for skinning). This is just a guess tho.
I am starting to think I need to retarget the animation clip to a different, light weight model that I create and store with the animation. Bone animation clips care about bind poses etc, so it’s proving hard to store an animation clip without a model and load it back in again… I guess that is what mixamo does.
2 Likes
I think that’s roughly what the glTF format requires — character animations require that nodes for the animated joints exist, and morph target animations must target a mesh with real morph targets. Simplified mesh (e.g. a cube) could be fine. Mixamo is mostly using FBX, I’m not sure about the format internals involved there.