Thread: Some of my own lighting issues

  1. #1
    l'Anziano DavidP's Avatar
    Join Date
    Aug 2001
    Location
    Plano, Texas, United States
    Posts
    2,743

    Some of my own lighting issues

    I have seen a couple of other threads on here lately regarding lighting, so I felt I might chime in with my own lighting issues.

    All my normals are being calculated and applied perfectly fine, so that is not the issue.

    [edit]

    Since no one has replied, and my problem has slightly changed since I initially posted, I am going to edit this post.

    I got a lot of my lighting stuff working, but it seems like my light is moving with the camera, even though I specify a position for the light. I want the light to stay in one place so that it lights a specific room...how would I go about doing this?

    [/edit]
    Last edited by DavidP; 04-13-2008 at 11:47 PM.
    My Website

    "Circular logic is good because it is."

  2. #2
    Registered User
    Join Date
    Oct 2006
    Location
    UK/Norway
    Posts
    485
    I am not sure, but I think you might have to check if a polygon can see the light. So, if the light is in one room, polygons in the other rooms cant see it and will not be effected by it.

  3. #3
    The Right Honourable psychopath's Avatar
    Join Date
    Mar 2004
    Location
    Where circles begin.
    Posts
    1,071
    Is this being done in a shader or fixed-function? Are you able to post any code?
    M.Eng Computer Engineering Candidate
    B.Sc Computer Science

    Robotics and graphics enthusiast.

  4. #4
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    Are you transforming your normals to world space prior to the lighting?? You will need the inverse transpose world matrix to transform the normals.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Eliminating lighting "over-bright"
    By psychopath in forum Game Programming
    Replies: 1
    Last Post: 05-31-2006, 06:52 PM
  2. GLSL lighting (again)
    By psychopath in forum Game Programming
    Replies: 6
    Last Post: 12-19-2005, 01:34 PM
  3. Replies: 6
    Last Post: 11-12-2005, 11:57 AM
  4. Lighting a Direct3D 9 mesh sphere
    By bennyandthejets in forum Game Programming
    Replies: 12
    Last Post: 02-14-2005, 01:19 AM
  5. need help with opengl lighting!!
    By genghis37 in forum Game Programming
    Replies: 1
    Last Post: 06-22-2002, 12:28 AM