Final Gather Settings

The final gather algorithm is a method of achieving high-quality global illumination for a scene by determining the incoming light from several directions in the hemisphere over each sampling point.

NOTE:The settings in this group are only used when rendering scenes with "classic" materials. They are not used at all for physically based rendering.

In most projects, you need to tweak some settings for each scene to get the best quality results:

You can control the look of the final results in several ways, which again are often tweaked for each scene:

If you notice artifacts in the final lighting, you may be able to prevent them by using the following settings:

The following block lists all settings available, with their default values. Descriptions of the settings are below.

<GISettings>
    <fgRays>300</fgRays>
    <fgContrastThreshold>0.1</fgContrastThreshold>
    <fgDepth>1</fgDepth>
    <fgUseCache>irradiance</fgUseCache>
    <fgInterpolationPoints>15</fgInterpolationPoints>
    <fgPreview>true</fgPreview>
    <fgEstimatePoints>15</fgEstimatePoints>
    <fgNormalThreshold>0.2</fgNormalThreshold>
    <fgGradientThreshold>0.5</fgGradientThreshold>
    <fgMaxRayLength>0</fgMaxRayLength>
    <fgClampRadiance>false</fgClampRadiance>
    <fgCacheDirectLight>false</fgCacheDirectLight>
    <fgCheckVisibility>false</fgCheckVisibility>
    <fgCheckVisibilityDepth>1</fgCheckVisibilityDepth>
    <fgLightLeakReduction>false</fgLightLeakReduction>
    <fgLightLeakRadius>0</fgLightLeakRadius>
    <fgMaxSearchRadius>0</fgMaxSearchRadius>
    <fgAttenuationStart>0</fgAttenuationStart>
    <fgAttenuationStop>0</fgAttenuationStop>
    <fgFalloffExponent>0</fgFalloffExponent>
    <fgAOContrast>1</fgAOContrast>
    <fgAOInfluence>0</fgAOInfluence>
    <fgAOMaxDistance>0</fgAOMaxDistance>
    <fgAOScale>1</fgAOScale>
    <fgAOVisualize>false</fgAOVisualize>
    <fgUseLegacy>false</fgUseLegacy>
    <fgAccuracy>1</fgAccuracy>
    <fgSmooth>1</fgSmooth>
    <fgDisableMinRadius>false</fgDisableMinRadius>
 </GISettings> 

fgRays

Sets the maximum number of rays to use for each final gather sample point. A higher number gives higher quality, but longer rendering time.

fgContrastThreshold

Determines how sensitive the final gather pre-calculation will be to differences in contrast between the points. If the difference in contrast between two adjacent points is greater than this threshold, more points will be created in that area. This results in the algorithm placing points where they are really needed: i.e. at shadow boundaries or in areas where the indirect light changes quickly. Therefore, this threshold controls the number of points created in the scene adaptively.

Note that if a low number of final gather rays are used, the points will have high variance and therefore a high contrast difference. In this case, you might need to increase the contrast threshold to prevent points from clumping together.

fgDepth

Sets the number of indirect light bounces calculated by the final gather.

A value higher than 1 will produce more global illumination effects, but can be quite slow since the number of rays will increase exponentially. Rather than increasing this value, it is often better to use a fast GI method such as the Path Tracer as the secondary GI integrator. If a secondary GI is used the number of set final gather bounces will be calculated first, before the secondary GI is called. So in most cases, if a secondary GI is used, the depth should be set to 1.

fgUseCache

Determines which caching method will be used for final gathering.

fgInterpolationPoints

Sets the number of final gather points to interpolate between. A higher value will give a smoother result, but can also smooth out details.

If increasing this value causes light leakage through walls, see <fgCheckVisibility> below.

fgPreview

Enable this setting to visualize the final gather prepass. Using the Preview Calculation Pass enables a quick preview of the final image lighting, reducing lighting setup time.

fgEstimatePoints

Sets the minimum number of points that should be used when estimating final gather in the pre-calculation pass. Higher values create more points all over the scene. The default value of 15 should be suitable in most cases.

fgNormalThreshold

Determines how sensitive the final gather will be to differences in the normals between adjacent points. Lower values will produce more points in areas of high curvature.

fgGradientThreshold

Determines how irradiance gradients are used in the interpolation. Each point stores its irradiance gradient, which can be used to improve the interpolation. However, in some situations, using the gradient can result in white ”halos” and other artifacts. Reducing this threshold value can reduce those artifacts.

fgMaxRayLength

The maximum distance a ray can be traced before it is considered to be a "miss". This can improve performance in very large scenes. If this value is set to 0.0, the entire scene will be used.

fgClampRadiance

When enabled, sampled values are clamped to [0, 1]. This reduces high frequency noise when final gather is used together with other Global Illumination algorithms.

fgCacheDirectLight

When enabled, final gather will also cache lighting from light sources. This increases performance, since fewer direct light calculations are needed.

