Cycles: add Object Info node, with outputs object location, object/material

pass index, and a random number unique to the instance of the object.

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. 

http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/More#Object_Info
This commit is contained in:
Brecht Van Lommel
2012-05-21 12:52:28 +00:00
parent ea11bc980a
commit c3e1fce775
20 changed files with 1778 additions and 1575 deletions

View File

@@ -285,6 +285,11 @@ public:
SHADER_NODE_CLASS(LightFalloffNode)
};
class ObjectInfoNode : public ShaderNode {
public:
SHADER_NODE_CLASS(ObjectInfoNode)
};
class ValueNode : public ShaderNode {
public:
SHADER_NODE_CLASS(ValueNode)