Here’s how to use the 3ds Max object ids for a simple Object ID AOV.
And here’s the material (aka shader tree) that writes the AOV. Use a text editor to save this as Arnold Scene Source (.ass) file, and then import it into 3ds Max (like I did in the video).
An ASS file is a plain-text file.
### exported: Thu May 21 07:53:19 2020
### from: Arnold 126.96.36.199 [991b08e9] windows icc-17.0.2 oiio-2.2.1 osl-1.11.0 vdb-4.0.0 clm-188.8.131.52 rlm-12.4.2 optix-6.7.0 2020/04/17 09:11:12
### host app: MAXtoA 184.108.40.206 (2021) 3ds Max 23.0.915.2021
declare nodeName constant STRING
nodeName "Material #43"
input1 1 0 0 1
input2 0 1 0 1
input3 0 0 1 1
Arnold takes care of writing the built-in AOVs like N, P, Pref, A, and the all-important beauty. But it’s shaders that write to AOVs like direct_diffuse. That’s why something like this is not going to give you what you might expect in the AOVs:
layer_color doesn’t write to AOVs, so you won’t see the layered result in an AOV like direct_diffuse. standard does write to the direct_diffuse AOV (and others), but in this setup, you have multiple standards and they end up overwriting each other, so you get just the last standard output in the AOVs.
It’s better practice to avoid having multiple standard nodes in a single material; instead, layer the maps that go into the standard parameters like the diffuse and specular colors.
Or you could use a node like mix, or the third-party alLayer, which support AOVs. You can tell if a node writes AOVs by looking at its Attribute Editor: there’s usually a tab or list where you can change the names of the AOV outputs.
Here’s a question asked recently. Given a shading tree like the one below, why don’t AOVs like diffuse_direct include the blended color from the Blend Color node?
The answer: because it is the Standard shader that writes the AOV, not the Blend Color shader. The diffuse_direct AOV gets the diffuse layer calculated by the Standard shader, and that’s it.
The MtoA AOV browser shows you what AOVs are implemented by which shaders:
In this video, I show how to a color mask AOV using a custom AOV and the Utility shader. Topics covered include:
– Creating a custom AOV
– Setting the default shader for a custom AOV
– Setting up the Utility shader to output a color for each shape
– Understanding the difference between the Color and Color ID color modes
To get z-depth data out of Softimage with Arnold, you can use the built-in Softimage Depth render channel. Depth outputs a floating point image, so you need to use a format like EXR.
The Depth channel will give you non-antialised, non-normalized depth data in the alpha channel. In the DCC, it will appear solid white, but that’s because the data is non-normalized.
Non-normalized means that the Z depth values are not between 0 and 1, but between the near and far camera clipping planes, so you need to divide the Z values by the far clipping plane value to get 0..1 values. You can use a compositing package like Nuke for this. Myself, I don’t have Nuke, so I used Composite to normalize the Z depth AOV:
In Maya, you’d use the Z AOV to render out the Z-depth information. In Softimage, Depth is mapped to the Z AOV, and if you export a .ass, you’ll see the “Z” AOV listed in the options node.
outputs 2 1 STRING
"RGBA RGBA sitoa_output_filter Passes.Default_Pass.Main"
"Z FLOAT sitoa_closest_filter Passes.Default_Pass.Depth"