Skip to content

Cryptomatte

Cryptomatte
Mask

Picks objects, materials or model parts by name from Cryptomatte ID data into a matte, by clicking them in the preview.

Cryptomatte turns per-pixel object, material, or asset ID data from a 3D render into a matte you build by picking, with no re-rendering. It also picks a model’s materials or UV islands by name from the ID map Model Maps bakes.

One Image In reading a lounge chair render wired into three Cryptomatte nodes, one picking the side table, one the cushions and one the chair's frame

Wire a picture that carries ID data into the Image input and leave Cryptomatte File empty, as it is on a new Cryptomatte node. Three nodes give a picture ID data:

  • Image In reading an EXR with Cryptomatte layers. It carries them whichever layer it shows, so the usual setup is Image In showing the render, wired into Cryptomatte.
  • Image Folder reading a folder of such EXRs. Every frame carries its own file’s layers (see A folder of renders).
  • Model Maps’ ID output, for picking parts of a model (see Picking parts of a model).

One source feeds as many Cryptomatte nodes as you like, each picking its own objects. Point the source at another file and every Cryptomatte wired from it follows, with no path to change on each one. The wired picture is also the beauty that Highlight and Premultiplied show.

A line at the end of the Source section says what the node reads, such as “From the Image input: 10 names”. When the picture carries no ID data, it says so instead:

The panel saysBecauseDo this
This picture carries no ID data.The picture went through a node that made new pixels (a resize, crop, transform, filter or composite), so its IDs no longer line upWire Cryptomatte straight from the source, and resize, crop or transform its matte instead
This picture was resized after loading, so its ID data was dropped.Image In or Image Folder loads it at a Custom SizeResize the matte instead
This picture’s ID data does not match its size.A multipart EXR whose Cryptomatte layers are framed differently from the layer Image In showsRender the layers at one size
The file changed on disk after it was loaded.The EXR was rewritten after Image In or Image Folder read itReload it

Cryptomatte File still reads an EXR on its own: point it at a Cryptomatte-enabled EXR, or drag the file from your file manager onto the field. When it is set, it wins: the node reads the file, and a wired Image input supplies only the beauty for Highlight and Premultiplied. The Source line then names the file, with its full path on hover. Watch File reloads it when a re-render overwrites it, and is grayed while File is empty, since the node that loads the file watches it then.

The node finds the manifest whether it is embedded in the layers or saved as a sidecar JSON next to the file, wired or read directly, and reads multipart renders, including files whose Cryptomatte layers span several EXR parts. When the file has more than one layer, such as one per object and one per material, choose which to decode with Crypto Type; left empty, it decodes the first one found. With no manifest, picking still works, entries show as raw hex IDs, and the Source line says so.

A Blender still life of a jug, vases, a bowl and fruit in the Preview, with the vase picked by Cryptomatte and tinted yellow over the dimmed render

Blender names each Cryptomatte pass after its view layer, so a render’s Crypto Type reads ViewLayer.CryptoObject, ViewLayer.CryptoMaterial, or ViewLayer.CryptoAsset (with your view layer’s name in place of ViewLayer). Pick one and the node decodes it like any other. With a File set and nothing wired into Image, Highlight uses the Combined pass of that same view layer, so a Blender multilayer EXR is enough on its own to see the pick against the render.

A file that declares a Cryptomatte but carries none of its passes says which type has no passes, rather than reporting that nothing is declared.

Wire an Image Folder of Cryptomatte EXRs into one Cryptomatte node and it makes a matte for every frame. The Mattes list holds names, so one list applies to every frame: pick “chair_leg” once and every render that has a chair_leg gets it in its matte. A frame with none of the picked names gets an empty matte, and the panel counts them, as in “3 of 12 frames have none of the picked names”. Picking in the Preview samples the frame the Preview shows, and the picked name joins the list for every frame.

To save a matte per render, wire the Matte output into Export Batch. At its default Output Channels, Auto, each matte is written as a grayscale file named after its render (JPEG, WebP, BMP and HDR have no grayscale mode and write gray-valued RGB); choose RGBA to write four channels instead.

Model Maps’ ID output carries a Cryptomatte layer as well as its picture of flat colors. Wire it into Cryptomatte’s Image input and pick parts by clicking them in the Preview or by typing their names in the Add by name field. Model Maps’ Source row decides what the names are:

  • Material (the default): each part is named after its material, as the model file writes it. A material with no name is “Material 1”, “Material 2” and so on, by its place in the file; triangles with no material are “No material”. Two materials with the same name are one entry.
  • UV Island: each island is named after its place in the UV square, its smallest U and V and then its largest, as in “Island 0.1250 0.5000 0.2500 0.7500”. These are easiest to pick by clicking. A model exported again with the same UV layout keeps its island names.

