Post
by Shekn » 24 May 2021, 16:57
In Cycles renderer the scene contains different objects. Each object contains one of three geometry structures (Mesh, Hair or Volume). In most cases one object corresponds to one mesh. But different objects can share the same mesh. In this case these objects are instances of one abstract mesh. cycAttribute shader node gets data from the mesh, which connected to the object. So, if two objects share the same mesh, then this node return the same values. For example, if there is a particles system, where each particle is an instance of one master object, then all these instances share one mesh from this master object. If shader needs some attributes, then it will use attribute values from the master, but not from instances. This is because it gets data from the mesh, but not from the object. That's why there is a parameter "Use Pointcloud Attributes for Instances". If this parameter is turn on, then the system creates different meshes for different particles and copy ICE-attrbute from the particle to each individual mesh (mesh can contains any custom attribute). As a result the scene become very heavy, because it contains many different meshes.
cycObjectInfo works in different way. Each object (even with the same mesh) contains some unique data. Color - one of them. And cycObjectInfo node extract this color not from the mesh, but from individual object. In this case one mesh cane be used in different object with different colors. This approach is very limited, because it works only with very few set of attributes (Color, Object index, Material index and Random value, which is unique random for each object). For example, if you need some custom ICE-attribute (particle age or something similar) to transfer from particles to the shader of the instance, then there is only one possibility - convert instances to individual unique object and write ICE-attrbiute to it meshes.