This section allows the user to control and fine-tune various aspects of the irradiance map. This section is enabled only when the irradiance map is chosen as the GI method for primary diffuse bounces.

Some background for understanding how the irradiance map works is necessary in order to grasp the meaning of these parameters.

Irradiance is a function defined for any point in the 3D space and represents the light arriving at this point from all possible directions. In general, irradiance is different in every point and in every direction. However, there are two useful restrictions that can be made. The first is the surface irradiance – which is the irradiance arriving at points which lie on the surface of objects in the scene. This is a natural restriction since we are usually interested in the illumination of objects in the scene, and objects are usually defined through their surface. The second restriction is that of diffuse surface irradiance – which is the total amount of light arriving at a given surface point, disregarding the direction from which it comes.

In more simple terms, one can think of the diffuse surface irradiance as being the visible color of a surface, if we assume that its material is purely white and diffuse.

In VRAYforC4D, the term irradiance map refers to a method of efficiently computing the diffuse surface irradiance for objects in the scene. Since not all parts of the scene have the same detail in indirect illumination, it makes sense to compute GImore accurately in the important parts (e.g. where objects are close to each other, or in places with sharp GI shadows), and less accurately in uninteresting parts (e.g. large uniformly lit areas). The irradiance map is therefore built adaptively. This is done by rendering the image several times (each rendering is called a pass) with the rendering resolution being doubled with each pass. The idea is to start with a low resolution (say a quarter of the resolution of the final image) and work up to the final image resolution.

The irradiance map is in fact a collection of points in 3d space (a point cloud) along with the computed indirect illumination at those points. When an object is hit during a GI pass, VRAYforC4D looks into the irradiance map to see if there are any points similar in position and orientation to the current one. From those already computed points, VRAYforC4D can extract various information (i.e. if there are any objects close by, how fast the indirect illumination is varying etc). Based on that information, VRAYforC4D decides if the indirect illumination for the current point can be adequately interpolated from the points already in the irradiance map, or not. If not, the indirect illumination for the current point is computed, and that point is stored in the irradiance map. During the actual rendering, VRAYforC4D uses a sophisticated interpolation method to derive an approximation of the irradiance for all surfaces in the scene

Basic parameters

Min rate – this value determines the resolution for the first GI pass. A value of 0 means the resolution will be the same as the resolution of the final rendered image, which will make the irradiance map similar to the direct computation method. A value of -1 means the resolution will be half that of the final image and so on. You would usually want to keep this negative, so that GI is quickly computed for large and flat regions in the image. This parameter is similar to (although not the same as) the Min rate parameter of the Adaptive subdivision image sampler.

Max rate – this value determines the resolution of the last GI pass. This is similar to (although not the same as) the Max rate parameter of the Adaptive subdivision image sampler.

Hemispheric Subdivision – this controls the quality of individual GI samples. Smaller values make things faster, but may produce blotchy result. Higher values produce smoother images. This is similar to the Subdivision parameter for direct computation. Note that this is not the actual number of rays that will be traced. The actual number of rays is proportional to the square of this value and also depends on the settings in the DMC sampler.

Interpolation samples – this is the number of GI samples that will be used to interpolate the indirect illumination at a given point. Larger values tend to blur the detail in GI although the result will be smoother. Smaller values produce results with more detail, but may produce blotchiness if low Hemispheric Subdivision are used.

Interpolation frames – this determines the number of frames that will be used to interpolate GI when the Mode is set to Animation (rendering). In this mode, VRAYforC4D interpolates the irradiance from the maps of several adjacent frames to help smooth out any flickering. Note that the actual number of frames used is 2*(interp. frames)+1 – e.g. the default value of 2 means that in total 5 irradiance maps will be interpolated. Higher values slow down the rendering and may produce “lagging” effect. Lower values render faster but may increase flickering.

 

 

