Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Multiexcerpt
MultiExcerptNamesynopsis
Center

Scene rendered with ambient occlusion

 


Ambient occlusion is an approximation of global illumination that emulates the complex interactions between the diffuse inter-reflections of objects. While not physically accurate (for that use full global illumination), this shader is fast and produces a realistic effect.

The ambient occlusion shader essentially fires a number of rays in the upper hemisphere defined by the tangent plane of the shading point and returns the ratio of the hits divided by the total rays as a color. When the ratio of the ray hits/total rays = 0, the output is considered fully unoccluded or 'Bright' (with white color by default). When the ratio of the ray hits / total rays = 1, the output is considered fully occluded or 'Dark' (with black color by default). In between, there is a linear interpolation of the two values.

...


...


samples
Multiexcerpt
MultiExcerptNamesamples

Controls the number of rays that will be fired to compute the ray hits/total ratio. Increasing the number of samples will reduce noise and give a better quality result.

Center

Gallery
columns2
includeLabelsamples
sortname


...

Multiexcerpt
MultiExcerptNamewhite_color

The output color when the ratio of the ray hits/total rays is zero (fully unoccluded).  When the ratio of the ray hits/total rays is zero usually the output is considered fully unoccluded or Bright.

Center

Gallery
columns3
includeLabelwhite_color

It is possible to change the white attribute to a color other than white to achieve a specific look:

Center

...

Multiexcerpt
MultiExcerptNameinvert_normals

This attribute changes the direction of the rays being traced. When it is off the rays are traced outside of the surface. When it is on the rays are traced inside the surface.

Center

Gallery
columns2
includeLabelinvert_normals
sortname


The most common use for this is to simulate dirt or erosion, as corners and cracks will become darker. 

Center

Gallery
includeLabelinvert-cube
sortname
reversetrue

 


The example below shows a brick road with an ambient_occlesion pass (with invert_normals enabled) multiplied on top of the beauty render to add 'dirt' in-between the bricks.

Center
Gallery
includeLabelinvert-wall
sortname

...

Multiexcerpt
MultiExcerptNameself_only

Only gathers occlusion against the same object.

Center

Gallery
includeLabelself_only
sortname

...


normal

Multiexcerpt
MultiExcerptNamenormal

Outputs a normal vector that can be linked to normal parameters in ambocclambert and standard_surface shaders.

Privacy settings / Do not sell my personal information / Privacy/Cookies