Describe the bug
I am not sure if this is a bug or the nature of the glTF format. I can't export mechanical armatures (no deformation, just parent relations to bones) correctly. Re-importing the file replaces the armature with an empty. Also other tools (https://sandbox.babylonjs.com/) don't recognize this skeleton.
The provided Blender file contains two skeletons (one with parenting and one with deformation). But only the second one can be imported back or used by Babylon.js.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I expect, that i can re-import/use this armature of the exported model.
.blend file/ .gltf
armatures.zip
Version
I think this behaviour is ok.
There is no "bone" in glTF, only nodes. Nodes are used as bone when there is a corresponding weight information linked to it.
When using "Parent to bone", there is no weight, so bone is, in glTF, a regular node.
Except using extra custom info to store info in glTF, and using it again when importing, I can see at first any way to perform it. But this is only a workaround that will work when exporting from Blender and re-importing it again with Blender.
Not sure this is something really useful.
Any thought?
Except using extra custom info to store info in glTF, and using it again when importing, I can see at first any way to perform it...
I'd be nervous about this; it may lead to other software adopting the custom info in inconsistent ways. Might be possible to have the exporter write a skin referencing these nodes as joints, without a mesh weighted to them. I'd need to look more closely at the spec and validator to say if that's allowed. But even that could get messy, because if any bones in the armature _are_ weighted to parts of the mesh, the mesh must include those extra bones in its joint index offsets. 馃槙
Thank you.
i found a workaround for my case. If i add one simple mesh with deformation weights, the whole skeleton of my model (40 bones) gets exported and imported as expected without blowing up the file size with weight data.
Most helpful comment
I think this behaviour is ok.
There is no "bone" in glTF, only nodes. Nodes are used as bone when there is a corresponding weight information linked to it.
When using "Parent to bone", there is no weight, so bone is, in glTF, a regular node.
Except using extra custom info to store info in glTF, and using it again when importing, I can see at first any way to perform it. But this is only a workaround that will work when exporting from Blender and re-importing it again with Blender.
Not sure this is something really useful.
Any thought?