temp

TAPESTRY: The Art of Representation and Abstraction

# Final Gather

### Ray-tracing in Review

Traditional ray-tracing starts at the camera and traces rays backwards into the scene, asking "where did this light come from" at each surface encountered. However, the only kind of reflection considered is perfectly specular.

#### Direct Light Distribution

The first step in the rendering is to distribute light to surfaces that can "see" light sources directly. This direct illumination is stored as spots of illumination on the various model surfaces.

#### Final Gather & Diffuse Illumination

Final Gather starts like a traditional ray tracer, shooting rays through image pixels and into the scene ("sampling the image"). However, where one of those rays intersects a surface, the algorithm asks a hemispherical question, "how much light arrived here, and from where?". There are an infinite number of possible answers to this question, which is bad, so the algorithm takes a random sample of directions, shoots rays out to those surfaces, "gathers" in the direct illumination it finds there, and computes an average value. Weight it using the BDRF if you want. That's the light that arrived at this spot on the surface....

... so that spot tells you how much light (and what color of light) is available to be diffusely reflected to the camera. This can be pretty patchy, so some smoothing is done (much like Gouraud smoothing) to even things out. In this fashion, the algorithm delivers an approximation of the global illumination in the scene, with color bleed, soft shading, and indirect illumination (up to a point).

#### Final Gather & Global Illumination

Global illumination (aka "forward ray-tracing" or "photon-mapping") starts at the light sources and shoots rays into the scene, distributing light to the various surfaces, and bouncing it diffusely to subsequent surfaces. It answers the question, "Where does the light go in the space?" without answering the question, "What light gets to the camera?". Final Gather starts at the camera and asks, "What light is diffusely reflected out of the scene in front of me?" It shouldn't come as a surprise that the two techniques can be combined. One efficiently captures the effects of indirect illumination, the other the effects of diffuse reflection surfaces. Used together, fewer "photons" need be shot from the lights, for fewer bounces into the scene, and fewer samples need to be taken by the Final Gather process to produce acceptable results.

#### Effects of Randomness

Since rays and samples are taken on a random basis and the results smoothed mathematically, two renderings of the same scene (as when animating) may look great individually, but look different as successive frames in an animation, an effect commonly referred to as "blinking". Additional sample rays and smoothing samples usually dampen this effect.

Last updated: April, 2014