Houdini 21.0 Solaris and Karma

Using VEX with USD

Customize Solaris and USD with scripting.

On this page

Overview

VEX is Houdini’s programming language used for everything from deformers to shaders to solvers. As VEX is a SIMD language, its code/network snippets are designed to run on each ‘element’ being targeted. In LOPs this means primitives by default, meaning there is no need to add a loop to iterate over each target primitive; that happens automatically. Each attribute of the primitives is accessed using the @ syntax, or Bind VOPs.

Wrangle and VOP LOP also have a second mode, Run on Elements of Array Attributes. In this case, the elements over which the code will run are the elements of array properties on primitives. This allows for faster operations over PointInstancer or Points prims, or even the points of heavy meshes.

An interesting question is, “Is VEX multi-threaded in Solaris?”. In a nutshell, reading stages can be multi-threaded, but writing is single-threaded. In general, VEX is often slowed down by internal processes and limitations. Fo example, when you add VEX to your prim patterns, they’ll be processed much slower than the built-in prim pattern functions.

If you must use scripting in Solaris/USD, for whatever reason, we recommend Python over VEX. Python is better for performance in LOPs, though VEX can be more convenient to write (and is preferred when doing mixed SOP/USD read/write).

Build-in variables

@primpath

Path of the prim, on the stage .

@elemnum

Current element number, whether prim or array element.

@numelem

Total number of prims or array elements.

@primtype

The prim type name.

@primkind

A prim’s kind if set.

@primname

The name of a primitive.

@primpurpose

The display purpose of the current prim.

@primdrawmode

The draw mode of the prim.

@primactive

Returns whether the current prim is active or deactivated.

@primvisible

Returns the visibility of the prim.

USD-specific functions

Solaris and Karma

Solaris and USD

Karma

  • Karma

    Houdini’s Physically Based USD Renderer.

  • Karma XPU

    Houdini’s fast and modern XPU render engine.

  • Color management

    Learn more about OCIO, color spaces, gamma and tone mapping.

  • Render statistics

    How to view various statistics about the render process of an on-going render or rendered image.

Karma User Guide

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

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

  • Shotbuilder tools

    Multi-Shot Pipeline in a Box.

Procedurals

Supporting documents