This caching gives an approximate result, and hence can affect the quality of the lighting. For instance, indirect light bounces from specular highlights might be lost. However, this caching is only done for depths higher than 1, so the quality of direct light and shadows in the light map will not be reduced.

fgCheckVisibility

Enable this setting to reduce light leakage through walls.

When adjacent points are collected to interpolate between, some of these points can be located on the other side of geometry. As a result light will bleed through the geometry. To prevent this, Beast can reject points that are not visible from each other.

fgCheckVisibilityDepth

When <fgCheckVisibility> is enabled, this setting determines the number of bounces for which the visibility checks will be performed. Adjust this value only if you experience light leakage when using a multi-bounce final gather.

fgLightLeakReduction

This setting can be used instead of <fgCheckVisibility> to reduce light leakage through walls when using final gather as primary GI and path tracing as secondary GI.

Leakage can happen when the path tracer filters in values on the other side of a wall. This leakage can be reduced by using final gather as a secondary GI fallback when sampling close to walls or corners. When this is enabled, a final gather depth of 3 will be used automatically, but the higher depths will only be used close to walls or corners.

This approach to light leak reduction is typically faster than using <fgCheckVisibility>, since the depth is automatically adjusted.

Note that this setting is only read when path tracing is set as secondary GI.

fgLightLeakRadius

When <fgLightLeakReduction> is enabled, this setting determines how far away from walls the final gather will be called instead of the secondary GI.

If 0.0 is used, a value will be calculated internally depending on the type of secondary GI used. The calculated value is printed in the output window. If you still get leakage, you can adjust this by setting a higher value explicitly in your XML file and re-running the final gather.

fgMaxSearchRadius

Increasing the value of this setting may help to reduce problems with light leakage at secondary final gather depths.

Checking for sample visibility is a safe way to eliminate light leakage (see also the <fgCheckVisibility> and <fgCheckVisibilityDepth> settings). However, when using multiple final gather depths, this can result in very long rendering times. The <fgMaxSearchRadius> setting offers a cheaper way to remove leakage. Setting this parameter to a value above zero will limit the search radius for final gather points at secondary depths, determining the maximum distance of the points that are included.

The value is given in world space units.

fgAttenuationStart

Sets the distance from the spawning point at which final gather rays begin to attenuate, or fade in strength. There is no attenuation before this distance. Note that <fgAttenuationStop> must be set higher than 0.0 to enable attenuation.

fgAttenuationStop

Sets the distance from the spawning point at which the attenuation of final gather rays is completed: i.e. at which their intensity has faded to zero. Beyond this distance, light rays will have no effect. To enable attenuation, set this value higher than 0.0.

The default value is 0.0.

fgFalloffExponent

Adjusts the rate at which lighting falls off over distance when attenuation is enabled. A higher exponent gives a faster falloff. Note that <fgAttenuationStop> must be set higher than 0.0 to enable attenuation.

fgAOContrast

Adjusts the contrast for ambient occlusion.

fgAOInfluence

Controls the scaling of final gather with ambient occlusion, which can be used to boost shadowing and get more contrast in your lighting. The value controls how much ambient occlusion to blend into the final gather solution.

This setting accepts any value between 0.0 and 1.0 inclusive, where:

fgAOMaxDistance

Maximum distance for ambient occlusion. Beyond this distance a ray is not considered to be occluded, even if it hits an object. You can use this setting to avoid closed scenes from resulting in full occlusion in every direction, or to limit the ambient occlusion contribution to areas with very close occluders (such as creases).

fgAOScale

A scaling of the occlusion values. Can be used to increase or decrease the shadowing effect.

fgAOVisualize

Visualizes just the ambient occlusion values. Useful when tweaking the occlusion sampling options.

fgUseLegacy

Enables an older final gather method. With this method, points are placed according to the geometry in the scene. More samples are placed near walls and corners of the geometry. The difference in contrast between the samples is not considered.

When this legacy method is enabled, the following controls that apply to the new method are not used: <fgInterpolationPoints>, <fgEstimatePoints>, <fgContrastThreshold>, and <fgGradientThreshold>.

Instead, you can control the legacy final gather method using the <fgAccuracy>, <fgSmooth> and <fgDisableMinRadius> settings described below.

fgAccuracy

Controls the sample point density. Higher values generate more points and better results, at the expense of longer rendering times. Read only when <fgUseLegacy> is enabled.

fgSmooth

Applies a filter that reduces noise in the final gather solution. This is much faster than increasing accuracy or sending more rays. The default value is 1.0. Values below 1.0 give a sharper but noisier look, values above 1.0 give a smoother look with less details preserved. Read only when <fgUseLegacy> is enabled.

fgDisableMinRadius

When enabled, more points will be created in corners of the geometry. This can reduce artifacts, but increases the rendering time significantly. It is recommended that you enable this setting only when absolutely necessary. Read only when <fgUseLegacy> is enabled.