# OBJ uv into bufferGeometry with indexed drawing

**URL:** <https://discourse.threejs.org/t/obj-uv-into-buffergeometry-with-indexed-drawing/12827>\
**Category:** Questions\
**Tags:** geometry\
**Created:** [February 18, 2020, 6:37am UTC](https://discourse.threejs.org/t/obj-uv-into-buffergeometry-with-indexed-drawing/12827 "2020-02-18T06:37:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kamjam21xx](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/kamjam21xx/32/6442_2.png) [@Kamjam21xx](https://discourse.threejs.org/u/Kamjam21xx)\
**Post date:** [February 18, 2020, 6:37am UTC](https://discourse.threejs.org/t/obj-uv-into-buffergeometry-with-indexed-drawing/12827/1 "2020-02-18T06:37:26Z")

</div>

So i wanted to use bufferGeometry with indexed draws, and… my .obj uv data is indexed seperately. how do i handle indexed uv data with three.js. is it supported?

vertex[1] may correspond to UV[5,7,8,2,4,6] etc. but i dont see an attribute for UV indices.

do i need to take my indexed data and make an algorithm to push faces with the corresponding uv data? because i would love to avoid that.

---

<div class="post-metadata">

**Author:** ![Mugen87](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mugen87/32/5645_2.png) [@Mugen87](https://discourse.threejs.org/u/Mugen87)\
**Post date:** [February 18, 2020, 9:40am UTC](https://discourse.threejs.org/t/obj-uv-into-buffergeometry-with-indexed-drawing/12827/2 "2020-02-18T09:40:46Z")

</div>

> [@Kamjam21xx](#):
>
> do i need to take my indexed data and make an algorithm to push faces with the corresponding uv data? because i would love to avoid that.

You exactly have to do this. `three.js` only offers a single index buffer for the entire vertex data. Simply because that’s what the underlying WebGL API expects. You can’t use [WebGLRenderingContext.drawElements()](https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/drawElements) with more than one index buffer.

---

<div class="post-metadata">

**Author:** ![manthrax](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/manthrax/32/2596_2.png) [@manthrax](https://discourse.threejs.org/u/manthrax)\
**Post date:** [March 31, 2025, 10:18pm UTC](https://discourse.threejs.org/t/obj-uv-into-buffergeometry-with-indexed-drawing/12827/3 "2025-03-31T22:18:23Z")

</div>

Are you loading via MTL/OBJLoader ? I would expect it to do this unroll for you.
