4. The Lights - Brightening up the scene

The lights .. light up our scene. They are the source of all illumination in the scene other than the ambient illumination. Lights can be point light
sources or area light sources. Only point light sources are discussed here. For area light sources see here


  1. Light Specification -
    Multiple lights can be specified by user. These can be specified using the following parameters -
    1. Light Position
    2. Light Color
    The light position is in world coordinates. While the color is RGB triad. A sample light specification is given below -

    light
    {
      200.0 300.0 100.0 1.0
      1.0 1.0 1.0
    }

  2. Shadows -
    Shadows are calculated using shadow feelers. When any ray intersects an object, shadow feelers are shot from the point of intersection towards every
    light source. If the the feeler intersects any opaque object before it reaches a light source then the point in question is in a shadow.
    Figure 3

    If the feeler intersects a transparent object then a scaled intensity (scaled by transparency of the material) of the light reaches the point in question, and
    hence we get a lighter shadow. Area lights produce soft shadows using multiple shadow feelers. That is discussed here.
    One point light source (red) Two point light sources (red and yellow)



[ Back ]




Page last updated on 04 October, 2005. pialpharhoalphagammaAT cse.iitd.ac.in © Parag Chaudhuri , 2009
DCSE, IIT Delhi Valid HTML 4.0! Valid CSS! yahoo