# External texture doesn't match GLB model without changing flipY

**URL:** <https://discourse.threejs.org/t/external-texture-doesnt-match-glb-model-without-changing-flipy/42847>\
**Category:** Questions\
**Tags:** textures, gltf\
**Created:** [September 23, 2022, 9:31am UTC](https://discourse.threejs.org/t/external-texture-doesnt-match-glb-model-without-changing-flipy/42847 "2022-09-23T09:31:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tfoller](https://avatars.discourse-cdn.com/v4/letter/t/3e96dc/32.png) [@tfoller](https://discourse.threejs.org/u/tfoller)\
**Post date:** [September 23, 2022, 9:31am UTC](https://discourse.threejs.org/t/external-texture-doesnt-match-glb-model-without-changing-flipy/42847/1 "2022-09-23T09:31:06Z")

</div>

I export this model from Blender into GLB file with no material or texture.

![uvtest_01](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/f/7/f72705579ed6fa40ce75e775a0a043b07c831b67.png)

If I drop the GLB model into babylon sandbox and add external ambient texture it matches the shape:

![uvtest_02](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/7/d/7d2a4e2532b0d8abfa46a9d1a24ac2b5134c6760.png)

If I import the model into THREE and apply the same texture it doesn’t match:

![uvtest_03](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/f/2/f2fc76398009ec9fc0dfc37e3b93631872d7a213.png)

> **[Edit fiddle - JSFiddle - Code Playground](https://jsfiddle.net/tfoller/m2zqt8bu/)**
>
> Test your JavaScript, CSS, HTML or CoffeeScript online with JSFiddle code editor.

I can fix this by setting **flipY = false** to the texture but then if I want to measure UV from the texture in an image editor I need to count V axis from the top down, which makes things confusing.

Is it me doing something wrong here and is there a way to make this simpler w/o flipping in code and/or in the texture editor?

---

<div class="post-metadata">

**Author:** ![donmccurdy](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/donmccurdy/32/33209_2.png) [@donmccurdy](https://discourse.threejs.org/u/donmccurdy)\
**Post date:** [September 23, 2022, 2:52pm UTC](https://discourse.threejs.org/t/external-texture-doesnt-match-glb-model-without-changing-flipy/42847/2 "2022-09-23T14:52:01Z")

</div>

The UV coordinate convention used in glTF requires setting `.flipY=false` to textures using its UV maps. You’re not doing anything wrong here; this is also mentioned in the [GLTFLoader documentation](https://threejs.org/docs/index.html?q=gltflo#examples/en/loaders/GLTFLoader).

Either thinking of V ∈ [0, 1] as top-down, or else converting by `v = 1 - v`, are both fine options here I think.

---

<div class="post-metadata">

**Author:** ![tfoller](https://avatars.discourse-cdn.com/v4/letter/t/3e96dc/32.png) [@tfoller](https://discourse.threejs.org/u/tfoller)\
**Post date:** [September 23, 2022, 2:57pm UTC](https://discourse.threejs.org/t/external-texture-doesnt-match-glb-model-without-changing-flipy/42847/3 "2022-09-23T14:57:32Z")

</div>

Ok, thank you, out of curiosity, why set the top left corner and then have all these confusing flippings and extra code, wouldn’t it be better to set it normally like in opengl?

---

<div class="post-metadata">

**Author:** ![donmccurdy](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/donmccurdy/32/33209_2.png) [@donmccurdy](https://discourse.threejs.org/u/donmccurdy)\
**Post date:** [September 23, 2022, 3:15pm UTC](https://discourse.threejs.org/t/external-texture-doesnt-match-glb-model-without-changing-flipy/42847/4 "2022-09-23T15:15:15Z")

</div>

I’m afraid there’s not really a clear convention in graphics, e.g. even Unity and Unreal have different conventions for UV coordinates. WebGL requires “flipY=true” to get 0,0 = lower left, this isn’t a decision made by three.js. Not sure why glTF went with 0,0 = upper left, but it does enable GPU texture compression (e.g. KTX2 / Basis / ASTC / …) which are not compatible with “flipY=true”. Otherwise you’d need different UV conventions for compressed and uncompressed textures.
