[Bf-docboard-svn] bf-manual: [9603] trunk/blender_docs/manual/render: Document new features of the Attribute node.

Alexander Gavrilov noreply at blender.org
Sat Oct 8 17:29:34 CEST 2022


Revision: 9603
          https://developer.blender.org/rBM9603
Author:   angavrilov
Date:     2022-10-08 17:29:34 +0200 (Sat, 08 Oct 2022)
Log Message:
-----------
Document new features of the Attribute node.

Ref rB3cc6fa2019d6 rB2f7234d3e1bbc rBf61ff22967c5f

Modified Paths:
--------------
    trunk/blender_docs/manual/render/cycles/optimizations/nodes.rst
    trunk/blender_docs/manual/render/shader_nodes/input/attribute.rst

Modified: trunk/blender_docs/manual/render/cycles/optimizations/nodes.rst
===================================================================
--- trunk/blender_docs/manual/render/cycles/optimizations/nodes.rst	2022-10-06 16:17:09 UTC (rev 9602)
+++ trunk/blender_docs/manual/render/cycles/optimizations/nodes.rst	2022-10-08 15:29:34 UTC (rev 9603)
@@ -39,6 +39,8 @@
 - Eliminate :doc:`Bump </render/shader_nodes/vector/bump>` with constant Height input, using its Normal input or
   Geometry Normal instead. This is useful for implementing node group inputs that default to normal via routing
   through a no-op Bump before doing math.
+- Replace :doc:`Attribute </render/shader_nodes/input/attribute>` nodes of the View Layer type with the
+  evaluated attribute value (it is constant within the whole Render Layer).
 - Combine multiple copies of the same node with the same inputs into only one instance.
 
 Finally, any nodes that end up not connected either directly or indirectly to the Output node are removed.

Modified: trunk/blender_docs/manual/render/shader_nodes/input/attribute.rst
===================================================================
--- trunk/blender_docs/manual/render/shader_nodes/input/attribute.rst	2022-10-06 16:17:09 UTC (rev 9602)
+++ trunk/blender_docs/manual/render/shader_nodes/input/attribute.rst	2022-10-08 15:29:34 UTC (rev 9603)
@@ -49,8 +49,8 @@
       first in the object data-block, followed by the mesh data-block if not found.
       Custom properties have priority over built-in ones.
 
-      The property value must be an integer, float, or a vector of 1 to 4 floats; properties of other types
-      are ignored. If a suitable property is not found, all sockets of the node, including *Alpha*, output 0.
+      The property value must be an integer, float, boolean, or a vector of 1 to 4 floats or ints; properties of other
+      types are ignored. If a suitable property is not found, all sockets of the node, including *Alpha*, output 0.
 
       .. tip::
 
@@ -59,10 +59,29 @@
          the object, unless overridden by a custom property.
    :Instancer:
       Similar to *Object*, but the attribute is looked up in the instancer particle system settings,
-      followed by the instancer object. If the current object is not instanced, or the property is
-      not found, it falls back to the *Object* mode.
+      followed by :doc:`Geometry Node instance </modeling/geometry_nodes/instances>` attributes
+      (searching from the innermost instancing layer to outer ones), and finally in the instancer object.
+      If the current object is not instanced, or the property is not found, it falls back to the *Object* mode.
+      
+      .. warning::
+         Currently only up to 4 layers of Geometry Node instancing are searched.
+   :View Layer:
+      The attribute is looked up in the current :doc:`View Layer </scene_layout/view_layers/introduction>`,
+      :doc:`Scene </scene_layout/scene/introduction>` and :doc:`World </render/lights/world>`, using the same lookup
+      logic as *Object*. Attributes of this type have the same uniform value throughout the whole Render Layer.
 
+      .. tip::
+         This gives access to a number of useful built-in properties, for example:
 
+         ``color`` or ``world.color``
+            Outputs the value of the :ref:`Color <bpy.types.World.color>` field in the Viewport Display
+            panel of the World properties.
+         ``render.resolution_x``, ``render.resolution_y``
+            Outputs the current :doc:`rendering resolution </render/output/properties/format>`.
+         ``camera.data.angle_x``, ``camera.data.angle_y``,
+            Outputs the effective field of view of the active :doc:`Camera </render/cameras>`.
+
+
 Outputs
 =======
 
@@ -75,7 +94,7 @@
 Alpha
    Alpha channel of the attribute, when available. If the attribute has no alpha channel, generally defaults to 1.
 
-.. note::
+.. warning::
 
-   Currently, attributes are not supported in shaders used for the :doc:`World </render/lights/world>` or
+   Currently, only *View Layer* attributes are supported in shaders used for the :doc:`World </render/lights/world>` or
    :doc:`Light Objects </render/lights/light_object>`.



More information about the Bf-docboard-svn mailing list