The matte is hard-edged on the texels and filled past each island exactly as the bake fills its maps, so a texture masked by it shows no seam on the model. Wire the Matte output as the mask of a Composite over the Base Color to color one material or one island on the model.

The Blender still life in Colored IDs while Pick to Add is armed, the cursor over the vase naming it, and the Vase row in the Mattes list

Pick directly in the preview. A hover tooltip names the object under the cursor before you click.

ToDo this
Add one objectArm Pick to Add in the panel and click, or Ctrl+Click
Remove one objectArm Pick to Remove and click, or Ctrl+Alt+Click
Add every object a rectangle touchesCtrl+Shift+drag
Remove every object a rectangle touchesCtrl+Alt+Shift+drag
Cancel an armed pick or a sweepEscape or right-click

The armed button stays lit. A sweep is a single undo step however many objects it picks up. While a pick is armed, the preview switches to Colored IDs so you can see exactly what you are clicking.

The Mattes section lists every pick as a removable row in a bordered box, with the count above it (“3 mattes”), and Clear beside the count empties the list in one step. Type a name in the Add by name field under the box; it autocompletes from the manifest, and clicking into the empty field lists every name in it.

Output picks what the Image output shows. The separate Matte output always carries the selection, whatever the mode.

  • Colored IDs (the default): a stable random color per object, with picked objects highlighted yellow and the rest dimmed. It shows everything in the file before you start picking.
  • Matte: the selection as a grayscale matte.
  • Highlight: the beauty image’s brightness with the selection highlighted the same way. It uses the picture wired into Image, or with a File set and nothing wired, the beauty layer inside the same EXR, so it works standalone on a production render.
  • Premultiplied: the beauty image cut out by the selection. It needs a picture wired into Image for a correct, color-managed cutout, and stays unavailable until one is.

Invert flips the Matte and Premultiplied results and the Matte output, never the yellow selection highlights, so picking stays legible either way.

Pins

ImagePixels
InputOptional
ImagePixels
Output
MatteMask
Output

Source

Cryptomatte FileText

Path to an EXR carrying Cryptomatte layers (cryptomatte/<key>/name plus rank-layer header attributes). A wired Image input then supplies only the beauty.

Leave it empty to read the ID data on the Image input: Image In or Image Folder reading an EXR with Cryptomatte layers, or Model Maps' ID.

Watch FileToggle
Default: false

Automatically reload when the file changes on disk. Checks once per second

Crypto TypeText

Which declared Cryptomatte layer to decode (CryptoObject / CryptoMaterial / CryptoAsset / ...).

Leave it empty to take the first type the file or the wired picture carries.

Mattes

Matte ListText
Default: []

JSON array of selected object names (from the manifest) and/or raw "<hexid>" entries, for example ["bench","character"].

Edit by hand here, or with the picking UI on the Parameters panel and the preview canvas.

Output

OutputChoice
Default: Colored IDs Range: Matte / Colored IDs / Highlight / Premultiplied

What the Image output emits, independent of the Matte pin (always the selection coverage, Invert-applied):

  • Matte: the accumulated selection as a grayscale matte.
  • Colored IDs: a stable pseudo-random color per object (the default, useful for picking); selected objects highlight yellow and unselected objects dim.
  • Highlight: the beauty image's brightness (a connected Image input, OVERRIDING the file's own beauty layer when one carries it, else the file's own beauty); selected objects highlight yellow and unselected areas dim.
  • Premultiplied: the connected Image input multiplied by the selection matte (wire one for a color-managed result); with nothing wired, falls back to the matte itself.
InvertToggle
Default: false

Invert the matte: the Matte and Premultiplied outputs and the Matte pin.

Selection highlights are never inverted.

  • Ctrl+Click and Ctrl+Alt+Click work whenever the node is selected, with no need to arm a pick first.
  • Wire one Image In into several Cryptomatte nodes rather than giving each its own File: change the file once and every matte follows.
  • Feed the Matte output to Mask Boolean or Mask Refine to combine or clean up selections.

One of the example documents in ArcBrush uses this node.

  • Cryptomatte

    Cryptomatte

    Pick objects out of 3D renders by their ID pass: recolor a chair across a folder of catalog renders, grade a backdrop and a chair frame apart, reglaze a vase, all without rendering again.

    Open in ArcBrush

    Don't have ArcBrush? Download