In|Framez® Papers

Stabilizing Low Ambient Occlusion Sampling

By Homam Bahnassi


This article is divided into the following sections:


Introduction

Ambient Occlusion (AO) became very popular in CG rendering. It adds realism and depth to the scene very easily without the need of adding any direct or indirect lighting systems. However, this is not for free. Until now, with modern hardware, rendering accurate and stable AO passes for complex scenes requires considerable time.

One of the main factors that affects the rendering time is the number of AO samples. For the same frame and same aliasing sampling settings, raising the number of AO samples increases the rendering time. In contrast, lowering the AO sampling values renders fast. But at the same time it results grainy rendering. This graininess may be acceptable for static frames, but for animation sequences it is a not, because as the animation plays, this grain will start looking like disturbing noise. The brute-force way to remove this noise is to raise the AO sampling until the noise is smoothed out, which is expensive as explained previously.

In this article, a very simple and effective technique will be presented to eliminate the noise that is caused from low AO samples in animation.

Stabilizing low AO sampling

The main idea for stabilizing the graininess that is caused from the low AO sampling is to apply Gaussian interpolation through time. This can be done as a post-process which makes it much cheaper than increasing the number of AO samples.

Basically, the concept for the Gaussian time interpolation is to blend successive frames before and after the analysed frame. The blending factors for these frames are calculated from the Gaussian curve (bell-shaped curve). The following figure shows the blending factors for the preceding frames i-2 and i-1 and subsequent frames i+1 and i+2 based on the Gaussian curve:

Blending factors for the preceding frames i-2 and i-1 and subsequent frames i+1 and i+2 based on the Gaussian curve

Applying this technique in Softimage is straightforward. In the compositing module, the Gaussian Time Blur node achieves the same goal.

To see the results of applying this technique, the following video shows a comparison between the original rendered AO pass and the stabilized one.

As mentioned, this technique is cheaper than the brute force technique (increasing the number of AO samples). However, it has one major backward. In the case of fast moving objects or camera, this technique will cause visible ghosting. But for most cases, this backward is acceptable because for fast moving objects this ghosting will be blended with the motion blur in the beauty pass.

The following table shows the performance measures for the proposed technique (*, **):

Brute-Force Gaussian Time Interpolation
Number of AO sample (128 samples): 8.9 secs Low number of AO samples (8 samples): 1.43 sec
  Post-process phase: 0.06 sec
Total: 8.9 secs Total: 1.49 sec
* Hardware used to calculate the rendering time: ** Aliasing sampling settings: