Rendering: Render Elements
This is a multipass system for Cycles 4D. With it you can render an image into its separate elements.
Note: Blender calls these 'render layers' and 'render passes'. To avoid confusion with Cinema's layer system and multipass rendering, we have called them 'render elements' in Cycles 4D.
To use this system, in the Cinema 4D render settings, turn on 'Multi-Pass' then right-click and add 'Post Effects'. Then in the Cycles 4D render settings, Render Elements tab, turn on each element to be rendered. Note that some options are disabled until you enable another (e.g. 'Diffuse Direct' is disabled until you check 'Diffuse Color').
For example, consider this very simple scene, three spheres with different materials and one direct light in the scene:
Now turn on 'Diffuse Color' in the core elements and render to the picture viewer. The rendered image is unchanged but if you switch to the Layers section in the picture viewer and then select Multipass, you can see this:
Now you see only the diffuse colour. The middle sphere is black because it doesn't have a diffuse colour, it's a pure Glass BSDF node..
If you also check 'Diffuse Indirect' you get two layers. One is the diffuse colour as above, and the other shows the indirect diffuse lighting on each object:
You can repeat this for as many elements as you like and will see a layer for each one.
To render a Z-depth pass, check this box. You will need to turn on Multi-Pass in the main render settings and add Post Effects to the passes, plus any others you need.
Light Groups & IDs
These two switches allow you to render separate mask layers for objects in the scene.
The cyObject tag can assign an object ID to the object it is attached to. Different objects can share the same ID or have different ones; those will the same ID will be rendered in the same pass, those with different IDs will be rendered in separate passes.
For example consider this scene with three objects:
Each object has a different ID assigned through its cyObject tag. To render out the mask layers, first enable Multi-Pass in the main Cinema 4D render settings and add Post Effects to Multi-Pass, plus an RGBA pass and any others you might need, of course.
Then, in the Cycles 4D render settings Render Elements tab, check 'Object IDs'.
If you now render the scene to the picture viewer and look in the Layer tab, you will see this:
As you can see, each object has a different object ID so has its own mask layer. You can use this in compositing software such as Photoshop.
This is exactly the same as Object IDs but using a material ID instead. This is set in the Material Settings tab of the material. Then check Material IDs in the Cycles 4D Render Elements settings tab, and passes will be rendered for each material with a different ID.
You can in fact render both Object ID and Material ID passes at the same time if you want to; simply check both switches in the render settings.