ImportMeshAsync won't import skeleton from babylon file

Hello Guys,

I have imported some avatars from the rocketbox library. They were all .max files so I converted them into .fbx and via blender to .glb and finally via the sandbox to .babylon (maybe a little bit unnecessary).

Anyways I open the Babylon file with the sandbox and I can see beautifully the meshes and all bones in the skeleton with its hierarchical order. Now when importing them into my server via BABYLON.SceneLoader.ImportMeshAsync the skeletons won’t show in the browser inspector when logging. I have tried the synchronous counterpart BABYLON.SceneLoader.ImportMesh like the dude example in this playground… Same result. Only the meshes get imported, so the avatar is perfectly visible, but I can’t manipulate the pose without the skeleton.

Now, what am I doing wrong as the Babylon file clearly has the skeletons in it? Or is this some known problem? I am grateful for any help.

Here is my code (it also scales, positions, and rotates every mesh, but shouldn’t be any influence here, I guess):

public LoadAvatar(avatar): void {
        BABYLON.SceneLoader.ImportMeshAsync("", avatar.rootURL, avatar.filename, this._scene).then(result => {
            console.log(result);
            result.meshes.forEach(mesh => {
                mesh.position = avatar.position;
                mesh.rotation = avatar.rotation;
                mesh.scaling = avatar.scale;
            });
        });
}

image

Cheers,
Tim

1 Like

Yup I can see where we missed a spot in our code. In the meantime for your workflow why not keeping the glbs ?

I ll fix the serialization on Monday.

3 Likes

Thank you very much @sebavan for responding and taking the issue into account! I didn’t know it was possible to load .glb, as I am fairly new. But it works like a charm like this! Thanks!

2 Likes