Table of Contents

This page provides information on the Light Cache rollout under the GI tab in V-Ray's Render Settings.


Overview


This section controls and fine-tunes various aspects of the light cache. The Light cache rollout appears only when the Light cache method is selected as an Engine

For more details on how the Light cache engine calculates GI, please see the Light Cache GI page.


UI Path: ||Properties Editor|| > Render > GI


Parameters


Mode – Determines the rendering mode of the light cache:

  • Single frame – Computes a new light cache for each frame of an animation.

  • From file – 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.

SubdivsDetermines how many paths are traced from the camera. The actual number of paths is the square of the subdivs (the default 1000 subdivs mean that 1,000,000 paths are traced from the camera). .

Sample size – Determines the spacing of the samples in the light cache. Smaller numbers mean that the samples is closer to each other, the light cache preserves sharp details in lighting, but it is more noisy and takes more memory. Larger numbers smooths out the light cache but loses detail. This value can be either in world units or relative to the image size, depending on whether or not the World scale option is checked or not.

Use Retrace Threshold – When enabled, this option improves the precision of the global illumination in cases where the light cache produces 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.

Path guiding (experimental) – Uses a path guiding method (Intel® Open Path Guiding Library) to optimize the sampling quality. Path guiding is useful for scenes where GI or glossy reflections are hard to sample, such as interior scenes or scenes with a lot of occlusion. It is supported by VRayMtl, Environment Fog with enabled GI and Volume Grid with enabled GI. When using this option, note that the Subdivs should be at least 1000, and for same scenes - up to 3000. This option is available with V-Ray CPU only.

Note that Path guiding produces different results, when Max ray intensity or Sub-pixel mapping are enabled compared to when switched off. Different results in the raw render elements are expected, but they produce the correct result when multiplied by the respective filter render element. In some scenes containing diffuse surfaces with low poly count, the results may differ compared to rendering with this option switched off.

Please see the Path Guiding Examples below.

Auto SaveIf this option is set, V-Ray automatically saves the light cache to the specified file at the end of the rendering. This mode is particularly useful if you want to send the irradiance map for rendering on a different machine through network rendering.

File – Specifies the file name to load the light cache from, when the Mode is set to From file




 

 Example: 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.

Here is a scene rendered with different settings for the Subdivs parameter (all other settings are the same).

As we add more samples, the noise is reduced, but the render times increase. When the Subdivs parameter is doubled, the light cache takes approximately 4 times longer to calculate.


Subdivs = 500

Subdivs = 1000

Subdivs = 2000

500
2000





Example: Sample Size


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. 

Here is a scene rendered with different values for the Sample size parameter. All other values are the same.

Note the light leak from the wall on the right in the last image. This happens because samples from the other side of the wall are quite large and end up being used on the side facing the camera.


Sample size = 0.01

Sample size = 0.02

Sample size = 0.03

0.01
0




  

Example: Retrace


The first set of images shows how the Retrace thresh. parameter 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 (by default) 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 Retrace thresh. option (with the default value of 2.0) successfully resolves the problem at the expense of increased calculation time for the light cache.


Off
On



Off
On



The second scene in this example shows how the Retrace thresh. 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.




Example: Use retrace threshold


Disabled
Enabled

 


Disabled
Enabled


Without retracing, the light cache samples are clearly visible in the glossy reflections and refractions.

In this third example, when Use retrace threshold is turned on, the Retrace thresh. value determines whether Brute Force will be used instead of Light cache near corners or objects that are close together. When the Retrace thresh. 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 thresh. 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.

 If a high value is used for the Retrace thresh., while light leakage and artifacts will disappear, brute force would be used for a larger area and, as a result, the render may appear more noisy. Therefore the default Retrace value of 2.0 is sufficient in most cases.




Example: Path Guiding

For this example the scene is lit by VRayDome light with an HDRI and two rectangular VRayLights.
VRayEnvironmentFog is used as atmospheric effect with Scatter GI turned On and General Noise tex for the Fog density and the Fog transparency.
Render Setup: Progressive image sampler with Min. subdivs: 1 and Max. subdivs: 100; Max render time 20min and Noise threshold 0.05; Light cache Subdivs 1500


OFF
ON

Beauty Path Guiding

OFF
ON

SampleRate Path Guiding


 



Was this helpful?