After gltf coordinate conversion, the model is not displayed

Refer to this post

The parent level of the imported model is removed, but the model is not displayed

This is my example

 let snowBall = await BABYLON.SceneLoader.ImportMeshAsync("","scenes/BoomBox/", "BoomBox.gltf", scene);
     const snowBallParent = snowBall.meshes[0];
      snowBall = snowBallParent.getChildMeshes().slice(1);

Heya, the root mesh only had one child mesh so slice(1) was returning an empty array. So I just changed it to slice(0) and it’s working. :slight_smile:

After I removed the parent node and changed the texture in gltf, the texture map was still wrong. Is there any step I missed

function fixImg(scene){
    const id ='Rectangle2059392382';
    const  imgmesh = scene.getMeshByID(id);
    //mesh.material, "emissiveColor", Color3.White()
    imgmesh.material.emissiveTexture=new Texture('/img/13470259.jpg');

Trying passing false to not invert the texture (for the fourth param). Otherwise will prob need a PG for it.

new Texture('/img/13470259.jpg', scene, true, false)
1 Like

I found that after the root of transformnodes is removed, the child node mapping of transformnodes is still wrong

not sure what you mean @qqqzhch could you share a playground highlighting your issue ?

1 Like

I think the problem is that your’e removing the parent from all descendants of the root mesh, not just its direct descendants. If you pass true to getChildMeshes() then you can remove the parent for just the meshes that have the root mesh as their parent. Otherwise if there’s still an issue a new PG will help us get to the bottom of it. :slight_smile:

snowBall = snowBallParent.getChildMeshes(true).slice(0);
1 Like