PDA

View Full Version : Corrupted faces



michael roebbeling
03-14-2005, 07:11 AM
I have an object out of triangles. it is lighted by opengl. i calculated the normals for each face. everything is working fine, except of some strange dark triangles in some of the faces. especially when the object is quite small on the screen.

Any sugestions what to do?

CWiC
03-14-2005, 07:21 AM
Are you sure that your normals have unit lenght or you use gl renormalisation?

michael roebbeling
03-14-2005, 07:50 AM
Yes, they are unified

It only happens with the faces with one normal of 1 in one direction

for example: n = 0,0,1 or 1,0,0 or 0,1,0

Aeluned
03-14-2005, 10:22 AM
just a few things to try.
glEnable(GL_RESCALE_NORMAL);
glEnable(GL_NORMALIZE);

and make sure that the winding on all of your faces is consitent (i.e. vertices should be defined in clock or counter-clock wise for every polygon).