View Full Version : Good lighting
07-29-2008, 02:32 PM
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.
07-29-2008, 02:45 PM
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 :) )
07-29-2008, 03:14 PM
wow that's a lot to look into o.O
thanks that should keep me busy for a while :)
07-29-2008, 03:22 PM
Oren-nayar shading model for rubbery surfaces too! ;)
07-30-2008, 06:52 AM
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
07-30-2008, 10:01 AM
For the darkness problem, check this :
07-30-2008, 10:04 AM
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.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.