Ambient Occlusion with Alpha

This tutorial is for all my 3d artist friends out there and it's all about using ambient occlusion in 3ds Max, with the help of just Mental Ray. Ambient occlusion is a widely used pass in the industry these days. There are many different ways to do this, but as per my experience with bigger scenes people generally face lots of problems, e.g. the crashing of scenes, alphas not generating properly for plants or any opaque objects. Another question is, which plug-in to use and how? Lately I have come across a better and crash proof technique using Mental Ray. Let's start with a simple scene in 3ds max. Below I have a simple scene set up with 3 just planes and a box (Fig01).

Fig. 01

Fig. 01

Let's say I have some different materials applied to all the different objects and my planes have two different leaf textures, with alpha in the scene, as shown below (Fig02).

Fig. 02

Fig. 02

Now open the render scene setup option and change the renderer from default scan line to mental ray renderer. Open the material editor and click on an empty slot. Then click on the get material and add an ambient/reflective occlusion map, as shown in Fig03.

Fig. 03

Fig. 03

Here comes the real work! After adding this new map (ambient/reflective occlusion) to an empty slot, add this map to the self illumination slot to both the leaf materials (and any other material with alpha in scene). Be sure to use instance while dragging and dropping onto the slot. Turn off the colour map and change the colour slot for diffuse to pure white, as shown below in Fig04.

Fig. 04

Fig. 04

Now add a new mental ray material to an empty slot with the ambient/reflective occlusion map added to its surface slot (use instance), as shown in Fig05 - 06 below.

Fig. 05

Fig. 05

Fig. 06

Fig. 06

This new mental ray material with an ambient/reflective occlusion map needs to be applied on to any other object in the scene which is not using an opacity map. Once this is done, hit render. Your render should look something like what is shown below in Render01.

Render 1



In this first instance the scene will look very noisy, because the sample rate under the ambient/reflective occlusion map is default at 16, so change this value to around 128 to make your scene less noisy, as shown below (Render02).

Render 2

The whole ideology for me showing this tutorial was imagining that have a huge scene with some 100s of materials applied to the objects, out of which 20 materials are applied to the plants or trees, or any other object that has opacity to this. Using this method you can simply apply one ambient/reflective occlusion map to all the materials with opacity, and make a new mental ray material for the rest of the objects not with any sort of opacity. In one of my personal scenes I had a really hard time getting ambient occlusion with alpha. Using all the different plug-ins gave me lots of problems! However, in the end I found this procedure to be very stable, even in the bigger scenes, without any errors or crashes! I hope this will be a great help to you guys also in the creation of your own scenes.

Fetching comments...

Post a comment