In order to find out which texture vertex corresponds to a mesh vertex, you have to do the following:
- Take the index of the mesh vertex.
- Find out which faces reference the index of the face.
- Note the number of the vertex (1 st , 2 nd or 3 rd - .x, .y or .z) inside each face.
- For each face referencing the vertex, get the texture face with the same index.
- Get the index of the respective texture vertex from the face - 1 st , 2 nd or 3 rd / .x, .y or .z
- The vertex you got corresonds to the mesh vertex we started with.
- Repeat steps 3 to 6 for all faces found.
Same applies to color vertices.