Final Gathering

Final gathering is a technique to estimate global illumination in scenes where indirect lighting is varying rather slowly, like those containing mainly diffuse materials. For a given shading point, it collects illumination information by sampling the hemisphere over that point in a number of directions. The resulting irradiance data for a specific location may be stored in a cache as a so called finalgather point. This cache, the finalgather map, can then be used to accelerate final gathering dramatically by averaging a number of final gather points nearby instead of shooting a large number of new samples for every illuminated point. Finalgather maps can be stored to files on disk for later reuse, like in animations.

Final gathering can be combined with photon tracing to perform a complete and physically accurate lighting simulation that would include all possible light pathes, like caustics.

If coupled with global illumination simulation, final gathering can improve the quality of the final result noticeably. It eliminates photon map artifacts such as low frequency noise and dark corners. Fewer photons are needed in the respective photon map and lower accuracy is needed, since finalgather computation already averages over many values of indirect illumination. Without final gathering, the global illumination on a diffuse surface is computed by estimating the photon density (and energy) near that point. With final gathering, the hemisphere above the point is sampled to determine the incident illumination. If a diffuse surface is hit then the global illumination is computed by the material shader of that surface using information from the related photon map, if available, and other material properties. Hits on specular surfaces do not contribute to the final gather color since that type of light transport is a secondary caustic. Tracing many rays, each with a photon map lookup, is very time-consuming, so it is only done when necessary. In most cases, interpolation and extrapolation from previous nearby finalgather points is sufficient.

In film production work, final gathering is often preferred to photon mapping, except for caustics. By default, final gathering supports a single bounce only because multiple-bounce effects tend to have far less impact on the final image. Secondary bounces are performed by photons by default, but may be enabled for final gathering by adjusting the finalgather related trace depth. Although physical correctness is lost, this is often good enough to achieve the desired effect. Also, final gathering is easier to control than photons emanating from distant light sources. However, for accurate indoor illumination simulations and other CAD-related applications, photon mapping is recommended.

Final gathering can be enabled with a scene option or on the command line of the standalone mental ray. To change the number of rays shot in each final gather, together with the maximum distance at which a final gathering result can be used for interpolation and the minimum distance at which it must be used, the following setting can be used:

finalgather accuracy 500 1.5 0.25

By default, mental ray determines the maximum distance from the scene extent dynamically. Decreasing this value will reduce noise but increase render time. The default minimum distance is 10% of the maximum distance.

Note mental ray has improved the final gathering algorithm across versions. Today, it typically achieves better quality in less time with approximately half the number of rays compared to older versions. For example, the accuracy set in the preceding example would be comparable to around 1000 used in older mental ray to achieve similar quality but taking much more time to finish.

A progressive final gathering mode for faster pre-computation visualization is supported with the introduction of a novel multi-pass refinement algorithm. In this mode, the final gathering calculations will respect the tile order of regular rendering for a consistent display experience to the user. The number of final gathering pre-computation passes can be specified with a scene option or on the mental ray command line. This mode is used by default.

The exact final gathering mode allows to bypass the finalgather map cache and execute the more expensive but superior brute-force finalgather tracing. This is helpful to overcome interpolation artifacts in critical areas of the scene where the resolution of the point cache is not sufficient to capture fine detail, or leads to visible errors in the illumination estimate known as light leaks. This mode can be activated for specific scene elements using the force flag, while continuing to use the cache for the rest of the scene. It may also be enabled globally using the force option, for example to render high quality reference images.

Final gathering can be combined with importance-based techniques like Importons and Irradiance Particles, to achieve better quality with less artifacts in shorter rendering time. In these cases, importons are shot before final gathering, which are then used to control the distribution of finalgather rays according to importance.

Final Gathering Modes

mental ray offers convenient final gathering modes to switch general behavior easily towards specific use cases. The following modes are supported:

"automatic"
This final gathering mode offers greatly simplified usage of finalgather quality. It does not require to provide radius values to control sampling and interpolation. The parameters used to control this mode are:
"multiframe"
This mode is similar to the "automatic" mode, but has been specifically designed for rendering of camera fly-through animations. To avoid flickering, the rendering should be split into two parts. In the first part, the final gather map is rendered for the set of key frames or for a coarse sequence of frames. In the second part, the frozen final gathering mode is used for the rendering of the full animation. It is possible that some part of the scene will not contain sufficient number of finalgather points for some frames not belonging to the key frame set. To avoid picking up illumination from distant objects which is possible in the automatic mode, the finalgather accuracy max radius limits the maximal distance. If a sufficient number of final gather points is not found within that distance, the illumination will be faded to black smoothly.
This mode is typically useful for animated scenes, but is not necessarily the best method for animations where flickering is not a problem. It may also be well suitable for still images without animation. The parameters used to control this mode are:
"3.4"
This mode is provided for compatibility with settings in mental ray version 3.4 or earlier. It renders results very similar to the older version of mental ray but benefits from improvements of the current implementation. It makes use of all finalgather accuracy arguments, like "view" flag, number of finalgather rays, max and min radii).
"strict 3.4"
This mode is similar to the "3.4" mode, but keeps exact compatibility with the older mental ray version, allowing identical re-rendering of old scenes with the current mental ray. Some rendering improvements are disabled in that mode.
"force"
This mode disables the final gather point cache at all, and will always compute the accurate solution tracing the given number of rays for each shading point. This will take time but yield superior results.

The mode can be selected by a scene option or on the mental ray command line.
The default is "3.4" compatibility mode.

Copyright © 1986, 2015 NVIDIA ARC GmbH. All rights reserved.