HRLW Whitewater POP
Replaces Nothing in TouchDesigner; normally spray and foam are separate particle systems driven by hand.
Operator type
Hrlwwhitewater, labelHRLW Whitewater.
What it does#
Spray, foam and bubbles spawned where a Liquid POP's fast liquid churns (trapped air) or a crest moves outwards. Where each particle is decides what it is: in the air it is spray (gravity, air drag), at the surface foam (carried along, fading), inside bubbles (rising, dragged by the liquid).
Two ways to render it#
Render on the Liquid POP's Whitewater page defaults to Auto: Direct until an HRLW Whitewater POP reads the liquid, then Whitewater POP Only, so the spray is never drawn twice.
- Direct (nothing to add). On the Liquid POP's Whitewater page switch Whitewater on. Spray (and bubbles, with Render Bubbles) render as small white rough spheres straight from the GPU, and foam appears as a
foamattribute on the liquid's own surface, which the HRLW Geometry POP turns into white, rough, opaque patches of the liquid's material. Spray Size scales the spheres. This is the cheapest. - Whitewater POP Only. Add an HRLW Whitewater POP, point its Liquid POP parameter at the liquid, and wire it into its own HRLW Geometry POP with a white, rough material (or translucent with subsurface for foam).
Whitewater parameters (on the Liquid POP, Whitewater page)#
| Parameter (default) | What it does |
|---|---|
| Whitewater (off) | Turns it on |
| Amount (100) | Maximum new particles per cell per second |
| Starts at Speed (1) | Liquid faster than this (fully at twice) churns out whitewater |
| Foam Lifetime (2 s) | |
| Bubble Buoyancy (3 × gravity), Bubble Drag (6 per s), Spray Air Drag (0.3 per s) | |
| Max Whitewater (thousands, 2000) | |
| Render (Auto), Render Bubbles (off), Spray Size (1) | Auto: Direct unless a Whitewater POP read the liquid in its last 120 steps (a paused timeline keeps it as it was). The others are greyed out while Whitewater is off. |
HRLW Whitewater POP parameters#
| Parameter (default) | What it does |
|---|---|
| Liquid POP | The Liquid POP whose particles this reads (on the GPU, without a copy) |
| Size (1) | Times the default (fractions of a cell) |
| Output to TouchDesigner (Auto) | As on the Liquid POP |
Output attributes (Whitewater POP)#
| Attribute | Meaning |
|---|---|
P, v |
position, velocity |
pscale |
size (spray fine, foam bigger, bubbles small; × Size) |
wtype |
1 spray, 2 foam, 3 bubble |
wlife |
0..1 of its life left |
Info CHOP: whitewater (count).
Advanced#
Spray renders as OptiX's built-in spheres in one fast-build acceleration structure rebuilt each frame; this costs about what a mesh of as many triangles does, far less than instanced geometry. What used to make whitewater slow was elsewhere (the liquid voxelising every droplet as a collider, and an HRLW Geometry POP copying points to the CPU and back); both are gone. The Whitewater POP never becomes a collider for its own liquid (as colliders, every droplet turned into a moving solid, which churned the liquid and threw more spray).