Cryptomatte is an open-source technology integrated into Twinmotion that generates multiple highly precise mattes using the media you create in Twinmotion. Mattes are exported locally as channels inside .exr files, along with the final rendered image. You can create mattes to isolate the different elements in the media you create, such as the objects or materials, and use them in post-production and compositing workflows to perform selective image adjustments such as color correction and grading, applying special effects, or combining separate elements into one shot.
Working with Cryptomattes
The Cryptomattes feature is similar to the Render layers feature, but offers more flexibility. You can export image masks with both features, but using cryptomattes is faster and less resource intensive.
When you generate render layers, you need to manually select items in the scene and assign layer IDs to them. When you generate mattes, the IDs of the items in the scene are automatically detected based on the matte ID type you select.
Each render layer you create is exported as a separate file and needs to be rendered individually. With the cryptomattes feature, you can save all the mattes you need at one time as channels inside the same file.
Generating mattes has little to no effect on the CPU and GPU processes on your computer.
You can generate mattes using images, panoramas, videos, sequences, and selected parts of videos and sequences. Mattes are exported using the local export workflow, and are saved in the EXR file format. Each time you export a matte, the final rendered media is also exported as an .exr file. When you create mattes for videos or sequences, one .exr matte file is created for each frame in the video or sequence. You can also create mattes for only certain parts of a video or sequence.
You can create mattes for multiple media and media types all at once. For example, if you need mattes for several images and panoramas, you can select all of them, choose the types of mattes you need, and then generate them all at the same time with one export. By default, all the mattes are exported as individual files, but you can also export them as layers inside the final rendered file.
In Twinmotion, you can create mattes based on the following matte IDs: Object ID, Material ID, Container ID, Mesh section ID, and Render layer ID.
Object ID
Creates a unique matte for each object in the scene based on its object ID.
Material ID
Creates a unique matte for each material in the scene based on its material ID.
Container ID
Creates a unique matte for each Scene graph container in the scene based on its container ID.
Mesh section ID
Creates a unique matte for each section of a mesh in the scene based on its section mesh ID.
Render layer ID
Creates a unique matte for each render layer you select based on its render layer ID.
Creating Mattes
To create mattes for one image, follow these steps:
The following instructions explain how to create and export mattes for one image. You can, however, select multiple images, panoramas, videos, and / or sequences and export mattes for all of them at the same time.
Open the Export panel by clicking Export in the footer.
In the Export panel, click the Plus ( + ) button next to Image.
In the Selected media window that appears, select the image.
In the Export panel, click Image to expand the section, and under Format, select the EXR file format.
Click Details to expand the section, and under Cryptomattes select the types of mattes you want to export.
(Optional) To reduce any jagged edges on the objects select the High precision check box.
(Optional) If you selected several matte types, to include all the mattes inside the same file as the final rendered media, select Merge Cryptomatte with export. One
.exrfile that contains the final rendered media and one channel for each matte will be created.Scroll to the bottom of the Export panel, and click the Start export button.
Limitations
Cryptomattes do not take depth of field (DoF) and motion blur into account. If you need to mask these elements, we recommend using render layers.