Using Custom AOVs to Create Mattes

Login to Follow
  • Film & VFX
  • Games
  • Design Visualization
  • Shading
  • Arnold
  • Maya
Skill Level
  • Beginner
30 min

This tutorial shows a very simple technique to create and render mattes using custom local AOVs. This is particularly useful if you also want to render a custom effect that is not available from the existing AOV list in MtoA. This custom AOV can be used with any compositing software such as Nuke.

The scene file can be downloaded here.

  • Start off by creating two spheres and assign a Standard Surface shader to each one. Change the Base Color for each Standard Surface shader. We will replace the shading of these spheres independently by adding a custom AOV.

  • Select the Shading Group for one of the spheres and add a Custom AOV. Name it 'mask1'. This mask will be used to create a white matte (alpha channel) for the sphere.

Click on 'Add Custom' and name the new AOV 'mask1'

  • Create a Surface Shader and set its color to white. This will be used as the white color for the mask.

  • Middle drag the Surface Shader onto the newly created 'mask1' AOV. Make sure you drag it onto the text 'mask1', otherwise the connection will not be made properly.

  • The connection editor will appear. Connect the 'aiOutColor' of the Surface Shader to the 'aiCuscomAOVs[0].aovInput' of the 'ai_aov_mask1'.

Once the connection is made, you should have a shader network that looks like this:

White Surface Shader connected to custom AOV - 'mask1' of Standard Surface shader

  • Repeat the above procedure for the other sphere. However, this time create a black Surface Shader.
  • Render the scene. You should see that the Surface Shader connected to the custom AOV 'mask' has overridden the Standard Surface's shading.

The finished render should look like this:

Red sphere renders as pure white and green sphere renders as black

An alternative method is to use a Write Color shader. Instead of connecting the surface shader to the mask1 AOV, you can connect a Write Color in-between.

Posted By
  • Arnold
  • Maya
  • Shading
To post a comment please login or register