Versions Compared

Key

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

...

Overview

...

Section
Column
width62%55%

This rollout is accessible when Light cache is selected as the Engine for  for Secondary bounces in the  in the GI rollout. See the the Light Cache GI topic for more information on how this option works.

 


UI Path: ||Render Settings window|| > GI tab > Light cache rollout (When when Light cache is selected as a GI engine)

 


Image RemovedImage Added

 


UI Text Box
typetip

Dragging and dropping a .vrlmap file into the active viewport sets the secondary GI engine to Light Cache and the Mode to "From file".

 
Column
width5%


Column
width33%40%

 Image Added

Image Removed 

Light Cache Parameters

...

Section
Column
width62%55%

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

Preset – Offers default Light cache settings for either either Still or  or Animation rendering rendering.  

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 will be traced from the camera).  For more information, see see The Subdivs Parameter example below below.  

Sample size – Determines the spacing of the samples in the light cache. Smaller numbers mean that the samples will be are closer to each other, the light cache will preserve preserves sharp details in lighting, but it will be is more noisy and will take takes more memory. Larger numbers will smooth out the light cache but will lose loses detail. This value can be either in world units or relative to the image size, depending on whether or not the the World scale option option is checked enabled or not. For more information, see The Sample Size Parameter example below.

Show calc. phase – Enabling this option will show 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 this option is enabled, the light cache will also store and interpolate direct light. This can be useful for scenes with many lights and irradiance map or direct GI method for the primary diffuse bounces, since direct lighting will be computed from the light cache, instead of sampling each and every light. Note that only the diffuse illumination produced by the scene lights will be 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 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 retrace threshold – When enabled, this option and its corresponding Retrace threshold value improve the precision of global illumination in cases where the light cache will produce too large an error. This is especially obvious with 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.

Column
width5%

 

Column
width33%

Image Removed

Mode

Section
Column
width62%

Mode – Determines the rendering mode of the light cache:

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

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.

Save – 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.

Column
width5%

 

Column
width33%

Image Removed

 

On Render End 

Section
Column
width62%

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.

Column
width5%

 

Column
width33%

Image Removed

 

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 Subpixel 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.

The example below shows some comparisons on render times and quality. See the Path Guiding with Intel® Open PGL in V-Ray article or more information.

 

Column
width5%


Column
width40%

Image Added


...

Anchor
subdivsParameter
subdivsParameter
AnchorsubdivsParametersubdivsParameter 

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
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 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
 
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 size = 0.02

Panel
borderStylenone

Image RemovedImage Added

Sample size size = 0.04

Column
width20%

 

 

...

 

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
bordertrue
Column
width10%

 

Column
width30%

Scene scaled down to 50%

Column
width30%

 Normal scene

Column
width30%

 Scene scaled up to 200%

...

bordertrue

...

width10%

Resolution 250x300

Column
width30%

Image Removed

Column
width30%

Image Removed

Column
width30%

Image Removed

03

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
path
path

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
Column
width40%

Image Added


Column
width10%


Column
width50%

Image Added 


...


Section
Column
width40%

Image Added 

Column
width10%


Column
width50%

Image Added



Mode

...

Section
Column
width55%

Mode – Determines the rendering mode of the light cache:

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

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.

Save – 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.

Column
width5%


Column
width40%

Image Added



On Render End 


Section
Column
width55%

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.

Column
width5%


Column
width40%

Image Added



...

Example: Retrace Threshold

...

bordertrue

...

width10%

 Resolution 500x600

Column
width30%

Image Removed

Column
width30%

Image Removed

Column
width30%

Image Removed

...

bordertrue

...

width10%

 Resolution 1000x1200

Column
width30%

Image Removed

Column
width30%

Image Removed

Column
width30%

Image Removed

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
bordertrue
Column
width10%

 

Column
width30%

Scene scaled down to 50%

Column
width30%

 Normal scene

Column
width30%

 Scene scaled up to 200%

Section
bordertrue
Column
width10%

 

Resolution 250x300

Column
width30%

Image Removed

Column
width30%

Image Removed

Column
width30%

Image Removed

...

bordertrue

...

width10%

 Resolution 500x600

Column
width30%

Image Removed

Column
width30%

Image Removed

Column
width30%

Image Removed

...

bordertrue

...

width10%

 Resolution 1000x1200

Column
width30%

Image Removed

Column
width30%

Image Removed

Column
width30%

Image Removed

 

 

 

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
Column
width50%
Before after
afterLabelEnabled
beforeLabelDisabled
Panel
borderStylenone

Panel
borderStylenone

 

Column
width50%
Before after
afterLabelEnabled
beforeLabelDisabled
Panel
borderStylenone

Panel
borderStylenone

Close Up

...

UI Text Box
typeinfo

 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
 
Column
width20%


Column
width60%
Image slider
Panel
borderStylenone

Use retrace threshold turned off

Panel
borderStylenone

Use retrace threshold turned on with a Retrace threshold valueset to 10.0.

Panel
borderStylenone

Use Retrace threshold turned on with a Retrace threshold value of 0.0.

 
Column
width20%


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 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 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.
  • There is a possibility of "light leaks" with the light cache around very thin surfaces with substantially different illumination on both sides. Sometimes it is possible to reduce this effect by assigning different different GI Surface ID's to the objects on both sides of the thin surface (see the VRayObjectProperties); the effect can also be reduced by decreasing the the Sample size and/or the filtering.
  • The light cache type is now always Hash-map.

 

...

  • The Light Cache calculation cannot be distributed among several machines for distributed rendering.