Rendering caustics

From CGAFaq

Jump to: navigation, search

Caustics are patterns of light formed by light reflecting or refracting from specular objects so that it focuses into bright patterns. For a number of rendered images of caustics, see Henrik Wann Jensen's gallery of images with caustics. Caustics have traditionally been difficult or impossible to render with classic ray tracing techniques that start paths from the eye due to the difficulty of finding light-carrying paths of the type that create caustics.

Photon Mapping

Photon mapping is a very effective technique for rendering caustics and is easily the most widely used method today. It is widely used both in commercial products and in rendering research. There are two main steps for rendering caustics with photon mapping:

  1. Photon shooting: "photons"--light carrying particles--are emitted from the light sources and scatter throughout the scene. For rendering caustics, photons that do not intersect specular surfaces can be discarded. The photons store the amount of energy they carry, their position, and incident direction, and are recorded in a spatial data structure (typically a balanced Kd tree).
  2. Rendering: when a point in the scene is rendered, the spatial data structure is used to find the photons close to that point. Both the number and local density of the photons is used to estimate the incident illumination at the point. In areas where there are caustics, there will be a relatively large number of photons in a small area around the point.

(See the Photon mapping page for further information and further references about both of these steps.)

The photon mapping approach to caustics builds on a number of previous techniques. In the SIGGRAPH 86 Developments in Ray Tracing seminar notes, Jim Arvo described a backwards ray tracing algorithm for rendering caustics. (In this context, "backwards" refers to ray tracing starting from the light sources rather than from the eye.) He used a texture map to store splats of light; areas with caustics would receive more splats and thus be brighter.

Paul Heckbert developed an approach where the texture map used for representing the illumination was adaptively refined, described in the 1990 SIGGRAPH paper Adaptive radiosity textures for bidirectionsl ray tracing, and Steve Collins described a related approach that included the improvement of tracking wavefronts to detect where light was strongly focused, described in a 1994 Eurographics Rendering Workshop paper, Adaptive splatting for specular to diffuse light transport.

These three approaches had a few disadvantages that were solved by photon mapping: first, they all required that the object receiving caustics be parameterized so that a texture could be mapped to them. For some types of surfaces, finding such a parameterization may be difficult or impossible. Second, they were prone to high memory requirements, with the memory use related to the area of surfaces in the scene rather than the complexity of the caustics. Because photon mapping represents the illumination directly with the photons, and because it stores them in a spatial data structure that isn't related to the scene geometry, it avoids these two problems.

Purcell et al have shown how photon mapping can be used to render caustics interactively on GPUs (Photon Mapping on Programmable Graphics Hardware). Given the relative strengths and weaknesses of GPU hardware, however, other approaches to rendering caustics on GPUs also show promise (see below.)

Other Monte Carlo Ray Tracing Approaches

With the advent of efficient bidirectional ray tracing algorithms, it is feasible to render caustics with techniques such as bidirectional path tracing and Metropolis light transport; see those pages for more information. In comparison to photon mapping, the advantage of these approaches is that they do not introduce systemic error into the results computed--in other words, there is inherent error in photon mapping due to the use of photons nearby the point being shaded in the estimation of how much light is incident at the point being shaded. If illumination is relatively smoothly varying, this error is generally low, though it is possible to find situations where this error is a problem. Unbiased Monte Carlo techniques, like bidirectional path tracing and Metropolis light transport, do not suffer from this error, though they tend to require much more computation time to achieve results of equivalent overall quality to photon mapping.

Caustic Volumes

Mark Watt, Light-water interaction using backward beam tracing.

Manfred Ernst, Tomas Akenine-Moller, Henrik Wann Jensen, Interactive rendering of caustics using interpolated warped volumes.

Musawir A. Shah and Sumanta Pattanaik, Caustics Mapping: An Image-space Technique for Real-time Caustics.

Hu Wei and Qin Kaihuai, Interactive Rendering of Reflection, Refraction and Caustics.

Personal tools