Mode – this groups of controls allow the user to select the way the irradiance map is (re)used.

  • Single frame – the default mode; a single irradiance map is computed for the whole image, and a new irradiance map is computed for each frame. During distributed rendering, each render server will compute its own full-image irradiance map. This is the mode to use when rendering animations of moving objects. In doing so one must make sure that the irradiance map is of sufficiently high quality to avoid flickering.
  • Multiframe incremental – this mode is useful when rendering a sequence of frames (not necessarily consecutive) where only the camera moves around (so-called fly-through animations). VRAYforC4D will compute a new full-image irradiance map for the first rendered frame; for all other frames VRAYforC4D will try to reuse and refine the irradiance map that has been computed so far. If the irradiance map is of sufficiently high quality as to avoid flickering, this mode can also be used in network rendering – each rendering server will compute and refine its own local irradiance map. Note that this mode is FULLY supported in distributed rendering.
  • From file – in this mode VRAYforC4D will simply load the irradiance map from the supplied file at the start of the rendering sequence and will use this map for all the frames in the animation. No new irradiance map will be computed. This mode can be used for fly-through animations and will work well in network rendering mode.
  • Add to current map – in this mode VRAYforC4D will compute a completely new irradiance map and will add it to the map that is already in memory. This mode is useful when compiling an irradiance map to render multiple views of a static scene. Note that this mode is not supported for distributed rendering.
  • Incremental add to current map – in this mode VRAYforC4D will use the irradiance map that is already in memory and will only refine it in places that don’t have enough detail. This mode is useful when compiling an irradiance map to render multiple views of a static scene or a fly-through animation. Note that this mode is not supported for distributed rendering.
  • Bucket mode – in this mode, a separate irradiance map is used for each rendered region (“bucket”). This is especially useful since it allows the irradiance map computations to be effectively distributed among several computers when using distributed rendering. Bucket mode can be slower that the Single frame mode, since an additional border must be computed around each region in order to reduce edge artifacts between neighboring regions. Even so, there may be such artifacts. They can be further reduced by using higher settings for the irradiance map (the High preset, more hemispheric subdivs and/or smaller Noise threshold for the DMC sampler).
  • Animation prepass – in this mode VRAYforC4D calculates irradiance maps to be used later on for final rendering with the Animation (rendering) mode. One irradiance map is created for each frame and written into a separate file. Note that in this mode you have to render one map for each frame (i.e. you cannot render every Nth frame). VRAYforC4D automatically disables rendering of the final image in this mode – only irradiance map prepasses are calculated.
  • Animation render – in this mode VRAYforC4D renders a final animation using irradiance maps created with the Animation (prepass) mode. Irradiance maps from several adjacent frames are loaded together and blended so as to reduce flickering. The number of irradiance maps that are interpolated is determined by the Interp. frames parameter.

The irradiance map mode that should be used depends on the particular rendering task – a static scene, a static scene rendered from multiple views, a fly-through animation or an animation with moving objects. Refer to the tutorials section for more information.

There are some more buttons in this group that allow one to perform certain operations on the irradiance map:

Load file – this button allows the user to select the irradiance map file which will be loaded if the From file mode is selected. Alternatively, the user can enter the path and name of the file directly in the edit box.

Save to file – this will save to file the irradiance map which is currently in memory. Note that the Don’t delete option in the On render end group must be turned on. Otherwise VRAYforC4D will automatically delete the irradiance map at the end of the rendering process.

Options

Show calc phase – when this option is on, VRAYforC4D will show the irradiance map passes as the irradiance map is calculated. This will give you a rough idea of the indirect illumination even before the final rendering is complete. Note that turning this on slows the calculations a little bit, especially for large images. This option is ignored when rendering to fields – in that case, the calculation phase is never displayed.

On render end

This group of controls instructs VRAYforC4D what to do with the irradiance map at the end of the rendering process.

Don’t delete map – the default for this option is on, which means that VRAYforC4D will keep the irradiance map in memory until the next rendering. If this option is cleared, VRAYforC4D will delete the irradiance map when rendering is complete. This means that you will not be able to save the map manually afterwards.

Auto save – if this option is set, VRAYforC4D will automatically save the irradiance map to the specified file at the end of the rendering. This mode is particularly useful if you want to send the irradiance map for rendering on a different machine through network rendering.

Auto save file – this option is only available if the Auto save option is turned on. If Auto save file is on, then VRAYforC4D will also automatically set the irradiance map mode to From file and will set the file name to be that of the map that was just saved.

Example 1: Interpolation methods

The following examples shows the main differences between a blurry interpolation method (Least squares fit) and a non-blurry one (Delone triangulation). Notice how the images in the first column are more blurry, while the images in the second column are sharper.

