PDA

View Full Version : Lighting and call list



nexusone
08-29-2002, 04:34 PM
I have made a group of triangles, which I am build with a calllist.
I have setup the lighting normals, but some triangles don't track the light, they stay full light.

Does direction of how each triangle vectors is assemble effect the lighting? This is something I suppect that some could be CW and others CCW.

Thanks

Gavin
08-29-2002, 11:55 PM
Don't know what gl does but normally the order of vertices defines front/back when you calc normals etc.

t0y
08-30-2002, 08:53 AM
Try setting your lighting model with two-sided lighting, and setting GL_FRONT_AND_BACK in your materials. If the winding is wrong, the triangles will respond to light in a "negative" way (can't find a better way to say it http://www.opengl.org/discussion_boards/ubb/wink.gif).

Other reason could be that it has something to do with having too much ambient light, or with the way you're ordering your operations. The light should be positioned before the geometry it is supposed to affect.