Simstim

Latest / tag

vex fundamentals

2026

  1. Houdinisplit() is a tokenizer: building cache paths from strings in Houdini VEXVEX strings look like Python's, but split() merges separators and drops empty fields, len() counts bytes, and a wrangle expands $ before the compiler sees it. A per-piece cache path built from the scene file name, and the traps along the way, checked in Houdini 22. · 10 min read
  2. HoudiniOut of range returns 0: arrays and array attributes in Houdini VEXVEX arrays slice like Python lists, but an out-of-range read quietly returns 0, a write past the end grows the array, and arrays can't nest. Per-point neighbor lists sorted by distance, read back from other points, and the traps that turn a bad index into point 0. · 9 min read
  3. Houdini7 / 10 = 0: integer division and casting in Houdini VEXIn a Houdini VEX wrangle, @ptnum and @numpt are ints, so the obvious 0-to-1 ramp divides two integers and comes out black. How VEX casts between int, float and vector, where Houdini 22 differs from C and from its own docs, and why float(@id) stops being unique past 16,777,216. · 11 min read
  4. Houdiniprintf debugging a million points: how VEX formats strings and where the output goesA printf in a Houdini VEX wrangle runs once per point, in parallel. What each format specifier really prints in Houdini 22, where the output goes, and why a string attribute or a guarded print beats flooding the console. · 9 min read
  5. HoudiniVEX swizzling: GLSL-style vector reads, and a write rule the compiler doesn't enforceHoudini's VEX reorders vector components with shader-style swizzles like p.zyx, but only at full length and only for reading. Houdini 22 rejects v.xz = …, yet compiles v.zyx = b and quietly ignores the swizzle. Plus why swapping two axes turns a mesh inside out. · 7 min read
  6. HoudiniLoops in VEX: the outer loop is invisible, write the inner one yourselfA Houdini VEX wrangle already runs once per point in parallel, so the for, foreach, while and do loops you write are the serial inner loop of a kernel. An upward smoothing pass, a hill climb that runs a different number of steps on every point, and the traps: division by zero gives 0, nearpoints() includes the point itself, and For-Each Number doesn't feed back. · 8 min read
  1. HoudiniIf statements that run on a million points at once: conditionals in VEXA Houdini VEX wrangle runs your if/else once per point, so a few lines classify a whole terrain, much like NumPy's np.select. A terrain classifier, plus the traps a C or Python programmer walks into: no bool, truncated float conditions, && that doesn't short-circuit, and exact vector ==. · 8 min read
  2. HoudiniOne typo, one new column: making Houdini VEX strictIn a Houdini VEX wrangle, naming an attribute creates it, so a typo adds a new attribute instead of raising an error. Three fixes, from gentlest to strictest, all tested in Houdini 22: declared defaults, the Attributes to Create allow-list and Enforce Prototypes. · 13 min read
  3. HoudiniWriting output in VEX: assignment creates attributes, detail writes are reductionsIn a Houdini VEX wrangle, assigning to a new name creates a typed attribute, and setdetailattrib's modes turn many parallel writes into one count, maximum or list. When each kind of write becomes visible, and five traps, from reductions that start at zero to appends that silently do nothing. · 10 min read
  4. HoudiniGather, don't scatter: reading data from other points in VEXIn a Houdini VEX wrangle, @P reads the current point and point() reads any point from a read-only snapshot of the input. Blend a grid toward a displaced copy of itself, build tangents with one gather, and see why writing to other points is the slower path. · 9 min read
  5. HoudiniSliders are uniforms: reading parameters in Houdini VEX, explained for programmersHoudini's VEX runs one small function over every point, like a GPU kernel, and ch() reads UI sliders the way a shader reads uniforms. A parametric wave, plus two traps: time is in seconds, and new sliders start at zero. · 6 min read