Results 1 to 5 of 5

Thread: ligjt

  1. #1
    Guest

    ligjt

    Hi I have a cube without a face (this permit me to see inside it). the hole in the cube in in front of mine: I put face normals like
    faceup (0,1,0), face left (-1,0,0)......now I have the light on the left of cube; beside faceLeft; it happen that inside cube all face appear dark/black (I think it's ok). but the leftFace (inside) appear white (the color of cube faces). WHy? there isn't a normal in inside cube and there isn't a light...thanks

  2. #2
    Senior Member Frequent Contributor
    Join Date
    Aug 2004
    Location
    munich, germany
    Posts
    659

    Re: ligjt

    a light source is never occluded by the geometry, even though it may be occluded in reality. only the dot product of a face normal and the vector to the light source is taken into account.

    to get the effect you want, you'll need some kind of shadow algorithm.

  3. #3
    Member Newbie
    Join Date
    May 2006
    Location
    Czech republic
    Posts
    42

    Re: ligjt

    Piece of code could be usefull .. but seems you lights your cube from the righ side, not from the left and have two sided lighting enabled - the left side from outside is dark, isn't it?

  4. #4
    Guest

    Re: ligjt

    ok, so my face (a quads) must appear white in both sides..:!?? My light is positional, but i think this doens't matter....

  5. #5
    Member Newbie
    Join Date
    May 2006
    Location
    Czech republic
    Posts
    42

    Re: ligjt

    No, only from side where the light is. If you have e.g. quad on XZ plane (Y=0)and vertex normals are set up (0.0, 1.0, 0.0):
    (front side (FS) is the side from where the normal comes out, back side (BS) is the other)
    1) you have one side lighting
    a)light is e.g. on position 0,10,0
    ->the FS will be lit
    b)light is e.g. on position 0,-10,0
    ->nothing will be lit
    2) you have two-sided lighting
    a)light is e.g. on position 0,10,0
    ->the FS will be lit
    b)light is e.g. on position 0,-10,0
    ->the BS will be lit

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