Now this is more a note than a question, and maybe more related to Blenders gltf Exporter than to Babylonjs itself, sorry in advance.
But chances are that there are other creators arround here that will maybe deal with the same problem…
My current workflow for animated characters that are about to be exported looks like this (this could be not even Blender-specific):
- Skinned Mesh(s), bound to a minimum skeleton via (vertex) weight groups
- The minimum skeleton, controlling the meshes
- More skeletons (“rigs”) controlling the minimum (why one would do this is another topic, but its pretty handy for complex animations such as walk cycles)
With this setup, only the controlling rigs will be animated and baked to actions.
But when exporting to gltf, my animations got lost most of the time, unless i put it all into a single successive, global animation and divded the actions after the import by frame number sagain. Pretty ugly.
The exported actions did not have any impact on the skinned meshes, because the minimum skeleton was not affected by animations in Blender directly, but only through constraints.
Finally i came up with the solution to bake all actions once more into the minimum skeleton manually, doing Visual Keying and Bake Data to Pose when Bake Action… in Blender.
Until now i did not find a way to prevent the export of the rigs completely, but at least the meshes are affected now by the (manually) baked actions as expected and occur as animation groups in the gltf.
I hope this saves someone some time of frustration as it really took me a while to figure out the problem and solution…