It associates an instance to the corresponding point from the point cloud that was used by the scatterer or the combiner to compute the position of objects. It can then be used by another texture that is able to compute a projection from the position of the point (eg: a spatial texture) or by a Support Color texture that is able to evaluate the support geometry of the point cloud.
Typical setup of the Instance Color texture
If the object is not instantiated, the instance color texture returns a black color. This is why it is generally used before a blend node, so that the shader can still be used for non scattered objects.
Clarisse instancing/scattering system is hierarchical. Indeed, you can have a scatterer scattering another scatterer and so on. Using Parent Level attribute, you specify the hierarchical level of your instance. For its texture, the Instance Color will then use coordinates supported by the correct point cloud.
A single leaf (figure 1) scattered on a tree (figure 2). Each leaf receives a different color. Colors are based on the texture (figure 4) mapped using the texture coordinates of the point cloud used to scatter the leaves on the tree.
The resulting tree is then scattered on a grid. You can see the same pattern which is repeated on each tree. This is because the Parent Level of the instance color texture is set to 1. It then uses the same texture coordinates as shown in figure 2 to drive the color of each leaf.
The same setup, but now with Parent Level set to 3. The texture coordinates are now extracted from the array point cloud (level 2 being the combiner containing each tree).
Thanks to the hierarchical scattering system, you can get infinite variations using this powerful texture node. For example you can draw patterns on crowds or create very realistic cities using instance color texture to switch different versions of same assets controlled by a drawn texture map. The possibilities are endless. Here is an example using the Instance Color texture on a forest:
The ground support object (shaded)
The texture map applied to the ground used to check the texture coordinates
The same texture map connected to the instance color texture used on the leaf material
Same render using the figure 4 texture
It is also possible to use the Parent Level attribute to locate a specific object in reversed order using negative values. When set to -1, the node returns the information of the top most combiner or scatterer that owns the instance.
For example, let's imagine that a sphere is inside a combiner B that is itself inside a combiner A:
- 0 will evaluate on the sphere
- -1 will evaluate on the combiner A
- -2 will evaluate on the combiner B