The Wonders of Ambient Occlusion

ambient-occlusion-feature

Absolute realism isn't always the goal when we create imagery with SketchUp. Depending on the needs of the project, image output will vary from simple and diagrammatic to more detailed or photorealistic. Rendering style is usually determined by the level of detail and realism necessary to tell the story, and the simpler the better.

Let's talk about a term that gets thrown around a lot when talking about image rendering: ambient occlusion.

ambient.jpg

What is ambient occlusion?

Ambient occlusion is a shading and rendering technique used by computers to give extra depth to digital models. A rendering engine calculates the appropriate level of exposure for every pixel in an image based on the lighting information from the model. In other words, it helps calculate how realistically shadows appear in a scene, taking into account ambient light and complex shading between neighboring geometries.

Ambient occlusion is not directional; instead it is computed by analyzing the spatial relationships of surrounding geometries and carefully shading the in-between. You cannot control these shadows the same way as other types of shading (sunlight or other directional light sources).

Characteristics & ambient occlusion types

There are three ways to calculate ambient occlusion.

  • Screen Space Ambient Occlusion (SSAO)
    • SSAO creates shadows only around edges of objects that are relatively far apart. This method trades detailed realism for speed while still producing a much-improved image. This is alright because photorealism is not the intended outcome. Images can be produced fairly quickly in little time.
  • Horizon-Based Ambient Occlusion (HBAO)
    • HBAO is a bit more accurate than SSAO, but may be too heavy-handed for some applications. For example, it can make for much-too dark shadows around small and detailed geometries like flowers or blades of grass.
  • High Definition Ambient Occlusion (HDAO)
    • HDAO will create the highest level of real-world shading accuracy, and eliminates over-darkening issues experienced with HBAO. This is the most time-consuming of all the methods.

SSAO best suits our needs so we use this method almost exclusively.

Settings

There are many ways to tweak your settings, depending on the look you're going for. It's essentially a whole lot of math done with the spatial lighting information from the model.

shadow_distance.jpg

Distance refers to the dispersal of the shadow generated. A shorter distance means the shadow disperses quickly. Left is short-distance and right is long-distance.

shadow_contrast.jpg

Adjusting the contrast controls how intense the shadow appears. Left is low contrast and right is high contrast.

shadow_softness.jpg

Softness affects how defined the shadow appears. Left is less soft and right is more soft.

Why is it important?

Ambient occlusion is quite helpful; it can make images look more realistic. Higher contrast at edges give a scene more depth, and can help communicate details more clearly.

A drawback is that by going the extra mile to add ambient occlusion can add large rendering times to the production process. This super helpful SketchUp plugin makes for pretty fast rendering, most images hovering around 5 minutes or less. For higher quality images (like in the 4K range) it could take us about a half-hour (which is still pretty fast for a 3d rendering with ambient occlusion).

Below you'll see two images of the Hawthorne Bridge. The first is an image exported straight from SketchUp, no rendering done.

ao_blog_view_01_none.jpg

Hawthorne Bridge - Ambient Occlusion OFF

02_hawethorne_all_views.jpg

Hawthorne Bridge - Ambient Occlusion ON

The second was improved greatly by the addition of ambient occlusion, though this one was created with Cinema 4D and took several hours. You can see how much the image benefitted from the added ambient occlusion. There is more depth overall and the details in the foreground are more pronounced. The textures and transparencies are more clear, marking an overall improvement in showing off the intricacies of the bridge.


Ambient occlusion is great for adding a layer of realism to a digital image, but there are cases where it's not appropriate to use. A more realistic model is not always necessary or even useful for some of the type of work that we do.

For the model below, ambient occlusion was not an improvement. The goal was to highlight the details inside of this industrial glass melter, but it's pretty dark inside a glass melter so we could not see the components we were trying to highlight. The image may appear more striking but really it's not doing its job. In this case, sticking to a more diagrammatic look by using the baked lighting was the way to go.

blog_ao_on.jpg

Glass Melter - Ambient Occlusion ON

blog_ao_off.jpg

Glass Melter - Ambient Occlusion OFF

Jazzy.JPG

Jazzy Winston is a Visual Designer at Fat Pencil Studio