---
title: "Light Cache Settings"
canonical: "https://documentation.chaos.com/space/DOCSGUIDE/113290543/Light%20Cache%20Settings"
format: markdown
---
**Page Contents**

> Macro (toc)

 

## **Overview**

---

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. For more information on how the Light Cache engine works, see the[ Light Cache GI](https://docs-chaos.atlassian.net/wiki/pages/createpage.action?spaceKey=docsguide&title=Brute%20Force%20GI&linkCreation=true&fromPageId=113290543) topic in the Reference section.

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](https://docs-chaos.atlassian.net/wiki/spaces/DOCSGUIDE/pages/113290537).

 

---

 

UI Path: ||V-Ray Asset Editor||** >  Settings > Global Illumination > Light Cache**  
(When Light Cache is set as the Primary or Secondary Rays engine.)

 

## ** Basic Parameters**

---

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

 

![image](media://55e0d5b3-7357-4949-befe-6dc913ff8c71)

 

 

** 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](https://docs-chaos.atlassian.net/wiki/spaces/DOCSGUIDE/pages/113290543/Light+Cache+Settings#LightCacheSettings-SubdivisionsExample)** * * 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 more noisy 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, depending on light cache **Scale** mode. For more information, see the  [Sample Size Parameter example](https://docs-chaos.atlassian.net/wiki/spaces/DOCSGUIDE/pages/113290543/Light+Cache+Settings#LightCacheSettings-SampleSizeExample) below.

** Scale** – Determines the units of the** Sample size**.

** 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](https://docs-chaos.atlassian.net/wiki/spaces/DOCSGUIDE/pages/113290543/Light+Cache+Settings#LightCacheSettings-retraceExample)** * * below.*

 

---

> Macro (anchor)



 

### **Example: The Subdivs P**arameter

 

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.

 

 

---

> Macro (anchor)



### **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.

 

 

---

> Macro (anchor)



 

### **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.

 

 

 

## **Disk Caching**

---

 

 

**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 in the active time segment only is taken in consideration. Note that it may be better to use** World Scale** 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** – The light cache is loaded from a file. The light cache file does not include the pre-filtering of the light cache; pre-filtering is performed after the light cache is loaded, so that it can be adjusted without the need to recompute the light cache.** **  
**Progressive path tracing** – In this mode, the light cache algorithm is used to sample the final image progressively. 

**Save** – Allows the light cache to be saved a file on disk, for later re-use. 

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

**Don't Delete** – When enabled (the default), the light cache remains in memory after the rendering. Turn 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 where to save the light cache when **Auto save** is enabled.