Hi everybody,
I have a question about the gltf import. If i import the same gltf asset several times, materials are created several times.
Is it possible to keep the former materials instead of creating them again and again ?
Thanks,
Boris
Hi everybody,
I have a question about the gltf import. If i import the same gltf asset several times, materials are created several times.
Is it possible to keep the former materials instead of creating them again and again ?
Thanks,
Boris
Hi. Maybe you don’t need import same file again? Simply save your model in variable and reuse
I need to place it in several positions. So i need several copies of my mesh. But maybe i don’t understand exactly what you’re proposing.
You can use instancing to have multiple meshes sharing materials. Will also have a performance boost.
Instances | Babylon.js Documentation (babylonjs.com)
I thought @brianzinn gave me the solution but it’s a little bit more difficult because my mesh is made with several submeshes and nodes and i cannot find the tree structure anymore.
Here’s the playground : https://playground.babylonjs.com/#3PE956#1