Skip to content
AnimationStudiosBLUX Physics SuiteGet BLUX
Discord

Wrangles overview

A Wrangle is a node that runs a few lines of your own code on the GPU.

  • A Particle Wrangle runs the code for every particle. It works with Atom, Hydro and Impact.
  • A Field Wrangle runs the code for every voxel of a Blaze grid.

The language is short Python with @ attributes, in the manner of Houdini’s VEX:

swirl = curlnoise3(@P * chf('freq', 4.0)) # chf() puts a slider on the node
@v += swirl * chf('strength', 10.0) * @dt # @v is the particle's velocity
  • Checked as you type. A moment after you stop typing, BLUX checks the code. A mistake shows on the node with its line number, and a button opens the code at that line in a Text Editor. A mistyped or unsupported attribute (for example @damage on Hydro) is an error, not a silent no-op.
  • Live editing. While a simulation plays, a moved slider reaches it on the next step, and changed code is swapped in without resetting the simulation. The node shows how long the GPU kernel took to build, or why a wrangle was left out. The other wrangles and the simulation carry on.
  • Run order. The Particle Wrangles of a stage run as one GPU kernel, in the order the graph lists them. A Run Order number overrides that.
  • Presets. Presets such as tornado, shockwave, drag, ground friction, curl-noise agitation and a heat glow start with working slider values.

The code runs under an allowlist: arithmetic on the attributes, a fixed list of functions, bounded loops, no imports, no files and no strings. The worker checks it again before running it.

The full list of functions, attributes and limits is generated from the compiler, so it always matches the add-on. See the Wrangle language reference.