Stoatworks Labs

Millpond

A pond to throw stones in, for Resolume

Betav0.2.0Plugin & ModuleC++ / GLSL
Millpond — A pond to throw stones in, for Resolume
Millpond

What it does

An FFGL effect for Resolume Arena and Avenue. Your clip becomes the bed of a pond, seen from straight above through the water, and the water obeys linear water-wave theory exactly. Every frame the surface goes through a Fourier transform on the GPU, and each wavelength is moved on by the phase the dispersion relation gives it (gravity, surface tension and depth) and damped at the rate viscosity gives it. There's no time step to go unstable and no numerical dispersion; the dispersion is the formula.

What comes out of that is what a dropped stone actually does. Surface tension gives water a slowest speed at which a ripple can carry energy, 17.8 cm/s, so the ring has still water inside it and an edge shaped like an Airy function. Long waves race ahead of short ones. In a centimetre of water the long waves are held back to the speed the depth allows. The banks can be open, where whatever leaves never comes back, or walls, which reflect exactly, to every order.

A skimmed stone loses about the same energy at every bounce, so its hops shorten linearly and quicken as a square root, and after the last one it sinks with a full-sized plop. The Skim button throws one along a heading and the water does the rest. Rain is a Poisson process of small drops, audio onsets drop pebbles, and the level can make the rain heavier.

The light is the other half. The camera's ray bends at the surface by Snell's law and lands on the bed a depth below, so the picture wobbles by as much as real water would move it. Sunlight refracted through the same surface is splatted onto the bed as a mesh whose triangles each carry their own light, so the caustic net keeps all its light however rough the water gets, and the sun's size blurs it by the depth. The sky reflects by the exact Fresnel term, and the sun glints wherever a ripple points it at the camera.

New in v0.2.0, the bass can shake the whole pond up and down. Past a threshold the water stands up in a lattice of Faraday waves that rises and falls at exactly half the shaking frequency, as Faraday saw in 1831. Nothing about it is drawn: in the shaken tank's frame every wave becomes a damped Mathieu oscillator, the lattice's spacing is the same dispersion relation solved at half the drive, and the clip is seen through it by the same optics. A stroboscope, on by default, shows its oscillation slowed, and it can flash with the stroboscope turned down, which the user guide covers.

  • Exact linear water waves: capillary-gravity dispersion on finite depth, viscous damping, on the GPU
  • Drop, Skim and Still buttons; pebble size, splash and scatter; a skim's heading, speed, angle and bounces
  • Rain as a Poisson process, and audio: onsets drop pebbles, the level thickens the rain
  • Open banks that absorb, or walls that reflect exactly to every order
  • Snell refraction of the picture, a light-conserving caustic net, Fresnel sky and sun glints
  • Height, Slope and Caustics views, for the water on its own
  • Faraday waves (v0.2.0): the bass shakes the tank into a lattice of stripes, squares or hexagons, with a stroboscope to slow it
  • Universal macOS bundle and a Windows x64 DLL

Where it stands

v0.2.0, and early days. v0.2.0 adds Faraday waves: Shake lets the bass shake the tank up and down, and past a threshold the pond stands up in a lattice of stripes, squares or hexagons at exactly half the drive frequency, with a stroboscope (Slow Motion, on at 8×) to show its oscillation slowed. With Shake at 0, the default, the picture is v0.1.0's bit for bit, and v0.1.0 compositions load unchanged. In Resolume Arena 7.29.0 on a Mac all 47 controls were there with their defaults, Mix 0 was the clip exactly, a Drop press rang the water, and Resolume's own FFT drove the lattice: with a .wav playing in the composition it stood up and pulsed with the beat, and a clip's own sound track drove it on Local too (Resolume's AV demo .mov clips have no sound track, and with those it heard silence). On Windows, in Arena 7.27.1 on a VM with no GPU and no sound device, v0.2.0 loaded with all 47 controls, rendered and logged no errors, but an automated check read six of its controls as dead: they change the rain, and the check compares pictures of water the rain keeps moving. Damping, measured directly there, does act. The lattice hasn't been seen on Windows. Offline, tools/verify.sh measures it against the physics: the rings match the exact Cauchy–Poisson integral to 0.006–0.019% of the ring, the still disc's edge sits within 1.2 cm of the Airy prediction, the picture moves by Snell's law to 0.036 mm and reflects by the Fresnel term to 1.8e-4, and the caustic net keeps its light; the lattice starts where the damped Mathieu equation says to 7e-5, answers at half the drive, and has the spacing the dispersion relation gives to 0.07%. It catches all 31 wrong models built to trip it, and all 37 controls measurably change the picture. On macOS it costs 1.0 ms a frame at 1080p, 1.7 ms shaken. It's linear theory, so there are no breaking waves, and the Faraday model is known to be quantitatively off against real water. The default Pattern, Squares, isn't what the literature predicts at 10 Hz, and with Shake on, silence still calms the ripples and judders the rain. Faraday waves can flash: at Slow Motion 1× or 2× and full Shake the picture flashed up to 10 times a second over Resolume's demo clips, and the lattice is a strong regular pattern; the user guide says how to keep it safe. There's a user guide and a browser demo, which is a port rather than the plugin, but no OpenFX port and no presets. Try it in your own rig before you trust it in a show.

Watch it running

Millpond video thumbnail

Nothing loads from YouTube until you press play.Watch it there instead