Caustics

Caustics are light patterns that are created when light from a light source illuminates a diffuse surface via one or more specular reflections or transmissions. Examples are:

Caustics cannot be simulated efficiently using standard ray marching since predicting the potential specular paths to a light source from any given surface is a difficult (and in many situations impossible) task. To overcome this problem mental ray uses a photon map. The photon map is generated in a preprocessing step in which photons are emitted from the light sources and traced through the scene using photon tracing.

The emission of photons is controlled using either one of the standard photon emitters for point lights, spot lights, directional lights, and area lights, or by using a user defined photon emitting shader.

A photon leaving the light source can be reflected or transmitted specularly by objects. The photon is traced through the scene until it either hits a diffuse surface or until it has been reflected or transmitted a maximum number of times as indicated by the photon trace depth. When a caustic photon hits a diffuse object it is stored in a caustic photon map and not traced any further.

To control the behavior of photons as they hit objects in the scene, it is necessary to attach photon material shaders to these objects. Photon material shaders are similar to normal material shaders with the main difference being that they trace the light in the opposite direction. Also, a photon shader distributes energy (flux) instead of collecting a color (radiance). Another important difference is the fact that photon material shaders do not need to send light rays to sample the contribution from the light sources in the scene.

In order to use the photon shaders, it is necessary to include the appropriate shader declaration file, such as physics.mi for physics-based material shaders and photon shaders from the physics shader library in the standard distribution.

To turn caustics on, specify caustic on in the options or use the command-line option -caustic on.

Copyright © 1986-2008 by mental images GmbH