All scene files, images, derivative images and movies are presented for instructional purposes only and are the sole property and copyright of Michael Vance.

R11 GI Tutorial Part 1
R11 GI Tutorial Part 2
R11 GI Tutorial Part 3

R11 GI Tutorial by Michael Vance, August 8, 2008. Part 3

Irradiance Cache Settings: Finding the right balance.

Once you have selected the right choice of Still Image, Camera or Full Animation mode for the scene you will render, it is time to set the stochastic sampling, record density, interpolation and smoothing settings that will determine the overall quality of your GI cache. The settings that determine the placement of records and their stochastic quality are shown below (Image_23).

Image_23

Stochastic Samples: Radiate a spell.

There are three presets for Stochastic Sample quality, Low, Medium, and High. Alternatively, one can set Accuracy or Sample Count directly from the foldout menu. As a general rule, higher density records require higher stochastic sampling, so if Record Density is set to high, then Stochastic Samples would likewise warrant a high setting. Another general rule applicable to almost any GI setting is, if you're not sure what you need, try a low setting first to see where you are. Please see the QMC section above for more about stochastic sampling.

Record Density: How detailed do you want to get and how much time do you have?

We will return later to the Min and Max Rate settings, but first let's examine the settings that primarily control the distribution of records, Radius, Min Radius, and Density Control:

Once a render is activated, Cinema begins to draw the IR prepass cache, where the size and placement of records is shown in a cell-like voronoi diagram covering the geometry. Each cell represents a single record, and a dot in the center of each is drawn to clarify the exact center point of each record.

Image_24

The image above (Image_24) shows the voronoi prepass pattern (left) prior to final render where they are interpolated and smoothed (right).

Radius: The spacing of records.

Image_25

Radius is the primary determiner of the number a records that will be generated and directly defines how close together records in planar areas will be. The lower the value, the more records will be computed. How low this value needs to be depends on how much shadow definition you need in planar areas. Lower values will produce more records giving better shadow definition, and caustic definition too, at the cost of longer cache render times.

Minimum Radius: Optimal control in corners and curves.

Image_27

Minimum radius determines how many extra records will be added to corners, crevices, curving surfaces and other areas where geometries intersect. The lower this value, the more additional records will be added to these areas (Image_27). This value is a ratio product of the previous Radius value. This means that lowering the Radius value will also create more corner records. Therefore, as the Radius value is lowered (producing more overall records), the Minimum Radius (which produces more additional records in corners) can sometimes be increased (for fewer additional records) because as overall record density increases, fewer corner records may be needed. Overall, it's very easy to become confused here because lower values mean more records, and vice versa, exactly the opposite to how the corresponding settings of the old GI worked.

The image below (Image_28) shows the areas affected by the Radius and Minimum Radius settings.

Image_28

Density Control: The great multiplier.

Image_29

The Density Control behaves like a multiplier for total record density, and it reportedly affects the shape of the falloff curve between planar records (controlled by Radius) and corner records (controlled by Minimum Radius). When the radius value won't go low enough to space the records as closely together as you’d like, increasing the density control value will add more.

Min Rate Max Rate: Save now, pay later.

Image_30

Now that we have learned about planar records and corner records, and how to adjust their density and balance using the Radius and Minimum Radius settings, let's look at the settings that R11 GI offers that can be used to reduce cache render times while preserving shadow definition. As we learned, decreasing the number of records decreases the cache render time at the cost of lessoned shadow definition. Min and Max Rate settings offer yet another alternative. For each value setting below 1, the resolution of the sampled image is halved (one quarter the original size). Roughly the same number of records is computed, so shadow definition is largely preserved, but the time it takes to calculate them is lessened.  The Min Rate changes the resolution of planar area records while the Max Rate changes the resolution of corner/curve records. Each is rendered with a lower resolution, but the overall result of that lower resolution is often barely noticeable, unless very low values are used, and acceptable given the speed gained.

The Min Max Rate in Record Density is to some extent a case of save now, pay later. The GI cache is rendered faster, but part of that gain is lost when the lower resolution cache is again upsampled in the final image render. In general you gain much more than you lose, especially when you are only rendering once. If you plan to render the cache just once and tweak the remainder of the render through multiple final renders, reusing the same cache, you may be better off accepting the longer initial cache render time, as subsequent renders that use that cache will go faster.

Interpolation: Taking the edge off.

Interpolation is the method in which the borders between adjacent records are blended. The four options are Least Squares, Weighted Average, Delaunay, and None. The default choice, Least Squares, is suitable for most circumstances as it seems to produce the smoothest, most visually pleasing result. Weighted Average produces a little tighter result, and Delaunay is reportedly only suitable for very high record densities that use one of the Delaunay Records presets, but I have yet to see a use for it. The None option allows you to see the uninterpolated result which is very useful when wanting to check the shading continuity and stochastic quality of records. Insufficient stochastic counts will show up as high contrast, splotchy records patterns. 

Image_31
Movie File: http://mvpny.com/R11GITutorial/EggboxMV13MG27CompMJPEGm.mov

The image above (Image_31) compares the four interpolation types. On the top left is the uninterpolated and unsmoothed "None" result. This result is very useful because it tells us a great deal about the spacing of records as well as their stochastic quality. First of all, the records are not very dense and as a result the figure's shadow on the wall to his right is not very detailed, and secondly, the large brightness variations of adjacent records show that the stochastic sampling of each record is bordering on insufficient. The top right image shows the result of interpolation using the Least Squares method with medium smoothing. The borders between records are no longer noticeable enough to be a huge distraction. On the bottom left is the Weighted Average result with medium smoothing. The borders between records are slightly more apparent. The bottom right shows Delaunay interpolation with medium smoothing. The record borders are blatant and clearly this method of interpolation is not suitable for this scene given this record count and stochastic quality.

