File: object_info.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 (64 lines) | stat: -rw-r--r-- 1,803 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
.. _bpy.types.ShaderNodeObjectInfo:

****************
Object Info Node
****************

.. figure:: /images/node-types_ShaderNodeObjectInfo.webp
   :align: right
   :alt: Object Info Node.

The *Object Info* node gives information about the object instance.
This can be useful to give some variation to a single material assigned to multiple instances,
either manually controlled through the object index, based on the object location,
or randomized for each instance. For example a Noise texture can give random colors or a Color
Ramp can give a range of colors to be randomly picked from.


Inputs
======

This node has no inputs.


Properties
==========

This node has no properties.


Outputs
=======

Location
   Location of the object in world space.
Color
   Object color, same as *Color* in the :menuselection:`Properties --> Object Properties --> Viewport Display`.
Alpha
   The :term:`Alpha Channel` component of the object's viewport display color (see the *Color* output for
   more details).
Object Index
   Object pass index, same as *Pass Index*
   in the :menuselection:`Properties --> Object Properties --> Relations`.
Material Index
   Material pass index, same as *Pass Index*
   in the :menuselection:`Properties --> Material --> Settings`.
Random
   Random number unique to a single object instance. Output is a Float between 0.0 and 1.0

.. note::

   Note that this node only works for material shading nodes;
   it does nothing for light and world shading nodes.


Example
=======

.. figure:: /images/render_shader-nodes_input_object-info_example.png
   :width: 640px

.. figure:: /images/render_cycles_render-settings_motion-blur_example-cubes.jpg
   :width: 640px

   `Example blend-file <https://archive.blender.org/wiki/2015/uploads/0/03/Blender2.65_motion_blur.blend>`__.