Stoatworks Labs

Bassalt

A lava lamp for Resolume

Betav0.1.0Plugin & ModuleC++ / GLSL
Bassalt — A lava lamp for Resolume
No screenshot — this one is configuration inside another application.

What it does

An FFGL effect for Resolume Arena and Avenue. The frame is a lava lamp, and nothing in it is animated: the wax, its heat and the flow are fields on a grid sized in metres, with their constants in the open. A bulb in the base heats wax that is a little denser than the water above it when cold. Wax expands with heat about three times faster than water, so above a crossover temperature it is the lighter and it rises; at the cap it cools, is denser again, and sinks.

The wax is a Cahn–Hilliard phase field, whose interface carries surface tension. The heat is advected and conducted, fed by the bulb through the base and lost through the glass and, harder, through the metal cap. The flow is Darcy's law in a Hele-Shaw cell — the thin flat lamp the frame literally is — solved every step by multigrid as a streamfunction, so it is divergence-free by construction.

What falls out of that is what a lamp does. A hot layer under cold water is Rayleigh–Taylor unstable, and surface tension sets the one wavelength that grows fastest, so the wax leaves the base as pillars of one size that neck and pinch off. A cold lamp is a slab that has to melt from the coil up — at 1× that takes an hour, as a real one does, and Speed runs it faster. Too much bulb and all the wax pools at the cap; too little and it never leaves the base. Salt moves the crossover 11.3 K per per cent.

The name is the lamp's two real controls. Bass drives the bulb, through the bulb's own thermal lag, so a heavy bass section warms the lamp and a breakdown lets it settle; kicks put a pulse of heat into the base. Salt is what a lamp maker dissolves in the water to set its density against the wax.

The clip goes through it two ways. Behind puts the world behind the lamp: wax (n = 1.44) in water (1.34) is a lens, so each round blob shows a small upside-down picture, and a Cylinder glass magnifies across its middle by Snell's law. Dyed makes the clip the wax itself, carried, stretched and pinched by the flow. Pour turns the clip's bright parts into wax, and Clip Heat lets its bright regions melt.

  • A heat engine, not an animation: Cahn–Hilliard wax, advected heat and Hele-Shaw flow solved by multigrid
  • Bulb, bulb lag and coil; salt, wax amount, surface tension, wax viscosity and melting point
  • Warm-up from a cold slab at real speed, or Warm to jump to the hot lamp; Speed to 300×
  • Audio: bass drives the bulb through its lag, kicks put heat into the base
  • Behind: every blob a lens, through a flat panel or a cylinder. Dyed: the clip as the wax
  • Pour the clip's bright parts in as wax; Clip Heat lets bright regions melt
  • Temperature, Wax, Velocity and Density views, for the model on its own
  • Universal macOS bundle and a Windows x64 DLL

Where it stands

v0.1.0, and honestly early. The lamp is measured against the physics rather than asserted, and tools/verify.sh runs the lot: a level lamp at rest stays exactly at rest, to the bit; a neutral blob's spurious currents stay below 2% of the capillary scale and die away; the wax is conserved to 6e-7 through minutes of convection and no cell's heat ever leaves its neighbours' range; a blob stops at the crossover temperature to 4e-6 K, and salt moves it 11.3 K per per cent, as the density laws say; the GPU's flow solve agrees with an exact CPU solve to 1e-9, and a blob rises at the Hele-Shaw speed to within half a per cent; Rayleigh–Taylor fingers grow at the rates the law gives, to 0.8–2.4%; every joule the bulb puts in is accounted for; and the cylinder glass bends the world by Snell's law to 1e-5 at two rasters. Fourteen deliberately wrong models are all detected, one character changed in the shipped shaders is caught, and all 30 controls measurably change the picture. Render cost on macOS is about 2 ms/frame at 1080p at the default Speed. It has not yet been loaded into Resolume on either platform; the Windows DLL is built by MSVC in CI and nothing has run it. It is a flat lamp (a thin Hele-Shaw gap), not a round one; surface tension stops at 10 mN/m; Speed's 300× is really about 70× once the lamp convects; there is no latent heat. No real audio has reached it in a host, so Resolume's 64-bin FFT mapping remains an assumption. There is a browser demo, which is a port rather than the plugin; no OpenFX port and no user guide. Check it in your own rig before trusting it in a show.

Watch it running

Bassalt video thumbnail

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