Creating object mask AOVs that include opacity


  • Create a custom RGB AOV.
  • Use aiWriteColor to write the object mask to the custom AOV. The Input color of the aiWriteColor is the mask color, and you have to enable Blend to get the opacity blended into the Input.
    mask_opacity_aiWriteColor
  • Connect the Out Color of the aiWriteColor to the Color of a Standard shader. That sends the aiWriteColor beauty to the Standard.
    mask_opacity_Nodes
  • Make sure Enable AOV Composition is turned on in the Render Settings.
    EnableAOVComposition

I don’t think this set up works if you plug a Standard into the beauty of the aiWriteColor (eg Standard > aiWriteColor > Standard). With that set of connections, I could never get the opacity right in both the Beauty and the Mask AOVs.

[MtoA] Editing Arnold attributes on multiple objects


If you need to change the same Arnold attributes on many nodes, use the Attribute Spreadsheet. For example, suppose you wanted to turn off the Opaque attribute on a number of objects in your scene. Here’s how to do it:

  1. Select the objects.
  2. Press the Down arrow (aka Pick Walk) to select the shape nodes.
  3. Open the Attribute Spreadsheet.
  4. Click the All tab, and find the Ai (Arnold) attributes you want to change. Drag across all rows, and then type “off” in the last row.
    AiAttributeEditor

AOV Composition and opacity


AOV Composition allows opacity and transparency to carry forward into AOVs. It works only for RGB AOVs, so you won’t see it in the render region (because the xsi display driver always outputs RGBA AOVs).
aov_composition

For example, suppose you have a textured grid with an opacity map:
noicon_grid_w_opacity_map
In the render region, the Main AOV is fine, but the Arnold Direct Diffuse doesn’t have the opacity, even if you enable AOV Composition:
main_vs_direct_diffuse1
However, if you render out the image (with AOV Composition enabled and the Direct Diffuse format set to RGB), you’ll get what you expected:
arnold_direct_diffuse_aov_composition