Houdini 18.0 Solaris

Using VEX with USD

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.

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

USD

Tutorials

Karma