Unity Cryptomatte - Research Project

Unity package that enables rendering "Cryptomatte" ID-mattes from Unity‘s High Definition Render Pipeline

Year: 2020, Produced at: Filmakademie Baden-Wuerttemberg

As part of my research during my Technical Directing studies, I developed a Unity package that enables rendering "Cryptomatte" ID-mattes from Unity‘s High Definition Render Pipeline.
The core of the plugin is a prefab that is added to the Unity scene. It contains a script, which hashes any object/material names with Python, stores the hashed value on a component of the corresponding object and saves the Cryptomatte "manifest" (containing a hash - name mapping) as a JSON file. The plugin uses shader overrides to render out the hash values for each pixel. In Nuke a corresponding gizmo recombines the renderpass with the metadata stored in the JSON file. The result is a working Cryptomatte pass that can be used with the official Nuke "Cryptomatte" plugin by Psyop to easily generate ID-mattes during compositing.

In the video above you can see a demonstration of the tool in action and here you can get a glimpse of the tool's UI:

Production Use

There are still some limitations remaining: the metadata can't be written directly into the header of the EXR files and transparency/anti-aliasing are currently not supported by the tool.
Cryptomatte for Unity was used in the production of our diploma film "Leading Light".  On this project, we were doing a traditional compositing workflow in Nuke based on EXR image sequences we get from our main render engine Unity. Having access to proper ID mattes was really vital to give our images a final tweak in compositing.
Here are production examples from some of the shots I did lighting and compositing on:

Download from Github (coming soon)

I am currently in the process of cleaning up the code and testing it before I put it up on Github.
So if you are interested in trying out the tool swing back soon!