View Full Version : looking for suggestions for default opengl light settings
can anyone suggest good settings for a default lighting enviroment for a opengl 3d model loader and viewer, for looking at a varietry of models.
Im looking for suggestions on ambient, specular levels, umber of lights and positions etc.
I have a hard time trying to balance, specular levels with too bright a model when it rotates to face the light, and ambient levels the model is too dark and does not stand out from the black background
06-17-2004, 12:22 PM
With a single light :
for ambient : 0.2 0.2 0.2
for diffuse : 1.0 1.0 1.0
for specular: ?? hum a bit harder.
Maybe simple white for specular color and the exponent... try a higher one so that the bright part will not be too large. To test your values, I suggest you put a gray sphere (0.5) and play with the exponent values until it is right.
If you can do it, I would suggest using specular only as "separate specular" ( see the extension doc at http://oss.sgi.com/projects/ogl-sample/registry/EXT/separate_specular_color.txt ) as it gives more interesting results.
With multiples lights, you can get interesting results. One of my favorite setup is a pure diffuse blueish (0,0,0.2) light at the top, same but redish (0.2,0,0)light at the bottom, and a white light with specular at 45° horizontal 45° vertical from the camera. You may want to rotate a bit the two opposed lights, so that it is more natural.
Of course, it depends on the models too, it is important to have a good tesselation, else the (vertex based) lighting will be ugly.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.