Indexed vertices with UV map ?

Started by
3 comments, last by Amma 20 years, 8 months ago
Hi, I''d very much like to use indexed vertices. However, it seems that UV maps can''t be shared (well at least for most meshes). -How do you guys solve that? ----------------------------- AM
-----------------------------Amma
Advertisement
I''m not sure what you mean exactly by a UVmap. Do you mean the texture or the coordinates? You can set the coordinates with glTexturePointer(...). And then just pass it an array with the texture coordinates (openGL will use the index array to index into this array similar to the vertexArray --> the texture array should have the same amount of points as the vertexarray (although each vertex has three values (x,y,z) and each texcoord only has two (u,v) )
I''m talking about the UV texture coordinates.

the thing is, that although two vertices has the exact same position, normal, and color - it''s VERY unlikely that they have the same UV map. -At least according to 3DS Max.





-----------------------------
AM
-----------------------------Amma
ah yes. That is a problem. I had it myself not a month ago. Check this thread, it should give you some ideas.

And the fact that this happens isn't 'VERY likely'. It's just a by-product of irregular models, that you have to split the uv-space somewhere, in order to fit a 2d plane on a 3d model (which is essentially what you are doing). I would think in an average model just under 50 % of the vertices will have multiple texcoordinates, but that is just guess from past experience making models.

[edited by - rick_appleton on August 13, 2003 8:41:26 PM]
ok, thanks - I''ll just have to reuse vertices.




-----------------------------
AM
-----------------------------Amma

This topic is closed to new replies.

Advertisement