Irradiance Cache (Legacy)

Tip:The descriptions on this page refer to very old (legacy) Irradiance Cache, which is only designed for use when loading or rendering older Projects. Using the Irradiance Cache (Legacy) function is generally not recommended. If possible, switch to the Irradiance Cache (Legacy)Primary Method.

Note also that the old Irradiance Cache does not work with Team Render. Using the old Irradiance Cache with Team Render will result in Cinema 4D automatically switching to the new Irradiance Cache (with correspondingly different results).
Left rendered using the Irradiance Cache method (medium), right rendered using the QMC method. For each, Diffuse Depth value was set to 3. Render time for the Irradiance Cache method was a fraction of the time required for the QMC method.

The advantages of the Irradiance Cache method (hereinafter referred to as "IR") of rendering GI are moderate render times combined with a very homogeneous and even dispersion of light. artefacting (e.g., spots) that was common in previous versions of GI no longer occur when common settings are used. Also, flickering areas within an animation are also a thing of the past.

The IR calculation analyzes the scene by making several pre-calculations ("pre-passes") in order to determine the most pertinent areas of the scene ("shading points" - the points shown in the pre-passes) so it can ascertain the correct indirect illumination. The brightness values of these shading points will then be saved to the Irradiance Cache as a "Record". This cache can be saved and later reused.

The Irradiance Cache Records will be interpolated for the final rendering in order to "supply" indirect light to the pixels between the shading points.

There are, however, certain disadvantages to using the Irradiance Cache method:

Finer details pertaining to light and shadow can be omitted due to the interpolation between a limited number of shading points. This is where the QMC method has an edge. This is why the IR method offers a Details Enhancement option that combines QMC and IR methods in order to compensate for this disadvantage. The IR method offers numerous additional parameters that let you push its rendering capabilities to the limit for every scene.

Number of Samples Calculated Per Shading Point

A certain number of samples are beamed into the scene from each shading point.

In the General tab you can define the number of samples in the Project in order to ascertain the brightness and color ("sample"), interpolate these values and save them to the cache as "Records".

The more samples that are calculated, the more precise the GI calculation will be for that shading point.

Increasing number of samples from left to right. All other settings remain the same.

As you can see in the image above, sample values that are too low result in a grainy rendering, especially in the corners. If you look closely you will see several spots just over the baseboard at the right of the scene. These can be removed using one of these methods:

Dispersion of Shading Points

Increasing shading point densities from left to right. In the example above, the difference is most noticeable in the room corners and shelf shadows. Note also how the shadow density increases from left to right.

The next six parameters are used to define the dispersion of density of the shadow points between which brightness and color are interpolated during rendering. Increased density results in more recognizable details such as shadows (which is, however, also dependent on the Smoothing settings, which can, in turn, cause details to become less visible if set too high).

As you can see in the example above, smooth surfaces with no edges, corners or similar features receive comparatively few shading points whereas "complex" areas in which a lot of shading and lighting take place contain many shading points. This differing dispersion takes place automatically when the default settings are used and is a result of the fact that indirect illumination in corners and at edges changes greatly.

Tip:If a rendering turns out to be grainy or have a inhomogeneous dispersion of light ("Noise") you can increase the Sample Count instead of endlessly optimizing the Records Density.

Record Density

This parameter contains a set of predefined parameters that are by default optimized for most uses. Only under special circumstances should you change the option to Custom and modify these parameters yourself.

Custom

This option will automatically be selected if one of the underlying parameters is modified.

Preview

As the name suggests, a preview will be rendered quickly - with correspondingly "poor" values that make a quick rendering possible. These "poor" values will result in many GI details being lost or in faulty rendering. This option is especially useful for creating animation preview renderings.

Low

Medium

High

High (Details)

These four options are optimized for use with the Least Squares interpolation method and result in differing levels of quality.

Min Rate[-8..4]

Max Rate[-8..4]

When Cinema 4D creates an Irradiance Cache it initially starts with a lower image resolution (Min. Rate) and progresses pre-pass-by-pre-pass to the final IR resolution (Max. Rate). A value of 0 results in full resolution (pixel size 1*1), a value of -1 = pixel size of "2*2", -2 = "4*4" and so on. The Min Rate value should logically be smaller than the Max Rate value. Positive values can also be applied, which will allow cache Records in the sub-pixel range (can be useful for Sub-polygon Displacement if details are lost).

These resolutions apply only to IR calculations. Since the Irradiance Cache can be scaled relatively easily (i.e. lower IR resolution at larger image resolution) good results can often be achieved even when using smaller resolutions. Hence, these two parameters offer great potential for shortening render times, especially for brightly illuminated, low-detail scenes.

Here's the proof:

As you can see in the images above, the render time is practically cut in half. Although GI artefacting increases, this is usually barely recognizable in brightly lit scenes.

For example, a setting of -3/0 renders faster than a setting of 0/0 with practically the same result. Equal values (e.g., -3/-3) result in only a single pass at the defined resolution.

