A scene (R16) that demonstrates the 'object mask' workflow can be found here.
Volumes do not support object masks.
Rendering a procedural with an object mask will override shaders in the procedural.
Let's use an example scene containing some primitive objects.
Our goal is to add the Sphere and the Cone to object_mask1 AOV and everything under the Null group to object_mask_group AOV. First, we have to assign the objects to AOVs which is done by a special tag.
Add an Arnold Object Mask tag to the Cone and Sphere object. AOV name of the tag is automatically set to object_mask[index] where [index] is a number defined by the existing AOVs in the scene. The first tag gets object_mask1; second is object_mask2, etc. If you added the tags one by one, just change the AOV name in the second tag to object_mask1.
Arnold Object Mask found under C4DtoA Tags menu. Object Mask Tag will appear in Object Manager. Rename the AOV in the Attribute Manager.
Add an Arnold Object Mask tag to the Null object and change AOV name to object_mask_group. The Arnold Object Mask tag is hierarchical which means an object inherits tags from its ancestors. In this case, Sphere has both the object_mask1 and the object_mask_group from the Null.
Now we have to activate the object mask AOVs.
- Go to the Arnold Render Settings and select the AOVs tab. All object mask AOVs has the (custom) postfix which you can search for. Activate both AOVs by selecting them and clicking on the > button.
Once you click OK, a display driver is created in the Object Manager window containing the activated AOVs.
Display driver with the object mask AOVs
When you render the scene, you will find your object masks under the Layer tab in the Picture Viewer.
Object mask AOVs rendered in the Picture Viewer (the sphere has a displacement shader).
If you change the AOV name in the Arnold Object Mask, tag, you will have to maintain your activated AOVs. You will need to open the Arnold Setup AOVs dialog, remove the old AOV and activate the new one.