Results 1 to 7 of 7

Thread: Good lighting

  1. #1
    Junior Member Newbie
    Join Date
    Jul 2008
    Posts
    3

    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.

  2. #2
    Senior Member OpenGL Pro Zengar's Avatar
    Join Date
    Sep 2001
    Location
    Germany
    Posts
    1,931

    Re: Good lighting

    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 )

  3. #3
    Junior Member Newbie
    Join Date
    Jul 2008
    Posts
    3

    Re: Good lighting

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

  4. #4
    Senior Member Regular Contributor
    Join Date
    Aug 2007
    Location
    USA
    Posts
    243

    Re: Good lighting

    Oren-nayar shading model for rubbery surfaces too!

  5. #5
    Junior Member Newbie
    Join Date
    Jul 2008
    Posts
    3

    Re: Good lighting

    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?

  6. #6
    Senior Member Regular Contributor
    Join Date
    Dec 2007
    Location
    Brighton, UK
    Posts
    161

    Re: Good lighting

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

  7. #7
    Senior Member OpenGL Pro dletozeun's Avatar
    Join Date
    Jan 2006
    Location
    FRANCE
    Posts
    1,367

    Re: Good lighting

    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.

Similar Threads

  1. good normals but no lighting when i display the meshes
    By airseb in forum OpenGL: General
    Replies: 1
    Last Post: 04-12-2005, 06:15 AM
  2. Real good specular lighting
    By Jan in forum OpenGL: Advanced Coding
    Replies: 3
    Last Post: 08-06-2003, 07:02 PM
  3. My lighting looks really good on some parts and really bad on others.
    By John Jenkins in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 10-21-2002, 10:18 AM
  4. a good lighting model (dot3)
    By V-man in forum OpenGL: Advanced Coding
    Replies: 10
    Last Post: 06-19-2002, 08:35 PM
  5. About lighting (not OpenGL lighting, but general lighting)
    By Anonymous Coward in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 04-04-2001, 09:10 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean