Page History
This page provides information on the Light Cache rollout in the Render Settings.
Overview
...
Section | |||||
---|---|---|---|---|---|
|
...
|
...
|
...
|
...
|
...
|
...
title | |||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
UI Expand | |||||||||||||||||||||||
| tab
| When
|
Light Cache Parameters
...
Section | |||||
---|---|---|---|---|---|
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
...
|
...
|
World Scale – Determines the unit scale for the Sample size and Filter size parameters.
When enabled, sizes are fixed in world units everywhere. This can affect the quality of the samples. For example, samples that are close to the camera are sampled more often and appear smoother, while samples that are far away are noisier. This option is often the best choice for fly-through animations, since it forces a constant sample density everywhere.
When disabled, units are fractions of the final image (a value of 1.0 means the samples will be as large as the whole image). Samples that are closer to the camera are smaller, and samples that are far away are larger. Note that the units do not depend on the image resolution. This value is best suited for stills or animations where the light cache needs to be computed at each frame.
For more information, see The Scale Parameter example below.
Use light cache for glossy rays – When this option is enabled, the light cache is 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 Use retrace threshold option, which prevents the light cache from being visible in very glossy surfaces.
Use camera path – When this option is enabled, V-Ray calculates the light cache samples for the entire camera path, instead of just the current view, in the same way as this is done for the Fly-through mode. This is useful when rendering animations with moving objects where the camera also moves and the light cache needs to be in Single frame mode. In this case, enabling this option helps to reduce any flickering, as the GI sample positions on static geometry will not change.
Mode
Mode – Determines the rendering mode of the light cache:
Single frame – Computes a new light cache for each frame of an animation.
Fly-through – Computes 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 only in the active time segment is taken into consideration. Note that it might be better to have the World Scale option enabled 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 Name – Specifies the file name to load the light cache from, when Mode is set to From file.
– Allows saving of the light cache to a file on disk for later re-use. Note that the Don't delete option must be enabled to allow saving of the file; the light cache will be deleted as soon as rendering is complete and it will not be possible to save it.
Open map with Irradiance Map Viewer – Opens the currently loaded map in the Irradiance Map Viewer tool.
On Render End
This group of controls determine what happens with the light cache after rendering is complete.
Don't delete – When enabled (the default), the light cache remains in memory after the rendering. Disable this option off to automatically delete the light cache (and thus save memory).
Auto save – When enabled, 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.
Auto Save File – Specifies the file name to save the light cache to.
|
...
Anchor | ||||
---|---|---|---|---|
|
Anchor
Example: The Subdivs Parameter
The Subdivs parameter controls the number of rays that are shot into the scene, and the "noise" quality of the light cache samples.
...
As we add more samples, the noise is reduced, but the render times increase.
Section | ||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...
Anchor | ||||
---|---|---|---|---|
|
Example: The Sample Size Parameter
The The Sample size parameter controls the size of the individual light cache samples. Smaller values produce a more detailed lighting solution, but are noisier and take more RAM. Larger values produce less detail, but take less RAM and may be faster to calculate.
...
Note the difference in the noise level between the samples.
Section | ||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...
Example: The Scale Parameter
The World Scale option determines whether the Sample size and Filter size parameters are in screen space, or world space.
In the table below the World Scale checkbox is not enabled, meaning that the Screen scale is used, and the scene was rendered with different image and world sizes. The Sample size was constant (the default value of 0.02) for all images.
As you can see, we always get the same number of light cache samples for all cases, regardless of resolution or scene size - in fact, when scaled to the same size, the images look identical. This is why the Screen Scale is applicable to a large variety of scenes.
Section | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||
|
...
border | true |
---|
...
width | 10% |
---|
Resolution 250x300
Column | ||
---|---|---|
| ||
Column | ||
---|---|---|
| ||
Column | ||
---|---|---|
| ||
...
border | true |
---|
|
...
Anchor | ||||
---|---|---|---|---|
|
Example: Path Guiding
Both examples compare renders with both enabled and disabled path guiding and adaptive dome lighting. The results are shown using the Sample Rate render element.
See the Path Guiding with Intel® Open PGL in V-Ray article or more information.
Section | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...
Section | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Mode
...
Section | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
On Render End
Section | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...
Example: Retrace Threshold
...
width | 10% |
---|
Resolution 500x600
Column | ||
---|---|---|
| ||
Column | ||
---|---|---|
| ||
Column | ||
---|---|---|
| ||
...
border | true |
---|
...
width | 10% |
---|
Resolution 1000x1200
Column | ||
---|---|---|
| ||
Column | ||
---|---|---|
| ||
Column | ||
---|---|---|
| ||
In the table below, the World Scale mode was used. Again, the scene is rendered at three different resolutions and scales, but with the same light cache parameters. The sample size was set to be 1/6th of the sphere radius in the scene at normal scale.
You can notice that the number of samples again does not depend on the image resolution, but it does depend on the scene size.
Also notice how the samples near the camera appear larger because of the perspective - in comparison to the Screen scale mode, which compensates for this effect and tries to make the samples with more or less equal size on the image.
Section | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||
|
Section | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||
|
...
border | true |
---|
...
width | 10% |
---|
Resolution 500x600
Column | ||
---|---|---|
| ||
Column | ||
---|---|---|
| ||
Column | ||
---|---|---|
| ||
...
border | true |
---|
...
width | 10% |
---|
Resolution 1000x1200
Column | ||
---|---|---|
| ||
Column | ||
---|---|---|
| ||
Column | ||
---|---|---|
| ||
Light Cache Advanced Parameters
Reconstruction Parameters
Section | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
These parameters control how the light cache is used in the final rendering, after it has been calculated.
|
Example: Retrace Threshold
The first set of images shows how the Use retrace threshold option alongside the Retrace threshold value can be used to reduce light leaks due to the light cache interpolation. The scene is an interior with parts of the exterior visible. For the GI settings, Brute Force is used for primary bounces (it is selected as the Primary engine in the GI tab of the Render Settings) and Light cache is the Secondary engine.
...
The bright light cache samples from the exterior blend with the darker samples from the interior, causing light leaks when the light cache is calculated. The Use retrace threshold option (with the default Retrace threshold value of 2.0) successfully resolves the problem at the expense of increased calculation time for the light cache. When disabled, corners in the scene produce light leaks and inaccurate shadows. This is visible in the shelving unit and on the ceiling's adjacent wall. When enabled, light leaks are successfully eliminated at the expense of longer calculation time.
Section | ||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
The second scene in this example shows how the Use retrace threshold option can be used to improve the appearance of glossy reflections and refractions with the Use 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.
Before after | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
|
Before after | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Without retracing, the light cache samples are clearly visible in the glossy reflections and refractions.
In this third example, when Use retrace When Use retrace threshold is turned on, the Retrace threshold value determines whether the brute force will be used instead of light cache near corners or objects that are close together. When the Retrace threshold is greater than 0, only brute force is used, which helps give a far more accurate result, although this may slow down rendering. However, if the Retrace threshold value is 0.0, then only the light cache will be used and thus, retracing is disabled. This will be faster but less accurate and more prone to noise and artifacts from light leakage.
...
UI Text Box | ||
---|---|---|
| ||
If a higher Retrace threshold value is used, while light leakage and artifacts disappear, brute force would be used for a larger area and, as a result, the render may appear more noisy. Therefore the default value of 2.0 is sufficient in most cases. |
Section | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Notes
...
Fancy Bullets | ||
---|---|---|
| ||
|
...
|