Chaos
Important Notice: Due to a high volume of inquiries, our response times may be delayed. We apologize for this, and appreciate your patience as our team works diligently to address your concerns. Thank you for your understanding! If you are experiencing licensing issues related to the Enscape 4.1 release, please visit our detailed FAQ document here

Corona AO Shader - C4D

In addition to the below content, see also: Corona AO Shader at Chaos Docs

 

 

For maximum realism and physical accuracy, we do not recommend using ambient occlusion to enhance shading. Corona Renderer will take care of darkening concave areas without any special tweaks, as that would be also expected in real life. Ambient occlusion can be however used to create advanced materials, such as rusted metal, worn wood, scratched paint, etc, or to provide "artistic" control over the overall scene's appearance.

 

 

1. How to enable the ambient occlusion effect for a specific material? (dirt, "worn off" effect)


To add dirt or "worn off" effect to your material, simply use Corona AO shader for this:

ao.jpg

 

The Corona AO shader can be used for some advanced effects. For example, Oxidized brass.

AO_bronze.jpg

mceclip0.png

 

It can also be used as a mask to blend two or more materials - in the example below, paint worn metal:

mceclip1.png

 

mceclip2.png

Click to enlarge

mceclip3.png

Click to enlarge

 

Corona AO settings


Occluded/Unoccluded Color & AO Distance

There are three inputs for Corona AO, the first two control the occluded and unoccluded color which can also be controlled with a texture. The third input controls the distance parameter of Corona AO through the use of a texture or a bitmap, which can additionally be controlled using the Max Distance parameter. The following examples showcase how occlusion is applied depending on the Max Distance. Low values provide contact shadowing and amplify possible cavities on the mesh by also being faster to render, while higher values cover larger surfaces/areas but also render slower. 

AO_distance.jpg

Max distance: 1cm, 10cm, 100cm

 

Calculation mode & Color spread

There are three different methods of controlling how occlusion is calculated: 

  • The "Outside" mode is enabled by default and it creates occlusion by looking at the object from its outside (front-facing surface). This is similar to illuminating an object with environmental lighting. 
  • The "Inside" mode will consider occlusion looking from the inside of the object (back-facing surface). 
  • The "Outside + Inside" mode calculates both other modes at once and merges them. 

AO_spread.jpg

Calculation mode: Outside, Inside, Both (Outside & Inside)

 

In the following example, a texture map is being used as occlusion color, with the help of Color Spread the occluded color can replace the unoccluded one by increasing the amount from 0% to 100%. This makes the effect of occlusion stronger and more apparent. 

AO_color.jpg

Color spread : 1%, 100%

 

Max Samples

Usually, there is no need to change the default value. Increasing the number of Samples will provide a cleaner render (less noise) in a shorter time at the cost of other effects such as GI and anti-aliasing. Lower values render faster but look noisier. 

 

Ray Directionality

Low values of this parameter result in uniform ray distribution around the geometry normals. Increasing this value causes the rays to focus on the occluded areas only. The following example showcases how ray concentration changes while Ray Directionality goes from 100% to the default 0%.

AO_ray.jpg

Ray Directionality: 0% (Default), 100%

 

Direction offsets can also be used for the X, Y, and Z axes separately. This is useful when you only need the effect in a certain direction.

AO_off.jpg

Direction Offset: X-Axis 10.0, Y-Axis 10.0, Z-Axis 10.0

 

2. How to add a global ambient occlusion pass for further post-processing?


To enable a pass that can be used to add ambient occlusion to the whole image globally:

 

1. Go to Corona > Multi-Pass: 

multi1.jpg

 

 

2. Add a Texmap pass, and then select Corona > AO as the map:

ao2.jpg

 

 

3. This will result in having the Texmap pass available in the Picture Viewer apart from the Background pass:

06_HowToUseAmbientOcclusion_Example_B.jpg

 

 

07_HowToUseAmbientOcclusion_Example_C.jpg

 

 

4. The two passes can be then blended together within the Picture Viewer to preview the effect:

08_HowToUseAmbientOcclusion_Example_D.jpg

 

 

 

Was this article helpful?
1 out of 1 found this helpful