The current model has skeletal animation, which shows abnormalities in babylonjs but remains intact in Threejs. Is there a problem with parsing bones with gltfLoader in babylonjs?
@bghgary Can you take a look
I didn’t look deeply, but there is a glTF validation error which can cause this type of issue.
{
"code": "SKIN_SKELETON_INVALID",
"message": "Skeleton node is not a common root.",
"severity": 0,
"pointer": "/skins/1/skeleton"
}
I looked at it a bit more. It’s definitely the skeleton
root property. This is often done wrong in export tools. Three.js ignores this property. We have an option in the loader to alwaysComputeSkeletonRootNode
to avoid this problem but it will be slightly slower to load.
Here is a fixed version of the GLB by removing the skeleton
property from the skin
so that the loader is forced to compute it.
Shoved Reaction With Spin.zip (25.8 KB)
It would be best if this is fixed on the export side by either not writing the skeleton root or computing a correct one.
You have 2 options.
- Use
alwaysComputeSkeletonRootNode
at the loading stage - Babylon.js Playground - Fix the model with some DCC tool like Blender.
Okay, I understand now. alwaysComputeSkeletonRootNode
is a temporary solution that mainly needs to be fixed on the export side
Yeah, sorry, this asset has spaces in the URI and my tool for packing/unpacking files doesn’t handle it properly which I will fix.
Here is the unpacked version:
Shoved Reaction With Spin.zip (1.2 MB)
Thanks, I’ll check it out and learn