These parameters control how the light cache is used in the final rendering, after is has been calculated.
Pre-filter - when this is turned on, the samples in the light cache are filtered before rendering. Note that this is different from the normal light cache filtering (see below) which happens during rendering. Prefiltering is performed by examining each sample in turn, and modifying it so that it represents the average of the given number of nearby samples. More prefilter samples mean a more blurry and less noisy light cache. Prefiltering is computed once after a new light cache is computed or loaded from disk.
Filter - this determines the type of render-time filter for the light cache. The filter determines how irradiance is interpolated from the samples in the light cache.
- None - no filtering is performed. The nearest sample to the shaded point is taken as the irradiance value. This is the fastest option, but it may produce artifacts near corners, if the light cache is noisy. You can use pre-filtering (see above) to decrease that noise. This option works best if the light cache is used for secondary bounces only or for testing purposes.
- Nearest - this filter looks up the nearest samples to the shading point and averages their value. This filter is not suitable for direct visualization of the light cache, but is useful if you use the light cache for secondary bounces. A property of this filter is that is adapts to the sample density of the light cache and is computed for a nearly constant time. The Interpolation samples parameter determines how many of the nearest samples to look up from the light cache.
- Fixed - this filter looks up and averages all samples from the light cache that fall within a certain distance from the shaded point. This filter produces smooth results and is suitable for direct visualization of the light cache (when it is used as the primary GI engine). The size of the filter is determined by the Filter size parameter. Larger values blur the light cache and smooth out noise. Typical values for the Filter size are 2-6 times larger than the Sample size . Note that Filter size uses the same scale as the Sample size and its meaning depends on the Scale parameter.
Use light cache for glossy rays - if this option is on, the light cache will be used to compute lighting for glossy rays as well, in addition to normal GI rays. This can speed up rendering of scenes with glossy reflections quite a lot. When you use this option, it is recommended to also enable the Retrace threshold option, which will prevent the light cache from being visible in very glossy surfaces.
Retrace threshold - when enabled, this option improves the precision of the global illumination in cases where the light cache will produce too large an error. This is especially obvious with the Use light cache for glossy rays option, or near corners where light leaks might be possible because of the light cache interpolation. For glossy reflections and refractions, V-Ray dynamically decides whether to use the light cache or not based on the surface glossiness and the distance from it so that the errors due to the light cache are minimized. Note that this options may increase the render time.
Example: The Retrace Threshold Parameter
The first set of images shows how the Retrace threshold parameter can be used to reduce light leaks due to the light cache interpolation. The scene is an interior scene with parts of the exterior visible. The bright light cache samples from the exterior blend with the darker samples from the interior causing light leaks when the irradiance map is calculated. The Retrace threshold option (with the default value of 1.0) successfully resolves the problem at the expense of slightly increased calculation time for the irradiance map.
Without retracing, light cache samples from the bright exterior are mixed with the dark samples in the exterior causing light leaks.
With light cache retracing enabled, the light leaks are successfully eliminated at the expense of slightly longer irradiance map calculation time.
The second scene in this example shows how the Retrace threshold option can be used to improve the appearance of glossy reflections and refraction with the Use light cache for glossy rays option. In this case, V-Ray dynamically decides whether to use the light cache or not, based on the glossiness of the surface and the distance from it.
Without retracing, the light cache samples are clearly visible in the glossy reflections and refractions.
With light cache retracing enabled, V-Ray is able to dynamically decide whether to use the light cache or not, leading to a much better result.
Filter Samples - When the Filter Type is set to Nearest this parameter determines how many of the nearest samples to look up from the light cache.
Filter Size - When the Filter Type is set to Fixed this parameter determines the size of the filter. The units of the value is determined by the state of the World scale parameter.
Mode - determines the rendering mode of the light cache:
- Progressive path tracing - in this mode, the light cache algorithm is used to sample the final image progressively. For a discussion of this mode see the tutorial .
- Single frame - this will compute a new light cache for each frame of an animation.
- Fly-through - this will compute a light cache for an entire fly-through animation, assuming that the camera position/orientation is the only thing that changes. The movement of the camera in the active time segment only is taken in consideration. Note that it may be better to use World Scale for fly-through animations. The light cache is computed only at the first rendered frame and is reused without changes for subsequent frames.
- From file - in this mode the light cache is loaded from a file. The light cache file does not include the prefiltering of the light cache; prefiltering is performed after the light cache is loaded, so that you can adjust it without the need to recompute the light cache.
File - specifies the file name to load the light cache from, when the Mode is set to From file.
On Render End
This group of controls determine what happens with the light cache after rendering is complete.
Don't delete - when on (the default), the light cache remains in memory after the rendering. Turn this option off to automatically delete the light cache (and thus save memory).
Auto save - when on, the light cache will be automatically written to the specified file. Note that the light cache will be written as soon as it is calculated, rather than at the actual end of the rendering.
- this button allows to save the light cache to a file on disk, for later re-use. Note that the Don't delete option must be on for this to work - otherwise, the light cache will be deleted as soon as rendering is complete and it will not be possible to save it.
- Do not set the Adaptive amount in the DMC sampler rollup to 0.0 when using the light cache, as this will cause excessive render times.
- Do not apply perfectly white or very close to white materials to a majority of the objects in the scene, as this will cause excessive render times. This is because the amount of reflected light in the scene will decrease very gradually and the light cache will have to trace longer paths. Also avoid materials that have one of their RGB components set to maximum (255) or above.
- If you want to use the light cache for animation, you should choose a large enough value for the Filter size in order to remove the flickering in the GI.
- There is no difference between light caches computed for primary bounces (direct visualization) and for secondary bounces. You can safely use light caches computed in one of these modes for the other.
- Similar to the photon map, you can get "light leaks" with the light cache around very thin surfaces with substantially different illumination on both sides. The effect can be reduced by decreasing the Sample size and/or the filtering.