yarp
01-11-2004, 08:28 AM
Hi,
this is my first post on the forum. I'm currently trying to do a 3D viewing software and I'm new to OpenGL.
I'm currently trying to render Maya|Wavefront objects. Their face orentation vary from one object to another from clockwise to counter-clockwise and it also seems that some have their normal inverted relative to the face orientation (I mean for example that the polygons are ccw oriented but the normal point toward the cw face - this is I think because they come from MAC). Anyway, setting glFrontFace accordingly to the polygon orientation isn't enough : some objects render correctly others are black (showing their back face) and for some others I see the faces from the inside (inverted normals).
So, what is the way to determine the orientation order of my polygons knowing their normal vector ? And what should I set in the OpenGL engine (glFrontFace or else) to fix this ?
I might have not been clear enough has it was a long explanation, should it be best if I post pictures ?
Thank in advance
this is my first post on the forum. I'm currently trying to do a 3D viewing software and I'm new to OpenGL.
I'm currently trying to render Maya|Wavefront objects. Their face orentation vary from one object to another from clockwise to counter-clockwise and it also seems that some have their normal inverted relative to the face orientation (I mean for example that the polygons are ccw oriented but the normal point toward the cw face - this is I think because they come from MAC). Anyway, setting glFrontFace accordingly to the polygon orientation isn't enough : some objects render correctly others are black (showing their back face) and for some others I see the faces from the inside (inverted normals).
So, what is the way to determine the orientation order of my polygons knowing their normal vector ? And what should I set in the OpenGL engine (glFrontFace or else) to fix this ?
I might have not been clear enough has it was a long explanation, should it be best if I post pictures ?
Thank in advance