Some of you might have already heard of it. Some of you might have not. Some might have seen an occlusion material in your 3D software of choice. Others might have noticed an occlusion pass in their software’s render settings. But what exactly is Ambient Occlusion? What is it good for? And how do I create an Ambient Occlusion pass with Keyshot? Those are the questions I will be answering in this Blog post.
1. First off, what is Ambient Occlusion?
Well, Ambient Occlusion is a 3D shading and rendering technique where the inaccessibility of ambient lighting between object surfaces is calculated to create occluded surfaces. More occluded areas are for example crevices and holes in an object, or contact areas between different objects.
2. So what is Ambient Occlusion good for?
Well Ambient Occlusion is basically a post processing technique that can enrich your 3D renders by adding shadow detail and contrast between object surfaces. And to help ground your object more due to the contact shadows between objects and the ground surface.
Let’s have a look at the following example of a biker boot. In the first image you see the base render.
Base render – Without Ambient Occlusion
In the next image you can see the Ambient Occlusion pass for this object. Notice the location of the shading. It is located in corners, crevices and holes, but also between the boot and the ground.
Ambient Occlusion pass
Now the next image shows the increased depth created by adding the Ambient Occlusion pass over the initial render. This is done by placing the Ambient Occlusion pass as a layer on top of the base render in Photoshop, and setting the layer to the Multiply blending mode. The Multiply blending mode basically makes pure white 100% transparent and pure black 100% opaque in the layer.
So that is the power of Ambient Occlusion. It is a subtle post processing technique which adds a lot of depth to your 3D render.
But how do you create an Ambient Occlusion pass? Well if you are a passionate Keyshot user like I am, you are in luck. I will explain the two options you have with this software.
3. How to create an Ambient Occlusion pass in Keyshot?
As Keyshot is the primary render software I use, I will be explaining how to create an Ambient Occlusion pas using this software. There are basically two options to create an occlusion pass. With one option offering way more control than the other.
Option 1: Ambient Occlusion Render Pass
The first option is the easiest, but provides the least control. This option is done by checking the Ambient Occlusion box in the Layers and Passes section of the Render Settings. Whenever you then make your render, an Ambient Occlusion pass is automatically created. The Ambient Occlusion pass shown at the beginning of this article was this standard option. This option can be sufficient for most cases. But if you require a bit more control, the next option will be better for you.
Option 2: Occlusion material
This second option requires you to set up the Occlusion material yourself. This provides you the added benefit that you can tweak the Ambient Occlusion settings to your liking. The following steps describe how you can set up your Occlusion material. It assumes you already have a scene set up with your objects in it:
Step 1: Copy your model set and name the new set something appropriately like [Model set name] + AO and make this model set the active model set. We are making this copy of the model set because we will be overriding the currently assigned materials with the Occlusion material.
Step 2: Go to the materials tab and either type in Occlusion in the search bar, or go to the Miscellaneous tab and look up the Occlusion material.
Step 3: Now drag the Occlusion material onto the top level of all your objects in your Project window Scene tree. This makes sure all objects in your scene have the Occlusion material
Step 4: Now go to the Material tab in the Project window, and double click on the Occlusion material to make its options active. Now change the material type in the material type drop down to Flat. This material type is not influenced by lights or shadows, and will provide a pure Ambient Occlusion pass.
Step 5: [Optional] Now using this method you can also change the Ambient Occlusion settings in the material. Because the occlusion is actually a texture (with its own settings) that is assigned to the color channel of the material. I’ll go a little more in depth on the settings further on in this article.
Step 6: You can now render your occlusion pass. I normally render the Ambient Occlusion pass with the maximum samples setting set to at least 100. As the occlusion is a texture, the higher the samples, the cleaner the result. These passes normally do not take that long. So if the render is too noisy, you can always up the samples.
4. Occlusion texture settings
If you go the path of the Occlusion material, you have the option to tweak the occlusion texture settings (step 5 from the previous paragraph). Following is a quick explanation of the most common used settings with some examples.
Occluded – This is the color of the occluded part. For an Ambient Occlusion pass you keep this at black. As that will provide the occlusion shadows when you blend the layer in Photoshop using the Multiply blending mode.
Unoccluded – This is the color of the unoccluded part. Respectively, for an Ambient Occlusion pass you keep this at white. As that will provide the transparency for the unoccluded parts when you blend the layer in Photoshop using the Multiply blending mode.
Radius – the radius determines the reach of the occlusion. This setting is based on scene units. The material will consider the computation of occlusion if objects/surfaces are within the assigned distance from each other. If the objects/surfaces are further apart than the assigned value, the material will not compute the occlusion shadows.
Below you see a comparison for a value of 1 mm, and 10 mm. You can see that the higher the number the further the occlusion reaches. So if your object is very big, you might want to tweak the radius appropriately to obtain an adequate occlusion pass to your liking.
Falloff – the falloff determines how fast the transition is from occluded color to unoccluded color. A high value will make the Occlusion pass softer and lean more towards the unoccluded color.
Below you see a comparison for a falloff of 0 and 2.
Bias Normal – this setting determines the contrast between the occluded and unoccluded color. Below you see a comparison for a bias normal of -1 and 10. You can see that as the value increases the Contrast becomes higher and the Occlusion thus located more at the corners.
Bias X, Y & Z – these settings determine an increase in occlusion intensity based on the X, Y and Z coordinate directions in your scene. I have never adjusted any of these settings in any of my renders. But you can always try them out if you want to go a little nuts.
So that is it. I hope you have enjoyed this post and have learned something new. Let me know if you have any questions or comments below.