This page gives information on the Material ID Render Element.
The Material ID Render Element isolates objects with specific materials by Material ID for compositing purposes. This render element provides a mask for individual objects and materials that is easy to select in compositing software.
This render element either shows each material (by Material ID) as a solid unshaded color, or stores the Material IDs as integer values within the EXR format or VRay Image Format file. The Material ID for a material can be set in 3ds Max in the Material Editor.
The Color (with AA) method supports antialiasing at the edges of objects where they meet other objects or the background. The Integer (no AA) method, which assigns a Material ID to each pixel in the render element, does not support antialiasing as each pixel can have only a single Material ID assigned to it.
More than one VRayMtlID render element can be used if desired, for example if you wish to have both solid-shaded color and integer-based render elements for maximum flexibility during compositing.
This render element is enabled through the Render Elements tab of the Render Setup window in 3ds Max and displays its parameters in a rollout at the bottom of the window:
VRayVFB – When enabled, the render element appears in the V-Ray Frame Buffer.
Deep output – Specifies whether to include this render element in deep images.
Output type – The type of output desired:
Integer (no AA) – Material IDs are exported within the EXR or VRay Image format image as an Integer value, one integer per pixel. Colors shown in the V-Ray Frame Buffer are for visual representation only, and are not saved as part of the render element file itself. Antialiasing around the edges of the object or material is not represented.
Color (with AA) – Material IDs are set to a solid color depending on the Material ID set in the 3ds Max Material Editor. A wide range of preset colors is used (red, green, blue, pink, purple, orange, etc.) to accommodate a large number of Material IDs. The edges of objects or materials are antialiased where they meet other parts of the scene.
The Material ID Render Element is useful for isolating geometry in a scene so it can be enhanced or adjusted with post-production or compositing software. Here is an example of how an image looks before and after enhancement.
If antialiasing is a concern for a scene, setting the Output type to Color (with AA) gives best results.
Setting the type to Integer (no AA) renders slightly faster, although with no antialiasing.