|Function||Distributes a texture over an object|
|Nearest C4D equivalent||None|
With the new Replicator node, you can scatter a bitmap over an object. For example, it can produce results like this, where the image of a leaf is scattered over a Plane object:
See 'How to use the Replicator node' below for details of how to set this up.
Note: a * symbol next to the name indicates the parameter also has an input port. A # symbol indicates that the parameter can only be changed with an input node, not in the node itself.
The number of times the texture is to be replicated.
A random seed. Change this if you don't like the way the texture instances are distributed.
If this value is greater than zero, the texture instances will be rotated by an amount between zero and this value (in degrees).
The degree of randomness of the instance rotation. The higher the value, the more random the rotation. For example, if 'Rotation' is set to 45 degrees and 'Random Rotation' is zero, all the instances will be rotated by 45 degrees. As this value is increased the rotation will become increasingly randomised.
The scale of each instance. The larger this value, the larger the scale will be.
The degree of randomness of the instance scale. The higher the value, the more random the scaling. For example, if 'Scale' is set to 0.5 and 'Random Scale' is zero, all the instances will be scaled by the same amount. As this value is increased the scale will become increasingly randomised.
The aspect ratio of the texture instance. By default this value is zero, so the instances have their original aspect ratio. The value can be changed to higher or lower than zero, and the aspect ratio will be changed accordingly.
An input for texture coordinates, for example, the UV output of a Texture Coordinate node.
Alpha Image ID #
The image to be replicated must have an alpha channel to allow the base material of the object to show through between the replicated instances. The 'ID' output port of the Image Texture node should be linked to this input port.
Density Image ID #
You can link this port to the ID output of another Image Texture node to control where the instances are placed. This would normally be a greyscale image to control placement of instances.
See 'How to use the Replicator node' for an example.
The colour of the input image(s) linked through their 'ID' ports.
The alpha values of the input image(s) linked through their 'ID' ports.
The vector output as linked into the Vector input port (e.g. UV coordinates).
How to use the Replicator node
To use this node in a material you will need an image with an alpha channel. This is the image to be replicated on an object. The image is added to an Image Texture node whose 'ID' port is linked to the 'Alpha Image ID' port of the Replicator node. The output of the Replicator node can then be used as required.
The image at the top of the page was produced using this node tree:
As you can see, the only difference from the usual method of applying a bitmap to an object is that the Replicator node comes between the image texture node and the shader.
Controlling image placement
To do this, link the ID port of another Image Texture node to the 'Density Image ID' input port of the Replicator node. This should be a greyscale image or shader. In this example a standard Cinema 4D checkerboard shader was used in the Image Texture node and gave this result:
Here, instances are placed where the checkerboard is white and not where it is black.
Using multiple images
What if you want to scatter more than one image, like this:
Now there are three different leaves. This is where the 'ID Packer' node comes in. All you have to do is link the 'ID' port of each image texture node to an input port of the ID packer node. This has a single output which is linked to the Replicator node's 'Alpha Image ID' port. This node tree should make it clear:
Again, the only difference is the insertion of the ID packer node between the image texture and replicator nodes.