I have a car with a 2D texture on it in 3DSMax. Now I convert this 3DS file to OBJ. Then I read this file in by ignoring the Z values of each texture coordinate since all of them are zero and OpenGL ES ignores them. The problem is that the texture appears INSIDE my car not on the outside as if the material is being shown inside.

Are there any suggestions? I have attached the OBJ file to this topic. What I am doing in the OBJ file is that I am reading all the Faces, which have vertices and texture coordinates. So it's a lookup table. Then I get those vertices' X, Y and Z and then I get that vertex's texture coordinates in the X, Y format as GLfloat. So I am ignoring the Zs which are always 0.0. Then I am reading that whole array into the memory and displaying it all at once. It seems like I can see through the texture or in other words, the texture is INSIDE the object.

I don't know but it looks weird. Any ideas?
Attachments:
Posted on 2008-12-17 05:34:18 by XCHG
Try flipping the surface normals in your modeller.
Posted on 2008-12-17 06:51:10 by Homer
Hi Homer,

I am not using any normals. I am just using the vertices and the texture coordinates. Do I have to use normals? How do I use them? What are they for? I have absolutely no idea.
Posted on 2008-12-17 07:01:11 by XCHG
Screenshot, please? ^^
Posted on 2008-12-17 13:29:24 by ti_mo_n
It sounds like your triangles are being drawn with the wrong winding order - as an experiement, try disabling backface culling.
Posted on 2008-12-17 17:49:32 by Homer
Okay it is fixed now. Thank you all for your help. It was a problem with setting depth buffers on the iPhone. I have attached the BEFORE and AFTER images to this post.
Attachments:
Posted on 2008-12-18 06:51:21 by XCHG