aso3
08-16-2006, 07:32 PM
Hi,
I'm using LightWave to generate Atlas coordinates for a lightMap. After that, I try to load it into my game engine. However, I often have problems with the texture coordinates it generates. It's caused by shared texture coordiantes. LightWave doesn't seem to have problems with them, by my importer gets confused.
For example, I make a simple box. This box has 6 faces and 8 vertices. That means some of the vertices are shared by 3 faces. When I generate the Atlas texture, you can see this in the UV view; some of the polygons are projected, but are missing 1 or more vertices.
My importer now has a problem. Each vertex can hold 1 lightMap texture coordinate. I don't know exactly how LightWave stores it in the LWO file, but I guess multiple UV coords from that Atlas are now referring to that vertex.
Anyway, the only way to fix this for me, is to seperate the cube faces. I could unweld all vertices to avoid this. But now all the triangles are mapped seperate on the Atlas (taking more space and more vulnerable for artifacts while rendering a lightMap). So, I pick each face by hand, cut it, and
then paste it again so its loose from its neighbours. In case of the cube I get a up,left,down,right,forward and backward face.
This is easy with a cube, but what if the world is far more complex? Is their a more efficient way to avoid these problems?
Greetings,
Rick
I'm using LightWave to generate Atlas coordinates for a lightMap. After that, I try to load it into my game engine. However, I often have problems with the texture coordinates it generates. It's caused by shared texture coordiantes. LightWave doesn't seem to have problems with them, by my importer gets confused.
For example, I make a simple box. This box has 6 faces and 8 vertices. That means some of the vertices are shared by 3 faces. When I generate the Atlas texture, you can see this in the UV view; some of the polygons are projected, but are missing 1 or more vertices.
My importer now has a problem. Each vertex can hold 1 lightMap texture coordinate. I don't know exactly how LightWave stores it in the LWO file, but I guess multiple UV coords from that Atlas are now referring to that vertex.
Anyway, the only way to fix this for me, is to seperate the cube faces. I could unweld all vertices to avoid this. But now all the triangles are mapped seperate on the Atlas (taking more space and more vulnerable for artifacts while rendering a lightMap). So, I pick each face by hand, cut it, and
then paste it again so its loose from its neighbours. In case of the cube I get a up,left,down,right,forward and backward face.
This is easy with a cube, but what if the world is far more complex? Is their a more efficient way to avoid these problems?
Greetings,
Rick