Follow-up of #4131
Does this issue mean that BabylonJS currently does not support loading a skeleton/bones from GLTF scenes?
Nope it means we do not export them from a babylon.js scene
From a loading standpoint we support EVERYTHING from a gltf file :)
Continuing from #6628, this PG:
https://playground.babylonjs.com/#T087A8#7
reproduces the issue.
I think I have a good plan of action here:
Looking at the current result of exporting the alien scene:
alien_babylon_glTF2_export.zip
We can see that our current joint structure is preserved (as we iterate through all nodes in the babylon scene):

well, for the most part anyways...due to #7152 we lose all non-mesh leaf nodes in the scene:

But this should be a trivial fix of removing this conditional we use to evaluate what nodes get exported when traversing the scene tree:
https://github.com/BabylonJS/Babylon.js/blob/v4.0.0/serializers/src/glTF/2.0/glTFExporter.ts#L1342
I'll check this change in as a part of this enhancement.
Now, back to implementation details, looks like we should be able to shim this functionality into createSceneAsync after we convert materials, and create our node map (mainly so that we already have a babylon scene node id to gltf node id to work with)
I should be able to add createSkinsAsync and createMorphTargetsAsync functions (Sticking with the asynchronous convention even though the export is performed synchronously?)
Only major concerns I have right now is in exporting the reverse bind matrix for my skin joints, I fear that LHC/RHC setting will cause some issues, but that a problem for Future Drigaxâ„¢.
I also realize that I need to add proper animation group serialization as well.
I wish Future Drigaxâ„¢ good luck :D
Hey @deltakosh , I'm noticing some divergance between Babylon and glTF's nomenclature for a bone in Babylon, is bone._restPose equivalent to the bind pose? (and therefore would need to be inverted to fit glTF's schema?)
Yes it is
I am using
https://playground.babylonjs.com/#T087A8#13
as a test scene for the morph target and skeleton round-tripping.
Hey @Drigax , I know you are working very hard on this job, I just want to know when you fix this problem, I've been following it since last year, version 4.1. I have a project and really need GLTF serializer with animation.
thank you
Skinning is in via #8513, working on Morph targets now
Morph target animation is in via #8780 😎 Its been a journey folks.
Congrats!
Most helpful comment
Hey @Drigax , I know you are working very hard on this job, I just want to know when you fix this problem, I've been following it since last year, version 4.1. I have a project and really need GLTF serializer with animation.
thank you