AOV Object ID

beauty object_id pass (utility shader set to obj)

The aov_write shader in combination with the utility shader is a useful combination for writing out an Object ID pass. This simple setup will allow you to use an ID pass in compositing software to identify certain objects by their color. We will also isolate certain objects and give them specific id's with which to group by color.

Note: Another (easier) method to define object masks is to use the Arnold Object Mask tag. See this tutorial for more details.

A video tutorial can be found here.

Another (easier) method to define object masks is to use the Arnold Object Mask tag. See this tutorial for more details.

A simplified example scene that also demonstrates this *AOV_write* workflow can be found here.

Standard Surface Shader

AOV Write RGB shader

ObjectID added to aov_name of 'aov_write_rgb' shader

Utility shader

Final shader network

Custom AOV

Add a custom AOV and rename it 'ObjectID' (the same name used for the 'aov_write_rgb' shader)

Utility shader's 'Object' mode uses the name of the shapes to compute the color

Object ID Color Mode

Roof

At the moment the roof geometry has multiple colors based on the individual objects that the roof is comprised of. However, we may want to have only one color for the whole of the roof. What can we do? Well, we can add an Arnold tag to the roof geometry and give it an id number.

Roof null geometry has Arnold Tag with 'id 1' added to User options

Roof without 'id' tag Roof with Arnold tag set to 'id 1'

Window

We can also use the Object ID Color Mode to define individual id's to object's inside a group. For example, currently, all of the windows are grouped together and so render with the same id color. If we want to change the color of one of the window objects, we can repeat the above process but apply it to the first window using a different id number (id 2).

Arnold Tag parameter added to first window with 'id 2' added to User options

All windows use current 'id1' assigned to the house 'id2' Arnold Tag assigned to first window within window group