Page 1 of 1

Texture coordinate in CStaticMeshOBJ.cpp

Posted: Fri Dec 30, 2005 2:25 am
by loonychewy
I was looking at CStaticMeshOBJ when I noticed this (line 195)

Code: Select all

v.TCoords.Y = -textureCoordBuffer[ facePoints[i][1]-1].Y;
Notice the negation operator. Is it suppose to be there?
With the .obj model I'm using to test, it looks wrong, but after removing the negation operator, the model looks correct.

Posted: Wed Feb 15, 2006 4:43 am
by ltkwan
The negation is to compensate for Maya's coordinate system being inverted relative to Irrlicht's, if you used some other program other than Maya to generate your OBJ file then it may not look right.

Posted: Wed Feb 15, 2006 1:02 pm
by ElementoY
It's more about the OBJ file format being in a different coordinate system, as Blender and others export it inverted correctly.