Light Sources

Photons are emitted from the light sources in the scene. It is necessary to attach some extra information to each light source to control the energy being distributed into the scene (and/or the number of photons emitted).

To generate caustics from a particular light source, one must specify the energy emitted by the light source. This is given by the energy keyword. The energy is the flux distributed by the light source and it will be distributed into the scene by each photon which will carry a fraction of the light source energy. If the energy is zero (the default), no photons will be emitted.

Another important factor is the number of photons to be generated by this light source. This can optionally be specified using the caustic photons keyword (10000 photons is the default). This will be the number of photons stored in the photon map and thus a good indication of the quality of the generated caustics. It is also a direct indication of the memory usage which will be proportional to the number of photons in the photon map. For quick, low-quality caustics, caustic photons 10000 is adequate, for medium quality 100000 is typically needed, and for highly accurate effects, caustic photons 1000000 can be necessary. It is also possible to specify a second integer, which is the maximum number of photons to be emitted from the light source, or only the number of emitted photons by setting the first integer to zero. By default there is no upper limit (indicated by the value 0), in which case emission will continue until the specified number of photons have been stored. Notice that the emitted number of photons and the preprocessing time is most often proportional to the number of photons generated in the photon map.

For most light sources, the distribution of energy using photons will give the natural inverse square fall-off of the energy. This might be an unwanted effect since some light shaders implement a linear fall-off. It can be avoided by using the exponent keyword. If the exponent is p, the fall-off is 1 ⁄ r p, where r is the distance to the light source. Exponent values between 1 and 2 make the indirect light less dependent on distance. Exponents of less than 1 is not advisable, as it often gives visible noise. Exponent 2 is the default. Note that this violates the conservation-of-energy law, and could cause bright spots from distant light sources in unexpected locations.

The following is an example of a light that uses the mib_light_point light shader and is capable of generating caustics:

light "caustic-light1" "mib_light_point" (
      "color"       1.0 1.0 0.95,
      "shadow"      on,
      "factor"      0.6,
      "atten"       on,
      "start"       16.0,
      "stop"        200.0
   )
   origin           20.0 30.0 -40.0
   energy           700 700 700
   caustic photons  100000
   exponent         1.5
end light

An example of a light source which uses the inverse square fall-off to compute illumination (and the default 10000 photons) is:

light "point1" "physical_light" (
      "color"       700.0 700.0 700.0
   )
   origin           20.0 30.0 -40.0
   energy           700 700 700
end light

It is important to note the difference between color and energy. color is the power of the direct illumination, while energy will be the power of the caustic. It is therefore possible to tune the brightness of caustics to make them more or less visible.

If area light source information, such as a rectangle statement, is added to the light source definition, both the direct and global illumination will be emitted from an area light source. This tends to make caustics more fuzzy.

To emphasize caustics, the energy of the light sources can be higher than their colors (that determine the direct illumination). If, for whatever reason, the user wants to have the sources of caustics to be at different positions than the sources of direct illumination, this is possible too. It might also be that a single light source is sufficient for the caustics, while several light sources are needed to fine-tune the direct illumination.

Copyright © 1986, 2013 NVIDIA Corporation