Cryptomatte Tools (GUI and Python API)

With Cryptomatte Tools there is no need to manually pick objects in the Compositor and no need to use the Pick output - the add-on allows with a single push of a button to pick multiple selected objects, assets or materials in 3D Viewport.

The addon also keeps track of objects and materials in Cryptomatte nodes, and if you change object/material name, it will automatically update the Cryptomatte ID in all Cryptomatte nodes where it is used.

It is also possible to append objects listed in the Cryptomatte node to current selection; if the selection is empty this allows to easily see what objects are already added to the Cryptomatte node.

It also implements automatic update of Render Result even if the Compositor is not open when adding or removing objects/materials from the active Cryptomatte node. And it is possible to append all objects from the active Cryptomatte node to selection (if selection is empty, it is a quick and easy way to see what objects are chosen in the Cryptomatte node).

Cryptomatte Tools also has Python API to get Cryptomatte ID, to add or remove an object or a material from a Cryptomatte node, and this makes it easy to use Cryptomatte programatically.

You can get the add-on at Gumroad or Blender Market:

This is a video how to install and use the add-on:

Cryptomatte Tools panel in Scene Properties:


If selected objects are already added to the Cryptomatte node then “Add Objects” button will be grayed out to indicate this. The same is true for “Append to Selected” button if all objects in the Cryptomatte node are already selected.

Cryptomatte Tools addon also checks type of what should be in the selected Cryptomatte node. For example, if the Cryptomatte node contains connected to CryptoObject, then “Material” buttons will be grayed out to prevent a mistake from adding a material to the list of objects.

Additionally, in Object and Material Properties there is a panel which displays Cryptomatte ID and allows to add or remove active object or material from the Cryptomatte node without a need to switch to the main panel in Scene Properties:
image_processing20210201-3-2pk9kb

How to use instructions, more screenshots and Python API documentation: https://blendermarket.com/products/cryptomatte-tools/docs

1 Like

Hi Lissanro,

Addon seems to have potential and would like to explore this further although there seems to be issues with the docs on Blender Market. Images point to https://rayen.local/ but this doesn’t appear to exists anymore. I’m afraid to say, that his doesn’t instill confidence in your addon. Please fix.

Thank you for reporting the issue. This is my first time creating documentation on BlenderMarket, I thought images were uploaded to BlenderMarket when I copied and pasted them along with the text, but apparently not, and I did not notice this myself since the site does exist in my local network. I should have checked the code in the editor. I uploaded each image manually and edited image links in the documentation so this is fixed now and should look like this:

Thank you to all who supported me by purchasing the addon. Your support means a lot!

In last few weeks, no new issues has been found and all known issues were fixed, so the addon is out of the beta stage, and current release is considered stable (of course, if somebody finds any issues they are still welcome to report them and I try to fix as soon as possible).

I also have updated the documentation to reflect that Eevee is supported too (requires Blender 2.92 or higher).

The addon had few updates since the last post. At the time of wring, current version is 1.3.2. Among numerous optimizations and bug fixes since my last post here, some new features have been added.

One of new features is creating Color ID Map for Materials, few users requested this, because not all external applications support Cryptomatte maps.

The addon can also generate pass index for objects and/or materials, and you can override material with a single click on a button, then you can render Color ID map. In Scene Properties > Cryptomatte Tools under Pass Index label you can see few button and checkboxes:

1621266567099-1621266567099

If there is active Cryptomatte node and it contains list of objects, pressing “Generate Object Index” button will generate Object Index for each object in the Cryptomatte node, incrementing it by 1 for each object in its list from the base value of 1. The same is true for “Generate Material Index” button, but for working with materials. If “For All Objects” checkbox is enabled, each new object will get unique Object Index. If you need to generate Object Indexes one-time and then want to edit them manually, just double click the checkbox, it will generate the indexes and second click will turn it off, so it will stop doing this automatically.

If “For All Objects” checkbox is enabled, Pass Index is generated for all objects on the fly, so “Generate Object Index” button becomes grayed out (the button is needed only if you want to generate Pass Index for objects listed in the active Cryptomatte node). If you need to generate Object Indexes one-time and then want to edit them manually, just double click the checkbox, it will generate the indexes and second click will turn it off. “For All Objects” checkbox works in similar way for materials.

There are “Create Object/Material Color ID Material” buttons, each of them can add a material which will have color based on Object or Material Index. When at least one of these materials is added to the scene, you can click “Override Material” button.

In case of “Object ID Material”, clicking “Override Material” button is the same as going to View Layer Properties > Override, scrolling way down, and choosing the Color ID material. If you want to set the override in new View Layer, just create new View Layer before clicking the button.

In case of “Material Color ID”, clicking “Override Material” button does more than that, it will generate temporary materials and will automatically remove them when you choose to click “Restore Materials” button; your own materials will be unaffected. Here is an example how “Create Material Color ID Material” buttons works. Three cubes have two different materials, each with different Pass Index (both materials look the same).

When you press Override Materials, since three cubes have only two materials, each with unique Pass Index, two cubes share the same colors as expected:

When you press Restore Materials, original materials are restored and temporary materials are removed, and everything looks like on the first picture. It will not affect new materials you have created manually, if there are any.

1 Like