This page gives information on the Cryptomatte Render Element.

Page Contents ×

Overview


Cryptomatte is a method developed by Psyop for efficiently encoding accurate mattes. It uses typically three to five render elements (which are automatically generated) with OpenEXR files, which removes the hassle of creating dozens, or hundreds, of Multi Mattes. Using the Cryptomatte plugin for NUKE or Fusion, mattes can be extracted through directly picking objects or entering object names. Note that single-channel EXR files using DWA compression are supported, in addition to multichannel EXR files.

Compared to the Multi Matte Render Element, Cryptomatte does not require any additional setup to the scene, like specifying object IDs, material IDs, etc

 

 Currently, the Cryptomatte Render Element requires the Bucket Image Sampler type.

 

UI Path



||Render Settings window|| > Render Elements tab > Cryptomatte


Parameters


The parameters for this render element appear in the Attribute Editor under Extra VRay Attributes.

 

 

Enabled – When enabled, the render element appears in the V-Ray frame buffer.

Filename suffix – The text added to the end of the rendered file, when saved as a separate file (e.g. myrender.cryptomatte.exr).

ID type – Specifies how the ID mattes are determined.

Node name – Creates mattes by node names.
Material name – Creates mattes based on the materials in the scene.
Node name with hierarchy – Creates mattes by node names and takes the node hierarchy into account for linked or grouped objects.
V-Ray user attribute – Creates mattes with objects that include the V-Ray User Attribute specified in the User attribute name field.
Asset (reference scene) name – Creates mattes based on Maya References made within the scene. Note: This does not create mattes based on Maya Assets, only file references.

Num levels – Specifies the number of levels for the render element, which determines the number of objects that can be distinguished per pixel. If multiple objects intersect at a single pixel, higher-order elements will contain non-zero results. The default value of 6 is normally enough for most cases.

User attribute name – Specifies a user-defined attribute for creating ID mattes when ID type is set to V-Ray user attribute.

 


 

Example: User Attribute Name

 

This example shows how to set the V-Ray user attribute ID type in the Cryptomatte render element options. The V-Ray user attribute ID type is useful to create masks for objects based on a specific user attribute name.

In the example, User Attributes are assigned to the wrenches in the scene. Each wrench has an attribute called wrench with a numeric value that was originally used to create variation for how glossy the reflections would be.

 

 

 

 

 

Based on the attribute name, a Cryptomatte layer can be created to mask only the objects that have an attribute with the same name.

This is done by setting the ID Type to V-Ray User Attribute in the Cryptomatte render element. The User attribute name is set to wrench to match the user attribute names on our objects.

 

 

 

 

The below images show the resulting render and the Cryptomatte preview with masks for only the objects that have the wrench attribute.

 

 

 

 

 

 

After producing a multichannel exr image with the Cryptomatte layer, we can use it in a compositing application, such as Nuke, to mask out and color correct the objects in our image.

 

 

 

References