Houdini 20.5 Solaris and Karma

Cryptomatte

How to generate image maps associating each pixel in the image with the object name and/or material in the original source scene.

On this page

Overview

Cryptomatte is a set of open-source tools for generating and working with images that associate individual pixels with object IDs. More generally, a “cryptomatte” is the type of image generated by the tools, or equivalent features in other software such as Houdini. This is a deep EXR image which stores object names/materials per-pixel, with special filtering to properly support anti-aliasing and transparency.

You can use the image to mask compositing effects to only the pixels associated with certain 3D source objects, or certain materials, without having to re-render the scene.

The following example shows how you can use a cryptomatte image to isolate a specific material in a Houdini compositor network.

See Cryptomatte’s official site for specifications and plugins for popular compositing applications.

Note

Cryptomatte is supported by Karma CPU and Karma XPU.

Tips and notes

  • You can generate a cryptomatte from object names, or materials, or the values of a custom string primvar.

  • In USD/Karma rendering, “object name” is the full path of the geometry prim. For example, for a prim at /Models/lamp/base1 the “object name” would be /Models/lamp/base1.

  • You can generate a cryptomatte AOV using one method (for example object names), and a separate cryptomatte AOV using another method (for example materials), to allow you to mask by both/either.

How to

To...Do this

Render a traditional Houdini object-level scene to a cryptomatte using Mantra

See Cryptomatte in Mantra.

Render a USD scene to a cryptomatte image using Karma

Karma generates the cryptmatte layer as an extra image plane (AOV) in the main rendered image.

  1. Set up the Karma ROP you want to use to render the scene.

  2. Click the Image Output tab and then the AOVs sub-tab.

  3. Scroll down and click Extra Render Vars to show that section.

  4. Next to Render Vars, click the Plus button to add a new image plane.

  5. Next to the Name field, click the drop-down menu and choose Cryptomatte Object Name or Cryptomatte Material Name to fill in the correct settings for the render var.

    or

    If you have a “uniform” or “constant” primvar of type string on the object, you can enter the name of the primvar Source Name parameter to generate IDs from the primvar values.

Generate masks in the compositor from a cryptomatte

See the help for the Cryptomatte COP.

Solaris and Karma

USD

Geometry

  • SOP Geometry I/O

    Details of how Houdini converts SOP geometry to USD, and how you can control the process.

  • Component Builder

    The Component Builder tool puts down a network snippet for creating a USD model from SOPs, with support for materials, variants, payloads, and layering.

Layout

  • Stage Manager

    How to work with the Solaris stage effectively.

  • Edit node

    Interactively transforms prims in the viewer. Can use physics collisions to position props realistically.

  • Layout node

    Provides tools for populating a scene with instanced USD assets. You can place individual components, paint/scatter components in different ways using customizable brushes, and edit existing instances.

  • Custom Layout Brushes

    How to create layout brush digital assets you can use to customize the behavior of the Layout LOP.

Look Development

  • MaterialX

    Houdini has VOP node equivalents of the MaterialX shader nodes. You can build a shader network using these nodes, or import an existing MaterialX-based shader, and use them with Karma (Houdini’s USD renderer).

  • UDIM paths

    You can encode different tiles of a texture space into different texture files, each with its own resolution. You can then specify a texture filename such as kaiju.exr, and Houdini will replace the token with the specific tile address at load time.

  • Shader translation framework

    Describes the Solaris shading framework, including shader node translation to USD primitives.

Karma User Guide

Karma basics and workflows