Introduction to the scene description langage of the POV-Ray raytracer   page 4b
page 4 "#include" "camera" "light_source" Index Index page 1

"light_source" - Light Source (sun/lamp)

Here the following types of light sources are described:
point light - from far away
(konical) spotlight
"aerea_light"
light_source{<0.8, 1.3, -0.9> color White}

Attention: It's possible to install nearly an infinite number of light sources in a scene, but we should keep under control ourselves specially in big sceneries. Why? The rendering time is nearly proportional to the number of light sources and fun with POV-Ray is antiproportional to the time necessary for renderings!



Kinds of light sources:

Point Light:

light_source{ <1000,1000,-1500> color White}
         // Position <x,y,z> and color of the light
It shines to all sides like a naked bulb or like the sun.

Spotlight:

- a cone of light.
light_source{<0,0,0> color rgb <1,1,1>
             spotlight
             translate<40, 80, -40> // position of the light
             point_at<0, 0, 0>      // where it shines on
             radius 5    // inner light circle (hotspot) full inlighted (degrees)
             tightness 50// falloff (1 to 100)
                                //smaller = softer ; higher = more sharp
             falloff 8 } // outer light circle (degrees)

Cylindrical spotlight:

// creates a point "spotlight" (cylindrical directed) light source
.

light_source{ <0,0,0> color rgb <1,1,1>
            spotlight //  like normal spotlight!
            cylinder  // <-- the only change!!!
            translate<40, 80, -40> // <x y z> position of light
            point_at<0, 0, 0> // direction of spotlight
            radius 5     // hotspot in degrees
            tightness 50 // tightness of falloff (1..100)
                                // lower is softer, higher is  tighter
            falloff 8 }      // intensity falloff radius (outer, in degrees)

area light:

// An area light (creates soft shadows)
// WARNING: This special light can significantly slow down rendering times!
light_source{<0,0,0> // position
          color rgb<1,1,1> // light's color
          area_light // kind of light source
        <12, 0, 0> <0, 0, 12> // lights spread out across this distance (x * z)
        4, 4 // total number of lights in grid (4x*4z = 16 lights) <---Attention!!!
        adaptive 0 // 0,1,2,3...
        jitter // adds random softening of light
        translate<10, 20, -10> // <x,y,z> position of light
}//---------------- end of area_light


The invisibility of light sources and " looks_like "

Point lights by themselves are invisible: (the reason: because of calculating precisions it's nearly impossible to hit the position of a light by raytracing.
For making light sources visible we can use the statement " looks_like ":
light_source{<0.8, 1.3, -0.9> color White
             looks_like{sphere{<0,0,0>,0.5
                               texture{pigment{color White}
                                       finish {ambient 0.8
                                               diffuse 0.2
                                               phong 1}}
                              }// end of sphere
                       }//end of looks_like
            }//end of light_source

page 4 "#include" "camera" "light_source" Index Index page 1

© 2004 Friedrich A. Lohmüller,   (legacy email redacted)