Scripting
Particle Wrangle
Section titled “Particle Wrangle”Runs your own GPU code on every particle (velocity, colour, damage) during the simulation.
Inputs: Particles: A stream of particles or rigid pieces.; Simulation State: The solver’s result. Pass it through meshers to the Simulation
Outputs: Particles: A stream of particles or rigid pieces.; Simulation State: The solver’s result. Pass it through meshers to the Simulation; Wrangle: Attaches this wrangle to a solver’s detail input.
| Setting | What it does | Default |
|---|---|---|
| Source Mode | Code typed in the node, or read from a Text datablock | INLINE |
| Snippet | Procedural VEX-style particle code | # e.g. @v.y += 0.5 |
| Script Text | Text datablock containing wrangle code | |
| Stage | When the code runs: every substep, once per frame after the substeps, or on newborn particles | SUBSTEP |
| Run Order | Wrangles run lowest number first; equal numbers run in the order the graph lists them | 0 |
Field Wrangle
Section titled “Field Wrangle”Runs your own GPU code on every voxel of a Blaze grid (density, temperature, forces).
Inputs: Detail: Extra detail for a Blaze simulation: turbulence and field wrang
Outputs: Wrangle: Attaches this wrangle to a solver’s detail input.
| Setting | What it does | Default |
|---|---|---|
| Source Mode | Code typed in the node, or read from a Text datablock | INLINE |
| Snippet | Procedural VEX-style grid field code | # e.g. @temperature += 1.0 * @dt |
| Script Text | Text datablock containing wrangle code | |
| Stage | When the code runs: Forces (may write @v and @force), Substep or Post-Step (scalars only) | SUBSTEP |
| Run Order | Wrangles run lowest number first; equal numbers run in the order the graph lists them | 0 |