Setting Accuracy and Interpolation for Irradiance Particles

 
 
 

Location:

The Accuracy options are the main settings used to control the render quality of an irradiance particles effect. In addition, interpolation can be used to reduce the rendering time without any obvious loss in the quality (although the effect may not be as accurate, in most cases to the naked eye, it will be good enough).

Setting Additional Indirect Passes

Set the number of additional Indirect Passes you want to use to collect the indirect lighting. When this option is greater than 0.0, a sequence of passes are done to collect the irradiance coming from every particle position, such that irradiance particles will contain both direct illumination and indirect illumination information. The default of 0.0 means that the irradiance particles will contain direct illumination information and the equivalent of one bounce of indirect lighting.

Setting the Number of Rays

Specify the number of Rays that are shot from a shading point to collect illumination information. The contribution of these rays is averaged, which means that shooting more rays produces more accurate lighting. Sampling the particle map with many rays at every shading point, is the most precise way to calculate indirect illumination with irradiance particles, but it is also the slowest. Rendering times can be very long if you don't use point interpolation (see Setting Points for Interpolation).

The images below show different results when varying the number of rays without using interpolation:

 

Rays = 2

Interpolation = Never

If the number of rays is too low, then the image is likely to display a lot of noise. Shooting the minimum of 2 rays means that at every shading point, mental ray samples two directions for irradiance particles, which is far too few.

 

Rays = 256

Interpolation = Never

Increasing the number of rays makes the indirect illumination less noisy but also increases the rendering time.

 

Rays = 512

Interpolation = Never

To produce this image, mental ray sampled the particle map with 512 rays at every shading point, this is why it took 50 times longer than the original image (without any irradiance particles) to render.

Setting Points for Interpolation

Rendering time can be significantly shortened by using point interpolation.

Interpolation is active by default and is set to Always. If your scene has a lot of reflective and refractive surfaces, you can enable interpolation For Secondary Rays Only. You can also disable interpolation by selecting Never, which is something you may want to do if you are trying to test for how many rays would be needed to get the most accurate illumination effect.

When using interpolation, mental ray adds an extra final irradiance pass in the preprocessing step where it samples the particle map to gather the illumination information for each irradiance particle, which it will use later for interpolation.

When mental ray computes the irradiance at a shading point during rendering, it looks for the n closest irradiance particles, where n is the number of interpolation Points and computes the weighted sum of those irradiance values. This process is much faster than tracing the rays for every shading point.

The images below show the same scenes, but this time with interpolation set to Always, the number of interpolation points remain fixed, and the number of rays are varying as before. Now each scene results in much shorter rendering times. However, the higher quality render (512 rays) is not significantly better to warrant the additional render time, so (for the purpose of this example) the rendering of this scene is optimized at 256 rays with interpolation.

 

Rays = 2

Interpolation = Always

Points = 64

 

Rays = 256

Interpolation = Always

Points = 64

 

Rays = 512

Interpolation = Always

Points = 64

The next step is to determine an optimal number of interpolation Points. The following images show what happens when the Points parameter is changed.

 

Rays = 256

Interpolation = Always

Points = 3 Three interpolation points (the minimum) are too few, and the image displays artifacts because the irradiance at a shading point is computed by building the weighted sum of only these three points.

 

Rays = 256

Interpolation = Always

Points = 64 The general rule for determining an optimal number is to use enough interpolation points to avoid artifacts and retain important details, without significantly increasing the rendering time. Values between 50 and 64 points work quite well for most scenes.

 

Rays = 256

Interpolation = Always

Points = 256

Creative Commons License Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License