A movie of the four interpolation types shown side by side as above is available for viewing here: http://mvpny.com/R11GITutorial/EggboxMV13MG27CompMJPEGm.mov

Smoothing: Quieting the noise.

Smoothing is the compliment to interpolation and can be used to smooth (some might say blur) an area of densely packed records which is useful for reducing the noise that can easily result from higher record densities having insufficient stochastic quality to blend seamlessly themselves. The cats eye marble image (Image_18) above was rendered originally using medium smoothing, but after the render was finished I discovered unwanted noise from the high record count I had used. The GI prepass cache render had taken 2.5 hours, but since it was saved it could be reused with a higher smoothing value. Rerendering the image with the new smoothing values took only a matter of minutes then since the cache did not have to be rerendered.  A comparison of the two renders is shown below (Image_32).

Image_32

Compositing Tag GI Settings: Per object control.

Image_33

Image_33 above shows the Compositing Tag GI settings. These settings allow you to increase or diminish stochastic and record density counts on a per object basis. I used this tag to enhance the area shown above because I wanted more records and better stochastic quality in the area around the marbles and ring. Since the tag only works on a per object basis and not on polygon selections, I separated the floor into two objects.

Details Enhancement: A bold stroke.

Image_34

Details Enhancement is an option that uses the QMC method to render finely detailed areas. There is a slight render hit which can increase some scene render times by as much as 50%. The result can be similar in appearance to ambient occlusion except that it is restricted to the GI solution, where it should be. Unlike AO it appears to add some additional bounce lighting even when rendering at diffuse depth 1, which adds a subtle beveling effect. A radius setting lets you increase the visible radius of the enhancement, but only within a very small range. As the radius increases, noise may become noticeable in extreme close-up, in which case you should likewise increase the Quality Ratio setting. Although it is said to render its area of influence in a physically correct way, perhaps because of the sometimes sudden differences with areas outside its influence, the effect can sometimes seem as if the outlines of detailed areas are overly accentuated, with no way currently to fade its overall strength. .

Estimate Secondary: This switch estimates the result that higher diffuse depths would have on the Details Enhancement if fully calculated. It is fast and I have yet to see a difference in result. I recommend leaving it on.

Image_35

The Mode menu shown above (Image_35) offers two Details Enhancement preview options. Details Only (Preview) quickly renders out a map showing its area of influence. The Global Only (Preview) option renders out the GI solution with the Details Enhancement's area of influence left blank. This allows one to see how the area of the GI that isn't rendered with DE looks by itself.

The image below (Image_36) shows a render both without and with Details Enhancement (top row) and the two preview modes Global Only and Details Only (bottom row).

Image_35

Sky Sampler: For that great HDRI in the Sky.

Image_37

Sky Sampler is a special GI mode that samples an HDRI mapped image placed on a Sky Object. This mode can render an HDRI scene very quickly with nice detail, but is unfortunately limited to just one diffuse depth which means you will not be able to get any bounce light from it. It can also be used with Cinema's newly enhanced procedural sky (also called Sky). However, because of the single diffuse depth limitation, and because it cannot save or reuse a saved cache, one of the AR modes is probably the better choice when rendering procedural skies. Below (Image_38) are two Sky Sampler renders done with different HDRI images:

Image_38   GI Mode: Sky Sampler / Samples: 70

Details: Last but not least.

Image_39

Caustics:

It is definitely very cool that R11 GI can render refractive and reflective GI caustics, and their settings are found here (Image_39 above).

In light reflection physics, there are two principle kinds of visible reflection, specular and diffuse, specular being a mirror image reflection from smooth surfaces, diffuse being the scatted reflection from rough surfaces. Refraction occurs when light changes speed, and in turn, direction, when passing through different media. Specular reflection from a curved surface and specular refraction through a curved surface give rise to caustic singularities. AR3 GI can render both refractive and reflective caustics, as seen in this tutorial's first scene file.

Chromatic dispersion, whereby white light is split into a spectrum of colors, as in the case of light passing through a prism, cannot be simulated in AR3 GI.

Reflective caustics render slowly and are limited to normal non oversampled material light sources. Refractive caustics on the other hand render without much of any speed hit at all, which explains why this setting is on by default. Refractive caustics work with the material sampling modes Oversampling, but only the normal mode returns a physically correct result. Because the rays are focused with the oversampling modes, the result is not as physically correct, but may be suitable nonetheless. Because oversampling is overall much faster, one trick to getting a more physically accurate refractive caustic when using oversampling is to use a larger area surface with the illuminating portion of the surface restricted to a smaller area than the overall surface using, for example, a circular gradient.

Glass/Mirror Optimization:

Finally, as it is often wasteful of time to calculate GI on glass and mirrors, the Glass/Mirror Optimization setting allows one to skip the calculation of those surfaces that fall below the given threshold. Where the Glass/Mirror Optimization setting is lower than a material's transparency, GI will not be calculated for that material surface. This works even with nested shaders in the transparency channel and with fresnel.

Image_40

Conclusion:

AR3 GI is a full featured GI renderer. The presets make it easy to get good results in minimal time with well arranged controllable options for everything within. Irradiance caching allows one to both rerender and tweak values in a fraction of the original time. If not locked, a cache render, if not already finished, can pickup from the end of the last cache render, working for both stills and animation. Using net render speeds up the calculation of full animation GI caching, but not camera animation or still images. It can render gorgeous refractive and reflective caustics faster and better than the two photon generating caustic options found in standard lights.

Please check the CINEMA 4D documentation for more information about anything not covered here.

R11 GI Tutorial Part 1
R11 GI Tutorial Part 2
R11 GI Tutorial Part 3