|Function||Cut out objects from the scene when rendered|
|Nearest C4D equivalent||Simple material with alpha channel enabled|
The Holdout shader is used to cut objects to which it is applied from the rest of the scene. This can be used to generate an alpha mask for use in an image compositor such as Photoshop.
Suppose we have a simple scene like this:
We'd like to generate an alpha mask for the sphere object so a Holdout shader is linked to the Surface port of an Output node in the material applied to the sphere. The result then looks like this:
That isn't especially useful but if we enable Transparent Film in the Cycles 4D render settings, and in the main Cinema 4D render settings Save tab we check the Alpha Channel switch, then saving the render as a .PNG file gives this when seen in Photoshop:
You can see that the sphere - and very importantly any background, including one from a cyEnvironment object - have been made transparent. You can also enable multipass rendering and save the file as a .TIF to get a separate alpha channel.
If you want to see the results in .PNG and .TIF format, download the two files here.
The output of the node. This is a shader output you would link to a shader input port on another node or the Surface port of an Output node.