Comment
Blurry method (Least squares fit) Non-blurry method (Delone triangulation)
The scene is a simple cube on a sphere as seen from above, lit by a HDRI map. Low hemispheric subdivs and low irradiance map rates were used intentionally so that the difference is more obvious. Both images were rendered with exactly the same irradiance map.
This scene shows the ability of the Delone triangulation method to preserve detail. Notice that the shadows in the right image are sharper. Both images used the same irradiance map.
A close-up of the previous scene. The irradiance map is exactly the same as for the two previous images (it was saved and then loaded from disk).

Example 2: The Delone triangulation method

This example shows the triangles used by the Delone triangulation method to interpolate samples in the irradiance map. Note that the triangles are constructed on the fly from the irradiance samples; no actual mesh is ever created. The vertices of the shown triangles correspond to samples in the irradiance map.

On-the-fly Delone triangulation |
| Interpolated result

Example 3: Sample look-up

The following examples show the differences between the three sample lookup methods and more specifically, their behaviour in areas with changing sample density.

This is the test scene, the left image shows the final image and the right image shows the samples in the irradiance map (it was rendered with the Show samples option checked). The scene itself is a sphere on a plane, lit by a V-Ray area light and a little skylight. The area light had the option Store with irradiance map checked.

Test scene

The samples in the irradiance map

As one can notice, the density of the samples is quite different in the uniformly lit areas and in the shadow transition area. The following three images used exactly the same irradiance map with the Least squares fit interpolation method.

 

Nearest lookup method

Nearest quad-balanced lookup method

Precalculated overlapped method

You can see the ringing artifacts (the white halo around the shadow) caused by the different sample density in the first two images. The last image, rendered with the Precalculated overlapping method is free from those artifacts. It also rendered faster than the other two images.

As a comparison, here is the same image rendered with the Delone triangulation interpolation method.

Nearest lookup method

Nearest quad-balanced lookup method

Precalculated overlapped method

The images are nearly identical. This is because the Delone triangulation method, being a non-blurry method, is less sensitive to the samples that are being looked up, so long as the delone trianglulation can be performed successfully from them.

Example 4: Check sample visibility

The following examples demonstrate the effect of the Check sample visibiliy parameter. The scene is a thin wall lit on the two sides by two V-Ray area lights with different color. Both lights had the Store with irradiance map option checked. The two images are rendered with the Medium irradiance map preset.

Check sample visibility is off

Check sample visibility is on

Notice the light leak in the first image. This happens because near the thin wall V-Ray will use samples from both the sides. When Check sample visibility is turned on, V-Ray will discard the samples from the wrong side.

As a comparison, here is the same image rendered with the High irradiance map preset and Check sample visibility turned off.

High irradiance map preset, Least squares fit

High irradiance map preset, Delone triangulation

The light leak effect is negligible in the left image, and completely absent in the right one. This is because the High irradiance map preset will cause V-Ray to take additional samples at the base of the thin wall, thus decreasing the leaking effect. Using a non-blurry interpolation method (Delone triangulation) further limits this effect.

The conlcusion is that turning on Check sample visibility is only useful for low irradiance map settings. Also note that this option may not work very well for curved objects.

Example 5: The Max rate and control of detail

The following examples show how the Max rate of the irradiance map determines the detail in the GI solution. The scene contains small details with sizes less than a pixel.

Note how a higher Max rate leads a more accurate approximation with the irradiance map, but also to increased rendering times.

Note also that the differences between the irradiance map and the brute force solution appear only in areas with small details. Large flat areas are handled by the irradiance map very easily and accurately.

Choosing an appropriate Max rate depends on what details you have in your scene and on the desired quality. If the image contains relatively flat surfaces with little detail, you can use a lower Max rate. If the scene contains a lot of small sub-pixel details, you need a higher Max rate too. Above a certain point of detailness, the irradiance map becomes too slow and in that case, brute force GI might perform better.

Settings
Image
Exaggerated difference with the brute force GI solution
Fixed AA and brute force GI (correct GI solution)
N/A
DMC AA and Medium GI preset (Max rate is -1)
DMC AA and High GI preset (Max rate is 0)
DMC AA and modified High GI preset (Max rate is 1)
DMC AA and modified High GI preset (Max rate is 2)