OBJ uv into bufferGeometry with indexed drawing

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.

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() with more than one index buffer.

1 Like