Bone hierarchy exported from blender broken

experienced a problem triying to load blender scene into babylon js. the bone hierarchy in the .babylon file looks ok. bonese are correcly structured.

see L_motor_1 in the jason index=1 parent_id=4 which is L_motor_top (the same with the one in blender). when imported, the L_motor_1 bone becomes armature’s child, not L_motor_top’s child

image

bone hierarchy in blender

bone hierarcy in babylon

animation in blender

playing in browser
image

thanks in advance

Welcome aboard!

Addind @JCPalmer who is the creator of the .babylon exporter for Blender and may know what’s going on.

Also, have you tried to export to gltf/glb and see if that file format works?

thankyou
yes gltf work’s , but lacks of babylon specific features.

What version of Blender are you using? If greater than 2.83, can you attempt with that version?

i use blender 2.8 and 2.9 in ubuntu 20, i was suspecting the exporter too. the results are the same. i think the loader is the culprit. as i mention earlier, when i put the content of the ‘.babylon’ file in the json viewer, it looks fine. the parent child structure are correct.

i previously say (confirms the json file is ok) :

see L_motor_1 in the jason index=1 parent_id=4 which is L_motor_top (the same with the one in blender). when imported, the L_motor_1 bone becomes armature’s child, not L_motor_top’s child

perhaps the problem is when L_motor1 (index 1) initiated before it’s parent (index 4). may be the json parser iterate the bone array from index 0 to 25, so when the iterator arrive at index 1 and try to get other bone at index 4, it fails, then proceeding without assigning parent.

i dont know which loader i should investigate to confirm this. i’m pretty new on typescript and npm. a little pointer would suffice.