Texture coordinate in CStaticMeshOBJ.cpp

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
loonychewy
Posts: 22
Joined: Fri Dec 30, 2005 2:00 am
Location: Singapore
Contact:

Texture coordinate in CStaticMeshOBJ.cpp

Post 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.
ltkwan
Posts: 1
Joined: Wed Feb 15, 2006 4:35 am

Post 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.
Phasespace Motion Capture Systems
www.phasespace.com
ElementoY
Posts: 15
Joined: Sun Feb 05, 2006 3:40 am
Location: Brazil
Contact:

Post by ElementoY »

It's more about the OBJ file format being in a different coordinate system, as Blender and others export it inverted correctly.
Post Reply