Light Source Types

The amount of ambient light present in a scene is controlled by a pseudo light source of type <#270#>ambient<#270#>.

<#4664#><#4664#>
<#1231#>light<#1231#> <#1232#>Intensity<#1232#> ambient
Define the amount of ambient light present in the entire scene.

There is only one ambient light source; its default intensity is <#275#>1, 1, 1<#275#>. If more than one ambient light source is defined, only the last instance is used. A surface's ambient color is multiplied by the intensity of the ambient source to give the total ambient light reflected from the surface.

Directional sources are described by a direction alone, and are useful for modeling light sources that are effectively infinitely far away from the objects they illuminate.

<#4665#><#4665#>
<#1235#>light<#1235#> <#1236#>Intensity<#1236#> <#1237#>directional<#1237#> #math53##tex2html_wrap_inline4667#
Define a light source with the given intensity that is defined to be in the given direction from every point it illuminates. The direction need not be normalized.

Point sources are defined as a single point in space. They produce shadows with sharp edges and are a good replacement for extended and other computationally expensive light source.

<#4668#><#4668#>
<#1241#>light<#1241#> <#1242#>Intensity<#1242#> <#1243#>point<#1243#> #math54##tex2html_wrap_inline4670#
Place a point light source with the given intensity at the given position.

Spotlights are useful for creating dramatic localized lighting effects. They are defined by their position, the direction in which they are pointing, and the width of the beam of light they produce.

<#4671#><#4671#>
<#1247#>light<#1247#> <#1248#>Intensity<#1248#> <#1249#>spot<#1249#> #math55##tex2html_wrap_inline4673# #math56##tex2html_wrap_inline4675# <#1252#>α<#1252#> [ #math57#θin #math58#θout ]
Place a spotlight at #math59##tex2html_wrap_inline4680#, oriented as to be pointing at #math60##tex2html_wrap_inline4682#. The intensity of the light falls off as #math61#(cosineθ)α, where θ is the angle between the spotlight's main axis and the vector from the spotlight to the point being illuminated. #math62#θin and #math63#θout may be used to control the radius of the cone of light produced by the spotlight.
#math64#θin is the the angle at which the light source begins to be attenuated. At #math65#θout, the spotlight intensity is zero. This affords control over how ``fuzzy'' the edges of the spotlight are. If neither angle is given, they both are effectively set to 180 degrees.

Extended sources are meant to model spherical light sources. Unlike point sources, extended sources actually possess a radius, and as such are capable or producing shadows with fuzzy edges (<#305#>penumbrae<#305#>). If you do not specifically desire penumbrae in your image, use a point source instead.

<#4689#><#4689#>
<#1257#>light<#1257#> <#1258#>Intensity<#1258#> <#1259#>extended<#1259#> <#1260#>radius<#1260#> #math66##tex2html_wrap_inline4691#
Create an extended light source at the given position and with the given <#312#>radius<#312#>.
The shadows cast by extended sources are modeled by taking samples of the source at different locations on its surface. When the source is partially hidden from a given point in space, that point is in partial shadow with respect to the extended source, and the sampling process is usually able to determine this fact.

Quadrilateral light sources are computationally more expensive than extended light sources, but are more flexible and produce more realistic results. This is due to the fact that an area source is approximated by a number of point sources whose positions are jittered to reduce aliasing. Because each of these point sources has shading calculations performed individually, area sources may be placed relatively close to the objects it illuminates, and a reasonable image will result.

<#4692#><#4692#>
<#1264#>light<#1264#> <#1265#>Intensity<#1265#> <#1266#>area<#1266#> #math67##tex2html_wrap_inline4694# #math68##tex2html_wrap_inline4696# <#1269#>usamp<#1269#> #math69##tex2html_wrap_inline4698# <#1271#>vsamp<#1271#>
Create a quadrilateral area light source. The u axis is defined by the vector from #math70##tex2html_wrap_inline4701# to #math71##tex2html_wrap_inline4703#. Along this axis a total of <#325#>usamp<#325#> samples will be taken. The v axis of the light source is defined by the vector from #math72##tex2html_wrap_inline4706# to #math73##tex2html_wrap_inline4708#. Along this axis a total of <#328#>vsamp<#328#> samples will be taken.
The values of <#330#>usamp<#330#> and <#331#>vsamp<#331#> are usually chosen to be proportional to the lengths of the u and v axes. Choosing a relatively high number of samples will result in a good approximation to a ``real'' quadrilateral source. However, because complete lighting calculations are performed for each sample, the computational cost is directly proportional to the product of <#332#>usamp<#332#> and <#333#>vsamp<#333#>.