# UV map displaying incorrectly in babylonjs

**URL:** <https://forum.babylonjs.com/t/uv-map-displaying-incorrectly-in-babylonjs/58051>\
**Category:** Questions\
**Tags:** material\
**Created:** [April 25, 2025, 9:47am UTC](https://forum.babylonjs.com/t/uv-map-displaying-incorrectly-in-babylonjs/58051 "2025-04-25T09:47:50Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Justinduy\_nguyen](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/justinduy_nguyen/32/45586_2.png) [@Justinduy\_nguyen](https://forum.babylonjs.com/u/Justinduy_nguyen)\
**Post date:** [April 25, 2025, 9:47am UTC](https://forum.babylonjs.com/t/uv-map-displaying-incorrectly-in-babylonjs/58051/1 "2025-04-25T09:47:50Z")

</div>

Texture showed on model is different from blender.

 ![Screenshot 2025-04-25 164233](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/2/c/2c0ce517195f90f0b7e47f642e256ac927c896fd.jpeg)  
 ![Screenshot 2025-04-25 164335](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/9/3/935a51fedc2ecadaf81cc3daf91ecd3050532489.jpeg)

I tried to adjust offet, scale but it not working.  
Thank you

---

<div class="post-metadata">

**Author:** ![Cedric](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/cedric/32/2742_2.png) [@Cedric](https://forum.babylonjs.com/u/Cedric)\
**Post date:** [April 25, 2025, 12:35pm UTC](https://forum.babylonjs.com/t/uv-map-displaying-incorrectly-in-babylonjs/58051/2 "2025-04-25T12:35:05Z")

</div>

Is there any UV matrix transformation applied to UV?  
Is back face culling disabled and geometry doubled? (doesn’t quite look like that but better check)  
Did you export using gltf? did you try other format like obj?

cc @PatrickRyan

---

<div class="post-metadata">

**Author:** ![labris](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/labris/32/12576_2.png) [@labris](https://forum.babylonjs.com/u/labris)\
**Post date:** [April 25, 2025, 2:12pm UTC](https://forum.babylonjs.com/t/uv-map-displaying-incorrectly-in-babylonjs/58051/3 "2025-04-25T14:12:18Z")

</div>

Does this error also happens in [Sandbox](https://sandbox.babylonjs.com/)?  
Does it happen in other GLB viewers, like [glTF Sample Viewer](https://github.khronos.org/glTF-Sample-Viewer-Release/) or [https://gltf.report/](https://gltf.report/) ?

---

<div class="post-metadata">

**Author:** ![shaderbytes](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/shaderbytes/32/174_2.png) [@shaderbytes](https://forum.babylonjs.com/u/shaderbytes)\
**Post date:** [April 25, 2025, 2:28pm UTC](https://forum.babylonjs.com/t/uv-map-displaying-incorrectly-in-babylonjs/58051/4 "2025-04-25T14:28:08Z")

</div>

you probably have multiple UV channels and the export somehow did not assign the texture to the correct channel. load your model in a sanbox , open the inspectors and check the textures uv channel

---

<div class="post-metadata">

**Author:** ![PatrickRyan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/patrickryan/32/3417_2.png) [@PatrickRyan](https://forum.babylonjs.com/u/PatrickRyan)\
**Post date:** [April 25, 2025, 5:22pm UTC](https://forum.babylonjs.com/t/uv-map-displaying-incorrectly-in-babylonjs/58051/5 "2025-04-25T17:22:49Z")

</div>

@Justinduy_nguyen we are all assuming that your texture is loaded through a glTF file which contains your material assignments. If you don’t do it that way - maybe you loaded an obj file and textures separately and created your material in Babylon - you could be running into an issue where you need to invert Y on your texture. We use the DirectX API for Babylon which expects the first pixel of an image to be at the top of the image. The glTF format assumes the OpenGL API which expects the first pixel of the image to be at the bottom of the image. If we load a glTF file with embedded textures, we take care of setting flags on the textures to enable them to display correctly. However if your textures were authored as OpenGL format and loaded separately, you will need to [invertY](https://doc.babylonjs.com/typedoc/classes/BABYLON.Texture#inverty) on load.

---

<div class="post-metadata">

**Author:** ![vx9](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/vx9/32/28120_2.png) [@vx9](https://forum.babylonjs.com/u/vx9)\
**Post date:** [April 28, 2025, 3:31am UTC](https://forum.babylonjs.com/t/uv-map-displaying-incorrectly-in-babylonjs/58051/6 "2025-04-28T03:31:02Z")

</div>

If you have multiple UV’s delete the unused one (if you’re sure it isn’t used), or if you need more than one UV, try adding a UV map node to specify which one each image should use:

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/d/5/d519e1c27ec447cf004d722db80d6b08c95bd6c4.png)

Here is an example, UV’s specified for each image.

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/3/c/3c69cbb8b2a86ca279bdb914c496e99e6ca4d694.jpeg)

After the GLB exports it’s fine, as can be seen from Sandbox:

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/8/f/8fb24a17e2db09c4ad1362a073c3459e90722f3c.jpeg)

Before I ran into a problem with older versions of Blender, which seemed to ignore the active/assigned default UV (the one with the camera icon active) when exporting GLBs. It would default to the first one.

So this would happen:

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/c/a/cae83d592f5bbc49e1db6bb6cc63ced0789b5c67.jpeg)

Manually adding the UV map node will make sure the image uses the correct UV.

---

<div class="post-metadata">

**Author:** ![PatrickRyan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/patrickryan/32/3417_2.png) [@PatrickRyan](https://forum.babylonjs.com/u/PatrickRyan)\
**Post date:** [April 28, 2025, 5:20pm UTC](https://forum.babylonjs.com/t/uv-map-displaying-incorrectly-in-babylonjs/58051/7 "2025-04-28T17:20:04Z")

</div>

> [@vx9](#):
>
> If you have multiple UV’s delete the unused one,

If there are multiple UV sets for a mesh - maybe they are needed or extra - you will want to tell each texture in your material which UV set to use. You can [simply set the coordinatesIndex](https://doc.babylonjs.com/typedoc/classes/BABYLON.Texture#coordinatesindex) on the texture to the correct UV set index. The UV sets start at index 0 and are held in an array in the order they appear in your DCC tool.

---

<div class="post-metadata">

**Author:** ![vx9](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/vx9/32/28120_2.png) [@vx9](https://forum.babylonjs.com/u/vx9)\
**Post date:** [April 28, 2025, 5:52pm UTC](https://forum.babylonjs.com/t/uv-map-displaying-incorrectly-in-babylonjs/58051/9 "2025-04-28T17:52:23Z")

</div>

@PatrickRyan  
Good point, thanks! I’ve edited my post to make it more clear.
