# Cryptomatte

Cryptomatte is a piece of open-source software created by Jonah Friedman and Andy Jones at Psyop. It is also used synonymously for the specific style of image created by the software or other software working alike.
Cryptomatte became a quasi-standard in the industry, because of its ubiquity, integration into popular 3D graphics software, and ease of use.

## Render processing

The program itself creates an ID matte of a scene that can be used to create for example image masks for single or multiple objects in the scene. The ID matte has a very distinctive look and itself is sometimes referred to as cryptomatte. These cryptomatte images are in general very colourful assigning each object or material a different random colour. The program creates mattes that support motion blur, transparency and depth of field using data that is already available at render time.

## Supported render engines

Cryptomatte images can be created by several 3D graphic programs like Blender, Autodesk Maya, Autodesk 3ds Max or Houdini and are usually exported using the OpenEXR file format.
Whether a program is able to generate a cryptomatte or not is determined by the render engine being used. If a program supports more than one render engine it is possible that it can generate cryptomatte images with one engine while being unable to do so with the other one. Blender, for example, had no option to create a cryptomatte image before version 2.80. With version 2.80, only the "Cycles" path-tracing render engine supported creating a cryptomatte whereas "Eevee", the newly added real-time render engine, did not. The support to create cryptomatte images was added to Eevee with version 2.92 that was published on February 25, 2021 one and a half years after Eevee was first published.
The following render engines are known to support creating cryptomatte images:
| Render engine name | Shipped with | Added with version |
| Arnold | Autodesk 3ds Max Autodesk Maya | Arnold 5.2 |
| Cycles | Blender | Blender 2.80 |
| Eevee | Blender | Blender 2.92 |
| Mantra | Houdini | Houdini 16.5 |
| Karma | Houdini | Houdini 18.5 |
| Modo renderer / mPath | Modo | Modo 14.2 |
| Redshift | Cinema 4D (CPU-only) | Redshift 2.6.11 |
| 3Delight | Katana | 3Delight 1.7.32 |
| Unreal Engine (Movie Render Queue) | Unreal Engine | 4.26 |
| Radeon ProRender | | Radeon ProRender 3.1 |
| Octane Render | | |
| RenderMan | | |
| V-Ray | | |

## Supported compositing software

| Compositing software name | Added with version |
| Autodesk Flame | 2020 |
| After Effects | 17.0 |
| Nuke | 13.0 |
| Blender (Compositing Nodes) | 2.8 |
| Houdini (COP) | 16.5 |
| V-Ray (V-Ray Frame Buffer) | 5 Update 1 |
| Adobe Photoshop | Exr-IO 2.0 |
| Gaffer | 0.61.2.0 |

## Workflow example

In a 3D scene a cryptomatte image can be created that assigns a unique ID to each object. The objects usually also have distinct colours that make a scene with many objects very colourful. The ID matte can be used to pick one or more objects in a scene. The ID matte can either be exported or it can be used by the 3D software itself for compositing.
An example workflow would be to use the cryptomatte image to generate a mask that itself is used to limit an effect to only a certain part of the image. It can thereby be used to quickly create masks without the need of re-rendering a whole scene.
The example workflow for images:
* A simple rendered 3D scene
* The scene's cryptomatte view as image
* A mask based on the cryptomatte image with the cube as selected object
The same workflow for video files:
* A simple rendered 3D scene
* The scene's cryptomatte view as image
* A mask based on the cryptomatte image with the cube as selected object
* The cryptomatte (top), rendered (middle) and mask view (bottom) combined
The masks in the examples can be used to limit a visual effect so that only the cube in the middle is affected.

## Licensing

The developers published the program's source code and licensed it under the BSD 3-clause license "to turn it into an ecosystem around an open standard". Their goal was "to see a diverse ecosystem of renderers that can create Cryptomatte images and plugins for compositing applications to decode them".