Help Needed with Texture Disappearance After Merging Meshes in Babylon.js

Hey Babylon.js Community,

I’m currently working on a Babylon.js project where I’ve created a scene and imported several meshes from a glTF extension file. Everything is going smoothly so far; the meshes are added correctly, and I can see the in-built textures displayed on each mesh.

Now, here’s the challenge I’m facing: I want to treat this group of meshes as a single entity so that I can apply changes like position, rotation, and scaling collectively. To achieve this, I thought I’d use BABYLON.Mesh.MergeMeshes, which is great at creating a single mesh from a bunch of individual ones.

However, here’s where things get tricky. After merging the meshes with BABYLON.Mesh.MergeMeshes, all the in-built textures on the resulting merged mesh seem to disappear.

My Goal:
I’m hoping to find a solution that allows me to merge these meshes while preserving their original in-built textures. The merged mesh should have the combined appearance of the individual meshes, with their respective textures intact.

Request for Help:
I could really use your insights and expertise on this one. If you’ve encountered a similar situation or have a workaround to maintain the textures when using BABYLON.Mesh.MergeMeshes, please share your knowledge. Any tips, tricks, or code examples would be greatly appreciated.Below you can find a couple of screenshots.

Very same behavior occurred on the next playground, but I really couldn`t find a solution to that :

Babylon.js Playground

Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

Thanks a bunch for taking the time to help out! Your experience with Babylon.js is incredibly valuable, and I’m looking forward to your ideas on this matter.

Your meshes have different materials, so if you want to retain their original materials after merging, you should enable the multi-material option (6th parameter of MergeMeshes):


OMG, thank you so much , I can’t believe that I didn’t see that.

Alternatively, if you just need to apply the same transformation to all meshes, you can parent them all to a single TransformNode, it will be faster than merging meshes :slight_smile: Transform Node | Babylon.js Documentation (


That`s also very helpful , I will compare this solution to what I already have. Thank you :grin:

1 Like