I don't know if there is a better way, but it looks like the mapping works as such:
geometry.faceVertexUvs[ 0 ][ faceIndex ][ vertexIndex ]
vertexIndex corresponds to the vertex index of the face, and not to the array of vertices of the geometry. While displayed as a number from 0 to 3 (for an ATV), the actual face defines the values as an announcement (from Face4 docs ):
Face4( a, b, c, d ... ) > geometry.faces[0]
Look at this, our mapping!
So, to compare them with each other, we need to find the face in this index and match 0 with a, from 1 to b, etc., and then look at it in the geometry.vertices array. Here's a dumb but functional way:
geometry.vertices[ geometry.faces[faceIndex][ String.fromCharCode(97 + vertexIndex) ] ];
Where vertexIndex matches faceVertexUvs[0][faceIndex][vertexIndex] . fromCharCode maps a to 0 and so on. Now we have a vertex (and its position) for each uv texel! Woooo!
source share