File: ao.rst

package info (click to toggle)
blender-doc 4.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 253,604 kB
  • sloc: python: 13,030; javascript: 322; makefile: 113; sh: 107
file content (66 lines) | stat: -rw-r--r-- 2,110 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
.. _bpy.types.ShaderNodeAmbientOcclusion:

*****************
Ambient Occlusion
*****************

.. figure:: /images/node-types_ShaderNodeAmbientOcclusion.webp
   :align: right
   :alt: Ambient Occlusion node.

The *Ambient Occlusion* shader computes how much the hemisphere above the shading point is occluded.
This can be used for procedural texturing, for example to add weathering effects to corners only.

For Cycles, this is an expensive shader and can slow down render significantly.
If render time is a concern, using Pointiness from the Geometry node or baking Ambient Occlusion will result
in faster renders.

.. note::

   :guilabel:`Cycles Only`
    The Ambient Occlusion node will not produce a valid result when:
     - The object is either a :ref:`Caustic caster <bpy.types.CyclesObjectSettings.is_caustics_caster>`
       or :ref:`Caustic receiver <bpy.types.CyclesObjectSettings.is_caustics_receiver>` while the scene
       contains an active :ref:`Caustic caster <bpy.types.CyclesObjectSettings.is_caustics_caster>`,
       :ref:`Caustic receiver <bpy.types.CyclesObjectSettings.is_caustics_receiver>`, and
       :ref:`Shadow Caustic Light <bpy.types.CyclesLightSettings.is_caustics_light>`.
     - :doc:`/render/shader_nodes/osl` is active while using the OptiX rendering backend.

Inputs
======

Color
   Tint for AO output color.
Distance
   Distance up to which other objects are considered to occlude the shading point.
Normal
   Normal used for ambient occlusion; if nothing is connected the default shading normal is used.


Properties
==========

Samples
   Number of samples to use for ray-traced ambient occlusion sampling.
   Keep as low as possible for optimal performance.
Inside
   Detect convex rather than concave shapes, by computing occlusion inside mesh.
Only Local :guilabel:`Cycles Only`
   Only detect occlusion from the object itself, and not others.


Outputs
=======

Color
   Ambient occlusion with color tint.
AO
   Ambient occlusion factor without color tint.


Example
=======

.. figure:: /images/render_shader-nodes_input_ao_example.jpg

   White AO shader.