Ambient Occlusion Animation

The purpose of this workflow is to generate a lighting system that will produce good indirect illumination without the use of Final Gather. The point is to be able to animate objects and get a good updated lighting solution for each frame. We will be using AO with the Custom Ambient Light Color map. The map will be a spherical projection of a mr Physical Sky that will align with the scene's Sun light direction. We will use this utility to mass update our A&D; material.

The combination of the map and AO gives the scene the illusion of daylight indirect illumination that takes into calculation the proximity between objects (Fig.01).

Fig. 01

Fig. 01

Materials, Gamma and Exposure

This workflow uses the AO map option in the A&D; material, so it is crucial that all your materials are A&D; (no Pro Mat stuff). Now, just try to follow Fig.02 - 03 to start with and change it later as you see fit. The Unitless Physical scale use is important in this workflow; it will work accurately with the image brightness and will look normal in the Material Editor, so you don't get over-exposed material previews, which makes it hard to work with.

Fig. 02

Fig. 02

Fig. 03

Fig. 03

Create a few objects on a plane so you can test shadows, AO and lighting. Make the objects life sized so you can see how they will work with a real world scale. If your objects are too small or too big you'll get extreme results (too much or not enough shadows and light). The large sphere in my scene is 12' in diameter; you can see the RPC on the side for scale. Now add a daylight system and make sure you create a mr Physical Sky shader in your environment. You can make a test render now and save it for a later comparison.

Now we will replace the Skylight and FG solution with our AO Ambient Light map. We do that by the use of a bitmap in the Custom Ambient Light Color. The bit map in this example was generated using a WrapAround (Lume) shader in the Lens slot (Render Settings > Renderer) in an empty scene with Daylight system and a mr Physical Sky in the environment map. The camera was pointing at the straight horizon. After some blurring in Photoshop, it should look like this (Fig.04).

Fig.04

Fig.04

Plug this map into the AO Ambient map of one of your materials (in the Material Editor, not the utility yet). To start, set up your map as shown in Fig.05.

Fig. 05

Fig. 05

Then open the utility and press the Load Ambient Map button in the AO section to load an instance of that map (you can find it if you click on Browse From: Scene). Press Update Map to populate this map in your entire scene (Fig.06).

Fig. 06

Fig. 06

U Offset

As you can see from the AO map, it suggests the location of the sun in your sky. So this setting should be adjusted to match the location of your actual sun. In my opinion, the best way to do that is to switch to Top view and do test renders of a sphere.

The left sphere was rendered with the actual Sun light only. The two spheres at the center are with the AO map only (with the respective setting of U offset) and the last one shows the combination. (Fig.07).

Fig.07

Fig.07

Now make sure you turn off Final Gather and render (Fig.08).

Fig.08

Fig.08

At this point you might want to switch between the two solutions for quality and accuracy comparisons (AO > FG). To do this quickly you can turn on FG, and in the utility switch to Global Ambient and force it. This will make use of the color swatch in your environment - just make sure it's black.

I hope you found this tutorial useful!

Fetching comments...

Post a comment