Radius[0..100%]

A variation of the Radius, Minimum Radius and Density Control parameters. The Use Proximity Correction was disabled (creates additional shading points). In our example the shading points have been colored red for better visibility.

This parameter defines the maximum distance between shading points. The lower the value the more densely the points will lie together. This parameter primarily affects non-critical regions of the scene such as flat, clear surfaces. The effect of this parameter is also dependent on the Density Control value.

Minimum Radius[0..100%]

This parameter defines the minimum distance between shading points. It primarily affects the critical regions of the scene such as corners, edges, etc. The lower the value the more densely the shading points will lie at these regions. This parameter works proportional to the Radius parameter, i.e., if this value is halved the Minimum Radius value will be halved internally as well.

The Minimum Radius parameter primarily affects areas in which details are important (e.g., subtle shadows). However, too many shading points in these areas can cause problems.

In order to make subtle details visible, use the Details Enhancement parameters instead.

Density Control[0..100%]

In contrast to the previous two parameters that primarily affect critical or non-critical regions, this parameter affects the shading points globally throughout the scene. The higher the value the greater the density.

Use Proximity Correction

This is one of the many GI pre-passes and is responsible for having neighboring shading points "assist" each other in critical regions and pass on information regarding the proximity of geometry. New shading points are created and calculated during this process.

This behavior can be disabled here, which will save some render time but also result in poorer render quality (especially in corner and on edges).This option should be disabled if you are using a Max. Rate value of less than 0. Otherwise unnecessary calculations will result.

Irradiance Cache Interpolation

Left before and right after smoothing. Note how smoothing eliminates subtle details like the shadows of the window bars.

All previously described parameters dealt with the placement of shading points and their calculation. The indirect illumination was ascertained for the most critical areas of the scene. In the end the point-by-point dispersion of luminosity must be turned into an Area dispersion for rendering. This is what smoothing does by default: For each surface pixel to be rendered, the Irradiance Cache will be examined to find the Record of the pixel in its immediate proximity in order to interpolate the brightness and color values for that pixel. How this interpolation is done (how many Records and in which proximity should be taken into account?) is determined using the parameters described below:

Tip:This effective type of interpolation (soft, homogeneous light dispersion) is simultaneously the Irradiance Cache's greatest weakness: Subtle details of individual Records are "suppressed" by neighboring Records.

This can be compensated for using the following methods:

Interpolation Method

Least Squares

As is so often the case, this term has its origins in mathematics. What this function essentially does is calculate a curve based on a limited number of points. And this is basically all that happens for smoothing: The Irradiance Cache contains a limited number of Records from which a homogeneous, even dispersion of illumination should be calculated for the entire image.

Weighted Average

This method of interpolation works similarly to the Least Squares method, only that it only interpolates between values (whereas the Least Squares method can also extrapolate, i.e., brighter or darker results than represented by the values defined). So, what is this good for? This method can prevent artefacting when using low-quality GI settings. Furthermore, this method will render faster than the Least Squares method. Disadvantage: The dispersion of light is less homogenous than when using the Least Squares method.

Off

If this option is selected, no smoothing will take place.

Smoothing

A higher degree of smoothing results more details that will be lost but also in a more homogeneous dispersion of light. Select Custom to manually define the Records and Scale values.

Records[8..256]

The Scale and Records values limit the number of shading points to be used (the shading points above have been colored red for display purposes).

The Records parameter defines per pixel to be rendered the maximum number of surrounding Records in the Irradiance Cache that should be included in the interpolation of color and brightness for that pixel. If, however, the Scale value is so low that not enough Records can be included in the interpolation, it may result that fewer Records are included.

The lower the parameter value the fewer Records that will be included in the final interpolation and the less homogeneous the rendering will turn out. Higher values will result in more smoothing but also take correspondingly longer to render.

Scale[1.60..8.00]

This parameter serves to spatially limit the Records included in the interpolation process. The larger the value the more Records that will be included and the softer the interpolation will be - and the longer it will take to render. Alternatively the Records parameter can be used for this purpose.

Irradiance Cache Optimization

Cache Refinement

The Cache Refinement parameter creates additional shading points in areas with high contrast. Each image contains an insert with the final rendering.

The previously described parameters all dealt with the placement of shading points based on a scene's geometric properties. But what if a coarse, dark GI shadow disturbs the entire image?

This is where the Cache Refinement parameter comes in: It compares the Records in the Irradiance Cache and generates additional Records (i.e. shading points) in areas with high contrast (brightness and color) in order to refine and render these areas more precisely.

Tip:Note that the most precise GI shadows can be achieved if you enable Force Per-Pixel (the same option is available for the Discrete Sky Sampling function in the same tab) in the GI settings of the GI Portal/Polygon Light's material.
Tip:Refining the cache can greatly increase the number of Records in the Irradiance Cache, which will not necessarily improve the render quality. Especially when applied in conjunction with incorrect smoothing, this can lead to very grainy results. Hence, only refine the cache if absolutely necessary.

Higher Cache Refinement settings will lead to longer render times but no necessarily to better render quality.

Passes[0..4]

Color correction can also take up several passes (Multi-Passes). Each new pass includes the results of the previous pass and refines it further by creating additional shading points in critical areas.

Use this setting to define the frequency with the cache should be defined.

Color Threshold[0..100%]

Top: Prior to cache refinement. Bottom: After cache refinement. Left smaller, right larger Color Threshold value.

This value defines the degree to which (neighboring) cache Records can deviate from each other with regard to their color (intensity) before additional shading points ("Samples") are added. The lower the value the lower the deviation threshold will be and the more samples that will be added.

Tip:The greater the number of samples ((Quality)) the less deviation between neighboring Records and the less cache refinement has to take place.

Cutoff[0..100%]

This values additionally includes differences in intensity. The lower the value the greater the differences between Records have to be for the color correction to apply. A value of 0 will turn cache refinement off.

Strength[0..200%]

This parameter is used to adjust the cache refinement's overall sample density. A value of 0 will turn cache refinement off whereas larger values will increase the number of shading points ("Samples") correspondingly while taking into account Color Threshold and Cutoff values.

Distance Map

The Distance Map prevents light from passing through surfaces.

Enabling this option generates additional information regarding proximal geometry (any edges nearby?) for each Record in the Irradiance Cache. When values from the Irradiance Cache are used for interpolation when the image is rendered, the Distance Map will be included in the calculations, i.e., interpolation will not occur "around a corner" or through (a thin) wall, which results in artefacting ("light leaks").

Of course the calculation of the Distance Map requires extra render time and this is why this option can be disabled if desired.

Another method of eliminating such artefacting is:

Check Record Visibility

The Check Record Visibility option prevents artefacting on the narrow frame.

Activating this option will cause cache Records that are not included in the current angle of view of the camera to be disabled for rendering. So, what is this good for? As was the case with the previous parameter, this option also tries to eliminate "light leaks" (render artefacting). This parameter, however, primarily tries to eliminate "light leaks" through thin walls (e.g., single-polygon surfaces) as in our example above. Render time will increase slightly, hence this option should be used after noticing that artefacting actually occurs. This option can even be activated after an Irradiance Cache file has been saved.

Details Enhancement

Left with, right without enhanced details. Notice the effect this parameter has on the small geometric details.

The Details Enhancement parameter contains special options to counteract a characteristic of the Irradiance Cache - the "blurring" (smoothing) of details such as subtle shadows. The enhancement of details uses the QMC Sampling method (see also here) in critical areas (for each (!) relevant pixel) like corners, edges, cavities, etc. The Details Enhancement functionality can be seen as a special type of Ambient Occlusion whereby indirect light is included.

In a nutshell: Subtle geometry details are accentuated.

Note that the internal Irradiance Cache will be calculated differently (the algorithm will be aware of the subsequent detail enhancements and will calculate the critical areas differently) if this option is disabled. However you do it, the Details Enhancement will be calculated separately for each rendered image, i.e., re-using a saved cache will reduce render times.

If you apply Details Enhancement you can lower the other Irradiance Cache settings (especially those pertaining to Record Density).

Details Enhancement

Enables or disables the Details Enhancement parameter.

Adaptive Mode

Enabling this option can be an advantage in some circumstances, e.g., several small areas are more grainy than others. Additional samples will then be rendered in these areas.

Estimate Secondary

Center, Estimate Secondary disabled, right enabled. A QMC rendering at the left for comparison. Note how the object contact areas were darkened in the image on the right.

This mode renders faster and offers good results for most applications. However, certain areas will be rendered too dark or too colorful as opposed to a pure QMC rendering (GI Mode QMC), which generally doesn't matter the least bit in most cases. If desired, this behavior can also be disabled (note that grainy renderings can result, in which case the Quality Ratio value should be raised).

Radius[0.05..0.25]

Left: Small Radius value. Right: Larger Radius value.

Use this setting to define the radius within which neighboring objects, corners and edges should be included. Lower values result in only elements in the immediate proximity being "seen", whereas larger values will "see" elements correspondingly far away. Larger values will also result in higher precision and therefore longer render times.

Quality Ratio[5..1000%]

As mentioned at the start, QMC Sampling will take place in critical areas. The Quality Ratio defines how many samples should be used per pixel, which in turn simply defines the graininess of the Details Enhancement. Larger values result in less grainy, softer results but require correspondingly longer render times.

Quality Ratio is an autonomous value that works independently of the rest of the IR settings (a value of 100% is equivalent to 64 samples).

Mode

The options in this drop-down menu are for test purposes only so the effects of the detail enhancement, which are often very subtle, can be made more visible. You can select from the following options:

Combine

Renders accurate results.

Details Only

Renders detail enhancement without GI. Makes the detail enhancement most visible of all options.

Global Only

Renders indirect illumination only.