Radar's picture

Whats the logic to handle UVMaps

Hi all,

i have written a LightWave Object importer. So far so good. But when it comes to UVMapping i have two kinds of UVMaps.
One is a normal one, one TexCoords per Vertex and the other one is for discontinous UVMaps. No problems so far.

BUT

I have a box and it is mapped with discontinous UVs. So every of the 8 vertices has more than one TexCoord.
What is the next step now?
Do i split the vertices by polygon? Which would lead to 36 vertices.
Or is there an other way to handle this?

And a bonus-question:
Does it make sense to support multiple UVSets? Since LW Objects can have more than one on a vertex. Or is that nearlly never used in realtime?

Thank you very much!


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
the Fiddler's picture

As far as I know, the usual solution is to have duplicate the vertices.

You might be able to save some memory by using non-interleaved attributes (i.e. upload vertex coords, texcoords, etc into different buffers) but I don't know whether that would be worth the extra management cost.