This page provides information about the Light Cache GI Engine in V-Ray for SketchUp.
Light caching (called "light mapping" in older versions of V-Ray) is a technique for approximating the global illumination in a scene. This method was developed originally by Chaos Group specifically for the V-Ray renderer.
This rollout is available only if Light Cache has been chosen as either the Primary Rays or Secondary Rays GI engine in the Global Illumination Settings.
||V-Ray Asset Editor|| > Settings > Global Illumination > Light Cache
(When Light Cache is set as the Primary or Secondary Rays engine.)
These parameters affect the calculation phase of the light cache; they do not affect the final rendering.
Subdivs – Determines how many paths are traced from the camera. The actual number of paths is the square of the subdivisions (the default 1000 subdivs mean that 1 000 000 paths will be traced from the camera). For more information, see the Subdivisions Parameter example below.
Sample Size – Determines the spacing of the samples in the light cache. Smaller numbers mean that the samples will be closer to each other, the light cache will preserve sharp details in lighting, but it will be noisier and will take more memory. Larger numbers will smooth out the light cache but will loose detail. This value can be either in world units or relative to the image size. For more information, see thebelow.
Screen Space – The 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 will be smaller, and samples that are far away will be 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.
World Units – The sizes are fixed in world units everywhere. This can affect the quality of the samples - samples that are close to the camera will be sampled more often and will appear smoother, while samples that are far away will be noisier. This value might work better for fly-through animations, since it will force constant sample density everywhere.
Retrace – 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. For more information, see the Retrace Parameter example below.
Use Camera Path – When enabled, V-Ray calculates the GI samples for the entire camera path instead of just the current view. This option is available only if there is an animation set up in the project.
Use Camera Path can be enabled to save the cached map by only rendering the first frame of an animation. The map can then be loaded and used for each frame, saving a considerable amount of time
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.
Here is a scene rendered with different settings for the Subdivs parameter (all other settings are the same). As more samples are added, the noise is reduced, but the render times increase. When the Subdivs parameter is increased twice, the light cache takes approximately 4 times as long to calculate.
Example: 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 parameter. All other values are the same. Note the light leak from the wall on the right in the last image - this is because samples from the other side of the wall are quite large (because of the Screen Scale) and end up being used on the side facing the camera (compare this with the World Scale in the above example). Note the difference in the noise level between the samples as well.
Example: The Retrace Parameter
The first set of images shows how the Retrace 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 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.
Disk Caching rollout is available only in advanced mode of the Global Illumination rollout.
Mode – Controls the mode of the irradiance map:
Single Frame – When enabled, the last GI map calculated stays in memory after the rendering has finished
From file – When enabled, V-Ray does not compute the photon map but loads it from a file. Hit the Browse button on the right to specify the file name.
Keep File – When enabled V-Ray keeps the photon map in memory after the scene rendering has finished. When disabled, the map is deleted and the memory it took is freed. Enabling this option can be especially useful if you want to compute the photon map for a particular scene only once and then re-use it for further rendering.
Auto-Save File – When enabled, V-Ray automatically saves the caustics photon map to the provided file when rendering is completed. Specifies the file location where the caustics photon map is saved after rendering.
- Do not apply perfectly white or near-white materials to the 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.
- The Light Cache calculation cannot be distributed among several machines for distributed rendering.
- When using Auto Exposure/Auto White Balance options of the camera, make sure to select Light Cache as a secondary GI engine. Light Cache Disk Caching mode is not supported, use the Single Frame mode instead.