I have a simple sphere exported from 3DS Max in .obj format. I noticed that I have more UVs than vertices. I parsed the file with a simple program I wrote and then I put the various vertices and UVs coordinates and indeces in WebGL buffers. The result is that the texture is mapped to the sphere, but it is highly distorted. I tried using differend UV unwrap methods, but there still is a lot of distortion, all over the model.
So I'm thinking that maybe I'm using the wrong UVs coordinates. Right now I'm really just parsing the coordinates, and then applying them in the order they come. For example, I have 482 vertices and 559 UV coordiantes, so I just match them in the order they come (Vertex 1 gets UV 1, Vertex 2 gets UV 2...) and then the remaining 77 coordinates are unusued (I assume, I just load them in the buffer and let WebGL do its thing really).
So I thought maybe I should use those later coordinates instead of the early ones. Like, if I have a vertex with two or more sets of coordinates, use the last one I find while parsing the file. Or maybe I'm just plain wrong, can you give me some help? Thank you