View Full Version : No true darkness?

11-15-2000, 04:33 PM
I've jacked the ambient light all the way down to: ambientlight[4]={0,0,0,1}; and I only have a single lightsource.

But for some reason, the dark side of an object (say, a planet) is still, albiet barely, distinguishable. Although under many curcumstances it would appear to be totally black, if I have my brightness turned way up, I can see that it is definately not totally devoid of illumination. How can I ensure that the back side of a planet or whatever is TOTALLY un-illuminated if there's NO light on it? Thanks!

11-15-2000, 05:36 PM
check the global ambient value....

,0.2, 0.2, 0.2, 1.0)

is the default you need

,0.0, 0.0, 0.0, 1.0)

the notorious mr x

11-15-2000, 05:50 PM
better yet.... if all or your vertices are of the color 0,0,0,1 (if you are just using materials then issue a glColor4f(0,0,0,1) on startup (or you can just do this for all the vertices)
then just issue glDisable(GL_LIGHTING);

11-16-2000, 05:54 AM
Thanks for the tip, but I don't quite understand the second tip... If I disable GL_LIGHTING, won't I also lose the lightsources I DO want? Thanks again!

Michael Steinberg
11-16-2000, 06:02 AM
Yep, you need to set the ambient light level, since you need the lightsources.

11-16-2000, 06:29 AM
helps not to post when you are not awake.... the first tip is correct

11-16-2000, 07:52 AM
Okay, thanks! I appreciate it!