In Nuke Object IDs can be added with the VRayObjProp node. Two or more objects in the scene can share the same Object ID.
The Object ID Render Element creates selection masks based on Object ID. This render element either shows each object (by Object ID) in a solid unshaded color, or stores the Object IDs as integer values within the EXR format or V-Ray Image Format file.
More than one Object ID render element can be generated for a single rendering if desired.
UI Text Box
type
note
The name of the Object ID render element must consist of the name of the Object ID itself, a dot and then any other string to be properly read in Nuke. For example, VRayObjectID.example .
Do not include numbers in the name.
Use the gain slider to see the differences in color between the objects per Object ID.