Good lighting

Hi
I’ve been programming using opengl for a while now but I haven’t worked on anything big yet
I was wondering if anyone could point me in the direction of any resources that would let me get “good” lighting in my opengl scene
ie realistic enough but interactive
when the scene gets pretty complex the default opengl lighting just looks terrible :s

anyway any help would be greatly appreciated
thanks in advance.

In this case you should look into per-pixel lighting via the fragment shaders. First pointers: phong lighting, bump mapping, parallax mapping, BRDF, Cook–Torrance model, Freshnel term, Schlick’s lignting approximation (I like that one a lot :slight_smile: )

wow that’s a lot to look into o.O
thanks that should keep me busy for a while :slight_smile:

Oren-nayar shading model for rubbery surfaces too! :wink:

hi again
i looked into shaders as you pointed out and tried the per pixel shader as mentioned in the lighthouse3d tutorials but it didnt solve my main problem which is that a face turns practically white when the camera faces it, and is too dark when the camera faces away from it.

i’ve tried adding more lights and that somewhat solves the darkness problem but it obviously won’t (and doesn’t) solve the too-bright-when-facing-the-camera problem

any ideas?

For the darkness problem, check this :
http://home.comcast.net/~tom_forsyth/papers/trilight/trilight.html

I don’t understand your last problem:

" face turns practically white when the camera faces it" ??

If you are talking of the specular color, it normally depends on camera position but also on light position.

Maybe, show us your shader, or a screenshot of the problem.