Houdini 20.5 Solaris and Karma

Crypromatte and material AOVs in Karma

On this page

AOVs (“Arbitrary Output Variables”), also known as extra image planes, record additional per-pixel data in rendered image formats that support “deep” (multi-plane) images, such as OpenEXR.

Material-based AOVs

In previous versions of Houdini, you had to follow a rather cumbersome way to write out material-based AOVs. The Karma AOV was not connected to the MtlX Standard Surface VOP, but to a MtlX Switch VOP instead. After switching on the AOV, you had to go to the Karma Render Settings LOP and create an extra RenderVar, set a name and specify the AOVs signature. Then, the AOV was visible. This workflow is still available for compatibility reasons, but shouldn’t be used anymore.

In Houdini 20, the workflow for setting up custom AOVs was greatly improved and is now the recommended way. However, material-based AOVs are not yet a USD concept and you still have to go a short detour.

Defining the AOV

The first step is to define the AOV and create the shader network shown below.

Click the image to zoom.
  1. In the Material Library LOP, press ⇥ Tab to open the tab menu. From there choose the Karma Material Builder tool. This tool sets up a Subnetwork VOP. Double-click the node to dive inside.

  2. The subnetwork already contains several nodes. Add a MtlX Image VOP.

  3. On the Filename parameter, click the Open floating file chooser… button to load a texture.

    The goal is to export this texture as a custom material-based AOV. If you want to write out several AOVs, note that you need one Karma AOV VOP per texture/shader.

  4. Add a Karma AOV VOP. When you look at the new node’s parameters, you can that Create Render Var is turned on. This option creates an AOV with name entered under AOV Name. The default entry, $OS, uses the node’s name. Here, the name will be barrel_diffuse

  5. Connect the output of the MtlX Image VOP with the input of the Karma AOV VOP.

  6. Connect the output of the Karma AOV with the next input of the Material_Outputs_and_AOVs node. You will notice that the input’s name changes to the name of the connect Karma AOV.

This network creates the AOV and automatically makes it available for USD/Karma. When you look at the Scene Graph Tree, you can see the barrel_diffuse AOV.

Using the AOV

To make the AOV work, you only have to connect a Karma Render Settings LOP. The nodes recognizes the AOV and you can turn it on in the viewport.

  1. On the Display options bar, click the Viewing output button.

  2. From the dropdown menu, choose the barrel_diffuse AOV to show it in the viewport.

The left image shows the rendered result in the viewport; the right image shows the barrel_diffuse AOV.

Now you can also replace the Karma AOV’s input with a different node, for example a MtlX Unified Noise 3D VOP or any other valid node. The new workflow updates the AOV automatically and you don’t have to do anything manually.

Cryptomatte

Karma supports Cryptomatte AOVs and you create Cryptomatte IDs using the following data sources.

  • Primitives

  • Materials bound to prims

  • Constant or uniform string/integer PrimVars

When you generate unique IDs for each instance, you don’t need to use material stylesheets. All you need to do is assign unique values of a string PrimVar to each instance.

Tip

See the Cryptomatte guide for additional information.

How to

To...Do this

Output a Cryptomatte AOV from Karma manually

  1. In the Karma LOP or ROP, go to the Image Output ▸ AOVs sub-tab and expand the Extra render vars section.

  2. Click the plus button to add a render var.

  3. Set Name to the name of the AOV to create.

  4. Set Format and Data type to color3f.

  5. Set Source Type to PrimVar.

  6. Set Source Name to the name of a USD PrimVar on the rendered geometry.

Output an AOV with Cryptomatte

  1. Create a constant or uniform string PrimVar on the instances to generate IDs from.

  2. Follow the procedure above for adding a custom AOV. When filling out the fields for the AOV, do the following.

    • Set Source Name to the name of the constant or uniform string PrimVar you created on the instances.

    • Turn on the Cryptomatte checkbox.

See also

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