Houdini’s whole pitch is procedural, node-based workflows — chain enough SOPs (Surface Operators) together and you can build almost anything without writing a line of code. Almost. The moment you want to do something per-point or per-primitive that doesn’t map cleanly onto an existing node — nudge every point based on its own position, color a mesh by curvature, drive an attribute from a custom formula — the fastest path stops being “find or build five more nodes” and starts being VEX, written inside a single Wrangle node.
What VEX actually is
VEX is Houdini’s own C-like scripting language, purpose-built to run fast, in parallel, once per point, primitive, or voxel in whatever you’re processing. You’re not writing a general-purpose program — you’re writing the body of a loop that Houdini will automatically execute across every element in the input geometry, which is why VEX code tends to be short: a few lines running thousands of times beats a sprawling node graph expressing the same logic once per special case.
A Wrangle node (most often an Attribute Wrangle, found under SOPs) is the container for that code. Drop one into your network, wire geometry into it, and the code box inside is where you write VEX directly — no separate script editor, no compile step, just code that runs live as you type, same as any other node’s parameters.
The syntax that trips up every beginner: accessing attributes
The single biggest adjustment coming from almost any other language is how VEX reads and writes per-point data. Houdini geometry carries attributes — P (position), N (normal), Cd (color), and any custom attribute you define — and VEX exposes the current element’s version of each one as a global variable inside the wrangle, rather than something you fetch with a function call:
// Inside an Attribute Wrangle set to run "over Points"
v@Cd = {1, 0, 0}; // paint every point red
v@Cd means “the vector attribute named Cd, on whatever point this instance of the code is currently running for.” The type prefix (v@ for vector, f@ for float, i@ for integer, s@ for string) isn’t optional — it’s how VEX knows what kind of attribute it’s reading or creating, and getting it wrong is the most common first error.
A first practical wrangle
A small, genuinely useful starting example — offsetting every point’s height based on its distance from the origin, a common base for procedural terrain or ripple effects:
float dist = length(v@P);
v@P.y += sin(dist * 4) * 0.1;
v@P is the point’s position vector; .y pulls out just its vertical component. Run this on a flat grid with the wrangle set to operate “over Points,” and you get a radial wave pattern — the kind of effect that would otherwise mean chaining several nodes together (distance-from-point, a math expression, a point-deform) to get the same result VEX does in two lines.
Where to go from “it runs”
Once a basic wrangle works, the next useful habit is reading Houdini’s own VEX function reference rather than guessing — the language has hundreds of built-in functions (noise, trigonometry, geometry queries like nearpoint()) that replace what would otherwise be entire extra nodes, and knowing they exist is most of becoming fast with VEX. The other habit worth building early: write small, testable wrangles and chain several together rather than one giant block of code trying to do everything at once — it keeps each piece debuggable in isolation, the same instinct that makes a tidy node graph easier to work with than a tangled one.