Rendering Ambient/Diffuse [Color], Specular and occlusion passes

 

This process uses mental ray. The objective is to achieve a GI look without GI rendering time.

 

The method is called Ambient Occlusion to describe the occlusion or blocking of the ambient light to simulate GI shadows.

 

We will first create a flat lit diffuse pass using only ambient lighting then overlay an occlusion pass [a grayscale or tinted image based on environment map) to represent the shadowing caused by the environment.

We need to make 3 passes:

ambient color pass for main diffuse rendering

ambient occlusion pass to attenuate the diffuse pass
specular pass so we can also control highlights

 

Scene setup

Put your model on a plane

In the environment map, have something simple like a sky gradient.

 

Ambient pass

This pass can be done in different ways. The simplest is, to enable default lights to the scene [viewport/configure] add them to the view [view./add default lights] then turn them off in the light lister.

 

 

Use only the scene’s ambient light.

If you already have lights set up, turn them all off.

No advanced lighting

No skylights

In Environment, turn up ambient value to 140

 

 

The result of this first pass should be a very flat looking render with no cast shadows.

Use the default scanline renderer to render.

 

Specular pass

Turn on, or set up, all your lights, possibly point lights to achieve specular highlights.

Don’t worry at all about the general lighting, only the highlights.

No skylight.

Use render elements to render out the specular pass.

Use the default scanline renderer to render.

The result should be very dark except where you wanted highlights.

In this case I used a number of photometric point lights.

Use render elemetns to make the render.





Occlusion pass

Now, turn on mental ray.

Set up the renderer tab:



Go Standard/mental ray to start a new material.
Apply this to both the model and the plane.


Note -- in the processing tab, you can activate Material Override and drag an instance of the Occlusion material we will be making to temporarily apply occlusion to all the geometry.

 

 

 

 

In the surface slot, add the Ambient/Reflective Occlusion [base] shader

 

 

 

 

Sample settings are the most important. We are setting to 64 for a good balance of speed and quality.

Try using type 0 or 1 to see the results.

Mode 0 goes to a grayscale image that can later be tweaked in PSD for color.

Mode 1 reflects the environment colors of your scene

 

Here is an example of a higher sample setting [256] ... it looks better, but rendering is slow.



The result of this pass will be a single color image with shading.




If you set mode to 1 it would look like this:

 

Compositing in PSD

1 Put the Ambient [Diffuse] layer at the bottom.

2 Using Overlay blending mode, place the Occlusion layer next.
[Some people prefer themultiply blending mode]

3 Finally add the Specular layer with Screen blending mode.