Click to See Complete Forum and Search --> : opengl normals lighting


c94wjpn
September 30th, 2004, 06:14 AM
ok I know this might seems a daft question. Does the front and back of a polygon get the same lighting?

I've got my light source where the camera is, and I find that when I look at one side of the polygon, it's black, and the other side is lit. I've set the same material characteristics on both sides, so why is this? Is GL thinking it's only going to light the surface if it's facing towards the light source?

Mike Harnad
September 30th, 2004, 08:58 AM
Do you specify GL_LIGHT_MODEL_TWO_SIDE on the call to glLightModel?

TheCPUWizard
September 30th, 2004, 09:04 AM
Lets try an experiment...

1) Make a physical polygon out of some solid material.
2) Go into a room with only a single source of light.
3) Hold the polygon so that it is "normal" to the light source.
4) Look at one side...
5) Look at the other side....

Seriously, this is exactly what you have configured. As pointed out there are ways to change the lighting configuration.

The methodology depends on your goal.

c94wjpn
September 30th, 2004, 09:05 AM
ok thanks for the advice.