Houdini 19.0 Solaris

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.

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

USD

Geometry

  • Importing SOP geometry into USD

    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

  • 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.

Shading

  • Shader Framework

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

  • Using MaterialX with Karma

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

  • /solaris/materialx_nodes

Karma rendering

Tutorials