Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

These options control the Light cache settings when it is selected as the Primary Engine or Secondary Engine Cache settings for the secondary diffuse bounces in the GI rollout.

UI Path

 

||Renderer tab|| > Global Illumination tab 
(with the V-Ray Renderer node selected)

 

Light Cache Parameters


Light Cache Parameters

...

Section
Column
width50%

These parameters affect the calculation phase of the light cache; they do not affect the final rendering until the light cache is used

...

 

Image Removed

 

...

.

Subdivs – Determines how many paths are traced from the camera. The actual number of paths is the square of the subdivs (the default 500 subdivs mean that 250 000 paths are traced from the camera). For more information,

...

see The Subdivs Parameter example

...

 below

Sample Size

...

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

...

the World Scale option is checked or not. For more information,

...

see The Sample Size Parameter example

...

 below.

Show Calc. Phase – When enabled, shows the paths that are traced. This does not affect the calculation of the light cache and is provided only as a feedback to the user. This option is ignored when rendering to fields - in that case, the calculation phase is never displayed.

Store Direct Light – When enabled, the light cache also stores and interpolates direct light. This can be useful for scenes with many lights

...

, since direct lighting is computed from the light cache, instead of sampling each and every light. Note that only the diffuse illumination produced by the scene lights is stored. If you want to use the light cache directly for approximating the GI while keeping the direct lighting sharp, uncheck this option.

World Scale – Determines the unit scale for the Sample

...

Size and Filter

...

Size parameters. When disabled, the units are fractions of the final image (a value of 1.0 means the samples are 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. 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.

...

For more information, see The Scale Parameter example below.

Use

...

Retrace Threshold – When enabled,

...

improves the precision of global illumination in cases where the light cache will produce too large an error. This is especially obvious 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 enabling this option can increase render time.

Retrace Threshold – Specifies the threshold amount relative to the light cache sample size.

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 V-Ray Material, 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 some scenes - up to 3000. This option is available with V-Ray CPU only.

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.

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

...

File.

Don't Delete from Memory – When enabled, the light cache is not deleted at the end of the rendering.

Auto Save – When enabled, the light cache is automatically written to the specified file. Note that the light cache is 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.

Filter Type – 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 below) to decrease the 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 values. 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 Filter 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 Filter size are 2-6 times larger than Sample size. Note that Filter size uses the same scale as the Sample size and its meaning depends on the World Scale check box.

Prefilter – When enabled, the samples in the light cache are filtered before rendering. Note that this is different from the normal light cache filtering 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. 

Prefilter Samples – Controls the number of samples taken during prefiltering.

Depth – Determines the length of the light paths to be traced. It is important to note that even though in Light cache the depth is limited, due to the recursive nature of this method, there are longer paths in the end result. 

Filter Samples – When Filter Type is set to Nearest, this parameter determines how many of the nearest samples to look up from the light cache.

...

Column
width5%


Column
width45%

Image Added


Anchor
subdivsParameter
subdivsParameter

Leak Prevention – Enables additional calculations to prevent light leaks and reduce flickering with the light cache. 0.0 disables the leak prevention. The default value of 0.8 should be enough for all cases.

Retrace Threshold – Specifies the threshold amount relative to the light cache sample size.

 

AnchorsubdivsParametersubdivsParameter 

...


Example: The Subdivs Parameter

 


The Subdivs parameter 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 parameterthe Subdivs parameter, all other settings are the same.

As we add more samples, the noise is reduced, but the render times increase.

Section
Column
width20%

 


Column
width60%
Image slider
minLabel500
maxLabel2000
Panel
borderStylenone

Image RemovedImage Added

Subdivs = 500

Panel
borderStylenone

Image RemovedImage Added

Subdivs = 1000

Panel
borderStylenone

Image RemovedImage Added

Subdivs = 2000

UI Text Box
typeinfo

The image above is not the final rendered result, but just the Light Cache phase for the purposes of illustrating the Subdivs parameter.

Column
width20%

 

 



Anchor
sampleSize
sampleSize
 

...


Example: The Sample Size Parameter


The Sample Size parameter 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 parameterthe Sample size parameter. All other values are the same.

Note the difference in the noise level between the samples.

Section
Column
width20%

 


Column
width60%
Image slider
minLabel0.01
maxLabel0.0403
Panel
borderStylenone

Image RemovedImage Added

Sample size = 0 0.01

Panel
borderStylenone

Image RemovedImage Added

Sample size = 0.02

Panel
borderStylenone

Image RemovedImage Added

Sample size size = 0.0403

UI Text Box
typeinfo

The image above is not the final rendered result, but just the Light Cache phase for the purposes of illustrating the Sample size parameter.

Column
width20%

 

 



Anchor
scaleParameter
scaleParameter
 

...


Example: The Scale Parameter

...

The World Scale option determines whether the Sample sizeSize and Filter sizeSize 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 sizeSize 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
bordertrue
 
Column
width10%


Column
width30%

Scene scaled down to 50%

Column
width30%

 Normal scene

Column
width30%

 Scene scaled up to 200%

Section
 
Column
width10%


Resolution 250x300

Column
width30%

Column
width30%

Column
width30%

Section
Column
width10%


 

 Resolution 500x600

Column
width30%

Column
width30%

Column
width30%

Section
Column
width10%


 

 Resolution 1000x1200

Column
width30%

Column
width30%

Column
width30%

...


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 difference from 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
Column
width10%

 


Column
width30%

Scene scaled down to 50%

Column
width30%

 Normal scene

Column
width30%

 Scene scaled up to 200%

Section
 
Column
width10%


Resolution 250x300

Column
width30%

Column
width30%

Column
width30%

Section
 
Column
width10%


 Resolution 500x600

Column
width30%

Column
width30%

Column
width30%

Section
Column
width10%


 

 Resolution 1000x1200

Column
width30%

Column
width30%

Column
width30%

 

 

...



...



Notes

...

Fancy Bullets
typecircle
  • Do not apply perfectly white or very close to white materials to a majority of the objects in the scene, as this will cause causes excessive render times. This is because the amount of reflected light in the scene will decrease decreases very gradually and the light cache will have has 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 saved 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.