Arnold shapes have an id parameter that you can use to set up custom ID AOVs.
kick -info polymesh.id
For example, you can Object ID color mode of the Utility shader to generate an ID AOV.
MtoA doesn’t automatically generate IDs, so you need to use the User Options parameter on the shapes to assign IDs.
If you want to give a group of polygon meshes the same ID, so that they all get the same Object ID color, then you can use override sets.
Example: Three sets, each set with an override of User Options that sets the polymesh.id parameter
In Softimage, SItoA does generate IDs, and you can override them using groups and a branch-applied Arnold User Options property.
The Arnold Utility shader has an Object color mode, which assigns colors based on shape names. When we say “shapes”, we don’t mean Maya shape nodes; we mean the Arnold shapes.
C:\solidangle\mtoadeploy\2014\bin>kick -nodes | find "shape"
All these nodes have a name parameter (for example, polymesh.name) that is a unique string identifier in the Arnold universe. So when you use the Object color mode, you get a unique color for each node.
If you’re using Softimage, note that SItoA puts the frame number into polymesh.name, so you’ll get a different color on each frame if you use the Object color mode. For example, on frame 5 a polymesh might be named “Dog_Mesh.SItoA.5000”, and on frame 6, “Dog_Mesh.SItoA.6000”.
In this render region comparison, you have frame 5 on the left, and frame 6 on the right:
In a case like this, you would use the Object ID color mode instead. SItoA automatically assigns unique IDs to the shape nodes (MtoA doesn’t).