Swarm
A real-time, interactive particle system built to match the quality of Houdini: over a million round grains, lit and shadowed as one form, that you swirl with your hands.
I've chased this one for years. Houdini is the gold standard for particles: ray tracing, real physics simulation and images that look like you could reach in and touch them. People make great-looking particle systems on the web, but next to Houdini they still feel like computer graphics simulations.
Swarm is my attempt to close that gap. It's a real-time, interactive particle system that runs in the browser on WebGPU: a four-point star made of more than a million tiny grains, wrapped in a ring of flowing ones, built for an 80-inch touchscreen. Put your hands on the screen and the grains swirl around your fingers. Let go, and a few seconds later they flow back into the star.
Why Houdini looks the way it does
A first attempt had already been thrown away because it looked nothing like the Houdini reel I was using as a reference. So this time, before writing any code, I worked out why the reel looks so good.
Every element is a tiny round grain. The fibrous look comes from motion blur on round grains moving fast along a smooth flow, so slow grains read as dots and fast ones as streaks, and that contrast is half the beauty. I didn't want little straws. I wanted little balls.
The swarm is lit as one structure, not grain by grain. Hundreds of thousands of grains add up to a surface, and the light reads off that whole form, with a lit side, a terminator and a shadow side. Dense regions block the light, so the far side and the valleys go dark. That self-shadowing is what gives it weight. Without it you get something flat and glowy, which is how the first attempt failed. The motion has to be slow and silky, with momentum and drag, never a hairy mess. And the lens matters: shallow depth of field, real bokeh, pitch black behind.
The star
The centrepiece is a four-point star, baked once into a mesh, a signed distance field and 1.2 million home positions on and inside it. The distance field does two jobs. It pulls grains back to the star, and its gradient gives every grain the surface normal of the shape it belongs to. A flow controller moves the grains on its own fixed 120 Hz step, so the motion doesn't change with the frame rate.
Lighting a million grains as one object
The particle engine I built on already has lit sprites, motion blur and self-shadowing. I used none of them, because each one brought back a failure from the first attempt. Lit sprites are shaded one at a time with no shared normal and no shadow from their neighbours, and that's how you get confetti. Stretching a sprite along its velocity gives you needles, the straws I didn't want. Post-process motion blur smears sub-pixel grains into each other.
So every frame builds its own light. The grains are splatted into a density grid aligned with the light, and the grid is summed toward it, so each grain knows how much of the swarm sits between it and the light. Each grain is then lit once, at both ends of its streak, from the star's normal, that shadow, occlusion from the density around it and one bounce of warm light. Then it's drawn as a swept disc: a round grain smeared along exactly the path it moved that frame. Slow grains stay dots, fast ones become streaks, and nothing turns into a straw. The grains are sorted back to front on the GPU and finished with an AgX grade.
The camera
The camera never cuts. It runs one continuous 72-second loop: wide on the whole star, in to the tip of one point, along the arm, out over the gap into the fur of the ring, around the ring and back out to the wide. Focus runs on its own curve and racks ahead of or behind each move through a shallow close-up lens. Every frame then goes through a lens stack of bloom, halation, chromatic aberration, vignette, film grain and a little lens distortion.




Touch
Every finger on the screen, up to 20 at once, pushes into a fluid simulation that swirls the grains. A pen or a mouse works too. The camera eases to a stop on the first touch and picks the tour back up 15 seconds after the last hand lifts. Touch can lift grains off the star but never press them into it. Grains pushed inside the body picked up its interior shading and turned dark, so the push only works one way.

Where it runs
Swarm runs in Chrome on WebGPU at 60 fps with 1.3 million grains on an RTX 5080, and the show preset takes it to 2.4 million. It's built in Aura, our own framework, on the Crucible renderer and the Swarm particle engine. The grain lighting, the lens and the multi-touch fluid came out of it as modules for the next project.