# Texture Merging when importing GTLF

**URL:** <https://forum.babylonjs.com/t/texture-merging-when-importing-gtlf/5799>\
**Category:** Questions\
**Created:** [September 22, 2019, 6:46pm UTC](https://forum.babylonjs.com/t/texture-merging-when-importing-gtlf/5799 "2019-09-22T18:46:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Calsa](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/calsa/32/4330_2.png) [@Calsa](https://forum.babylonjs.com/u/Calsa)\
**Post date:** [September 22, 2019, 6:46pm UTC](https://forum.babylonjs.com/t/texture-merging-when-importing-gtlf/5799/1 "2019-09-22T18:46:03Z")

</div>

I am wading through some optimization questions and had one I did not see documentation on.

Is there a built in way to, when importing multiple GTLF (or other formats) to prevent babylon from creating new, unique materials for each model that shares a texture, but instead instances existing materials and textures? So, different files, have the same texture / material (including names) so why not use the same material just instanced to optimize?

If no built in way exists, is there a way to override default mesh import to scan incoming models during loading and instance materials?

Beyond my naming convention is a mess, this shows what I mean, all those “no name” are the same texture… all the “Material #22”… ext… The same goes for my texture maps.

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/2/24ecb920f45c8c24a84b19abf1964a18de93357a.jpeg)

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [September 23, 2019, 4:08pm UTC](https://forum.babylonjs.com/t/texture-merging-when-importing-gtlf/5799/2 "2019-09-23T16:08:57Z")

</div>

We cannot assume such optimization because you may want to control various materials later on (like changing a part color).  
If an optimization has to append, it must be done either inside the DCC tools or afterwards by the developer.

Knowing your constraints, you can browse your meshes, get the common material and apply it to the right meshes
