HRLW Volume Solver TOP
Replaces Hand-built gas simulations made from a GLSL TOP with a Feedback TOP loop on a 3D texture. TouchDesigner has no built-in 3D smoke/fire solver. This TOP runs the whole simulation in CUDA and hands the result to the Path Tracer without a copy. The emitters, forces and colliders are POPs, so art direction lives in POP networks: particles emit, points push, spheres block.
Operator type
Hrlwvolumesolver, labelHRLW Volume Solver.
What it does#
Simulates smoke, fire, explosions, steam, fog, plasma and arcs on a sparse GPU grid. Its output is two 16-bit float RGBA 3D textures: buffer 0 is R smoke, G temperature, B flame (and plasma in alpha); buffer 1 is the velocity (world units per second). Put the solver in the Path Tracer TOP's Volume TOP (Fire page) and its own box is used.
Quick start (beginner)#
- Make a Source POP: a Sphere POP (or any points) with attributes. For fire you need
fueland atemperatureabove Ignition Temperature; the defaults (Default Fuel 5, Default Temperature 1) already do. - Add an HRLW Volume Solver TOP (
solver1). Set Center and Size of its box (or name another solver in Box From) and Resolution 96 to 128. Point Source POP at your points. - Pick a Preset: Campfire, Bonfire, Candle, Torch / Gas Jet, Alcohol, Gasoline, Diesel / Napalm, Flamethrower, Explosion, Fireball, Magnesium Flare, Electric Arc, Plasma Ball, Thick Smoke, Steam, Ground Fog / Dry Ice, Wispy Smoke. A preset sets the gas, fire and source-default parameters once, a frame after you pick it.
- The HRLW Path Tracer TOP finds the solver by itself (Volume TOP on its Fire page is
*), and its Look Preset From Volume Solver follows your preset (a Candle renders as a candle, Steam as white smoke). - Animate the source points: a moving emitter leaves a trail; a burst of fast particles with a lot of fuel is an explosion.
Orange lines show the solver's box in the render (Preview Bounds on the solver and Show Solver Bounds on the Path Tracer); turn them off for final output.
Inputs and attributes#
| Input / POP | Attributes | Meaning |
|---|---|---|
| Source POP | pscale |
ball diameter (else Default Size × Size Scale) |
density, temperature, fuel, flame, plasma |
gas emitted, as rates per second (else Default …); × the matching … Scale | |
v |
pushes the gas at that velocity (× Velocity Influence) | |
Cd |
flame colour when Colored Fire is on (the solver warns when the source has Cd but it is off) |
|
| Force POP (up to 64 points) | forcetype: 0 attract (negative strength repels), 1 swirl around N, 2 push along N; strength, radius |
|
| Collider POP (up to 256 spheres) | pscale × Collider Size Scale, v |
the gas flows around them |
| Input 1, 2, 3 (TOPs) | HRLW Surface TOP positions, a mask in the same UVs, optionally normals | surface emission: each covered texel emits Surface Fuel, Surface Temperature, Surface Smoke × mask |
Parameters#
| Page | Parameter (default) | What it does |
|---|---|---|
| Solver | Preset | Gas and fire presets (above). Editing a value it set turns the menu back to Custom. |
| Mode (Simulate) | Simulate or Fill from Particles (no simulation: the volume is the particles' balls each cook, a direct way to sculpt a volume from POPs). | |
| Play (on), Reset | ||
| Resolution (128) | Cells along the longest side; cubic cells, each side rounded up to whole 8³ tiles. | |
| Center, Size | The box. | |
| Box From (solver) | Name another HRLW Liquid POP, Volume Solver or Bodies POP to use its box, live (Center and Size grey out). Empty: this one's own. | |
| Preview Bounds (on) | Orange box in the render. | |
| Closed Floor (on) | A floor at the bottom; the other sides are open. | |
| Substeps per Frame (1) | More for fast explosions. | |
| Time Scale (1), Catch Up Dropped Frames (off) | The time step is one frame at the timeline rate × Time Scale. | |
| Gas | Buoyancy (4), Smoke Weight (0) | Hot gas rises; dense smoke sinks. A campfire wants Buoyancy 4 to 8. |
| Cooling (1.5), Smoke Dissipation (0.1) | Per second. A smaller dissipation keeps wisps longer. | |
| Open Side Fade (4 cells) | Gas fades near open sides so smoke leaves the box instead of collecting at its edges. 0 = off. | |
| Source Reach (0), Far Fade (1), Thin Gas Cutoff (0) | Keep a big box cheap when gas is in a few places (below). | |
| Vorticity (1), Turbulence (0), Turbulence Size (0.3), Turbulence Speed | Put back small curls; add noise. | |
| Wind (0), Wind Strength (0), Velocity Damping (0) | ||
| Fire | Ignition Temperature (0.2), Burn Rate (4) | Fuel hotter than this burns at this rate per second. |
| Heat per Fuel (1), Smoke per Fuel (1), Expansion per Fuel (1) | Heat, soot and outward burst per unit of fuel. Expansion is the explosion. | |
| Fuel Dissipation (0) | ||
| Plasma Decay (6), Plasma Heat (0.5) | High decay flickers; low lingers. | |
| Colored Fire (source Cd) (off), Color Fade (0), Source Fuel Type (no Cd) | Source Cd colours the flames (see Recipes). Source Fuel Type colours points that have no Cd (candle wax, gas/alcohol, copper salts, sodium, lithium/strontium, potassium, custom). Greyed out while Colored Fire is off. |
|
| Output Temperature Scale (1), Output Flame Scale (0.25) | Map temperature and burn rate into the 0..1 the renderer expects. | |
| Sources | Source POP (particles), Default Size (no pscale) (0.1), Size Scale | |
| Default Density (0), Temperature (1), Fuel (5) | Used where the attribute is missing. | |
| Density, Temperature, Fuel, Flame, Plasma Scale; Velocity Influence (1) | ||
| Surface Mask Channel, Surface Fuel (5), Temperature (1), Smoke (0), Normal Speed (0) | For input TOPs; greyed out without them. | |
| Colliders | Collision HRLW Geometry POPs | Names, patterns, ^ excludes. * (default) takes every HRLW Geometry POP next to the solver. Empty turns it off. |
| Collider Thickness (1.5) | ||
| Collider POP (spheres), Collider Size Scale | ||
| Solver Interaction (off), Douse Rate (10), Steam per Heat (2) | Where liquid touches the gas it loses fuel (exponential) and the heat above the liquid's Boiling Temperature becomes steam. | |
| Forces | Forces From (solver) | Name another solver to use its Force POP, radius and strength, live. Empty: this one's own. |
| Force POP, Default Force Radius (0.5), Force Strength Scale | Greyed out in Fill from Particles mode. | |
| Copy Box and Forces to Other Solvers | One-off copy of this box and these forces into the other solvers' own parameters. | |
| Output | Output to TouchDesigner (Auto) | See Advanced. |
| Advanced | Pressure Solver, Pressure Iterations (8) | Multigrid CG by default, stops early; older red-black SOR wants 40+. |
| Two-Level Pressure (off), Profile Pressure (off) | See below. | |
| Sharp Velocity (on) | MacCormack advection of the velocity: long-lived swirls. | |
| Advection-Reflection (off) | More swirl, two pressure solves; nearly doubles the step. |
Fire needs fuel and heat#
A source with temperature above Ignition Temperature and some fuel ignites. Smoke that hangs and spreads wants a little Smoke Weight. The Steam, Ground Fog and Wispy Smoke presets don't burn: their sources give smoke and a little heat.
Recipes#
Colored fire. Colored Fire on, give each Source POP point a Cd. The colour travels with the gas and mixes where two sources' gases meet (a green and a blue burner make teal). The renderer keeps the fire palette's brightness and gives it the source's hue. Costs 40 bytes a cell (84 MB at 128³). With surface sources, the HRLW Geometry POP's Fuel Type colours flames; Color Fade lets the colour go as the gas rises (4 to 8 for a candle's blue base).
Plasma, arcs, lightning. Give source points a plasma attribute (× Plasma Scale). The path tracer's Plasma Glow / Plasma Color light it. Keep arcs at least 1.5 cells thick (pscale).
- Arc between two points: Line POP → Resample (30 to 60 points) → Noise POP displacing sideways, seed changing every 2 to 4 frames, ends pinned → Attribute POP (
plasma20 to 60,pscale1.5 to 3 cells) → Source POP. Plasma Decay 15 to 30 makes it crackle; Plasma Heat 0.2 bends it upward. - Lightning strike: same jagged line plus short branches copied onto random points (Copy POP), flash by driving Plasma Scale with a pulse for a few frames.
- Climbing arc (Jacob's ladder): two rails and a line that moves up; Plasma Heat 1 to 2 and Buoyancy make it rise.
Explosion. A burst of fast source particles with high fuel and v; raise Expansion per Fuel and Substeps per Frame.
Fire spreading on a surface. Use the Surface TOP, a Feedback TOP, and examples/fire_spread.glsl; see Chapter 9. For fire that spreads with no TOP wiring, see Fuel in Chapter 8.
Tips#
- Start with Resolution 96 to 128 and Detail 0.5 to 1 (on the Path Tracer's Fire page) at a Detail Size of 2 to 3 voxels. Going from 128 to 192 costs the solver about 3.4× and the renderer little.
- The Info CHOP's
pressure_itersshows how many iterations the solve needed. - A campfire wants Buoyancy 4 to 8 and Vorticity 1 to 2.
- Flamethrower needs source
v(Velocity Influence 3). Electric Arc and Plasma Ball need aplasmaattribute.
Advanced#
What a step does. Sources → combustion (fuel hotter than ignition burns, making heat, smoke and expansion) → advection (scalars and, with Sharp Velocity, velocity MacCormack with a limiter) → forces (buoyancy, smoke weight, wind, turbulence, vorticity, force points) → colliders → pressure solve → cooling, dissipation, velocity damping.
Grid and memory. Work only happens in 8³ tiles with gas and their neighbours, so empty air costs memory but not time. About 176 bytes per cell for the simulation plus 50 for textures (128³: about 470 MB; 256³: about 3.8 GB). Info CHOP: gpu_mb, active_tiles, box_min_*, box_max_*.
Big box, gas in a few places. Two controls on the Gas page keep gas near its sources (both off by default): Source Reach (world units; gas further than this from every source fades at Far Fade per second per tile) and Thin Gas Cutoff (smoke, heat and fuel thinner than this fade out; 0.01 to 0.03 is invisible in most renders). In a test on a 4×1×1 box they cut the working set from 162 to 109 tiles.
Output to TouchDesigner. Auto makes the 3D textures only while the node's viewer is on or while no Path Tracer reads the volume (an 8³ placeholder otherwise); set On when other TOPs use them alongside the renderer.
Pause. Play off, or a paused timeline, does not cook the solver; it hands on the last volume and reads none of its inputs. Reset starts over.
Swirl. Sharp Velocity keeps 62% of kinetic energy over a second versus 20% for semi-Lagrangian; with Advection-Reflection 77%. Sharp Velocity costs about a fifth more per step; Advection-Reflection nearly doubles it.
Two-Level Pressure. Plain-air tiles solve on cells twice the size. About 80% of a plume's tiles go coarse, but the composite solve costs more per cell, so it is off by default and used only in steps where at least 30% of tiles went coarse.
Motion blur. With the Path Tracer's Motion Blur on, the volume blurs along its velocity; Motion Blur Amount (Fire page) scales it.
Info CHOP. pressure_iters, sim_ms (split into sim_sources_ms, sim_scalars_ms, sim_velocity_ms, sim_forces_ms, sim_pressure_ms, sim_rest_ms), colliders_ms, active_tiles, gpu_mb, collider_tris, collider_open_tris, burning_surfaces, interact_liquids. Profile Pressure adds pressure_setup_ms, pressure_smooth_ms, pressure_transfer_ms, pressure_coarse_ms, pressure_cg_ms (a little slower while on).