PDA

View Full Version : Problem loading textures in game engine - open gl



Nuvuait
05-26-2011, 08:36 AM
Hi,

As a 3d modeller I've been working with a programmer using an opengl based game engine. The file format were exporting the models is .obj We've been having problems trying to load up textures in the game engine, the textures seem to be inaccurately placing itself on the models even though the uv-map is correct. It seems to correspond perfectly in Maya but I don't know why it appears off in the game engine. Here's a couple of real time renders in the game engine.
The last 2 links is the actual raw uv-map texture with the lines and whatnot.

http://imageshack.us/photo/my-images/860/screenshot20110526at314.png/
http://imageshack.us/photo/my-images/860/screenshot20110526at314q.png/
http://imageshack.us/photo/my-images/813/screenshot20110526at121.png/
http://imageshack.us/photo/my-images/190/screenshot20110526at121.png/
http://imageshack.us/photo/my-images/714/screenshot20110526at121.png/

http://imageshack.us/photo/my-images/231/screenshot20110526at121.png/
http://imageshack.us/photo/my-images/706/screenshot20110526at121.png/

As you can see around the joins of the limbs the textures are skewed and oddly transparent in some parts.

ZbuffeR
05-26-2011, 09:38 AM
It might be the way the coordinates are wrapped or "modulo-1-ized".
Can you verify if affected texcoord are outside the [0:1] range ?

Nuvuait
05-26-2011, 05:45 PM
Hey, the affected texoords are within 0:1 range.

This is from the uv texture editor in Maya for one of the models (the 3rd link)

http://imageshack.us/photo/my-images/830/uvtextureeditor.jpg/

ZbuffeR
05-26-2011, 11:56 PM
I see that adjacent faces can have disjoint texture coords. That mean the loader probably store only one vertex data (texcoord+position) per vertex, whereas it should be 1 vertex data per vertex per triangle.

If this is not clear enough, feel free to ask for details.