A familiar flashlight in an unfamiliar gallery. Aim it at the glass, the metal or the floor: a rasterized scene gives way to traced light. Then slow the pulse down until its journey becomes visible.
Optional: warm plumes rise around solid objects. The flashlight can also steer an artistic air jet.
How this experiment works
Density, heat and velocity survive between frames in a 3D simulation. Compute passes advect the field, add buoyancy and solve a pressure correction. The same density scatters the flashlight and attenuates its surface light, refracted beams and caustics. Freeze the flow, then move the light to inspect one volume.
Rive’s current GPU Canvas API has no compute dispatch. This implementation runs beside the ordinary Rive interface. A different solver could use render passes; smoke itself is not an exclusive effect. The coarse grid, seeded plumes and beam-driven force are a visual fluid approximation, not radiation-pressure physics or a multiple-scattering solver.
Drag anywhere in the scene to aim the flashlight. The Rive crosshair and time ruler share the renderer’s controls. Show photons outside aperture keeps refracted caustics visible beyond the soft circular inspection area. Moving controls uses a 512-ray preview with smaller photon footprints. A sweeping time gate can blend a short history, with a slight intentional trail. Holding still restarts independent batches in an arithmetic mean; geometry edits and large time jumps clear history. Direct fog and refracted beams share the optical clock; the beams and receiver footprints use the same emitted rays. Arrow keys aim; 1/2/3 select raster, rays or photons; T toggles the pulse gate.
Shape the torch · power, direction and colour
Brightness changes emitted power; the gallery's ambient light stays. Yaw and tilt offset the continuous Rive aim. Disk and star sample a real emitting area perpendicular to the torch axis, at the same total power. RGB separation changes the glass index for red, green and blue rays.
Area emitters soften and reshape the caustic; they are not a star-shaped screen mask. Five source samples approximate direct surface light; direct fog uses the centre of the emitter. RGB is a three-band dispersion study, not a spectrum. Larger RGB separation needs more stationary batches to smooth the colour samples.
Touch & keyboard controls
Arrange the light and spheres · keep a setup
Geometry and photon transport share these values. Move and resize either sphere; the zebra pedestal follows it. Aim at glass centers the source on the clear sphere. Normal relief changes shading, not the silhouette. Keep the source outside the glass and avoid overlapping objects; this small editor does not resolve collisions.
Your list is stored locally and included in Suite exports. JSON contains setup names and scene numbers only.
Self-contained browser export · ordinary Rive interface + WebGPU renderer. No source-project archive is included.
01 / THE GESTURE SURVIVES
From a flashlight in a script…
The original Rive scripting prototype explored a green wire-grid world with a flashlight, a sampled tracer and several drawing styles. This new instrument revisits that gesture. Its optical materials, GPU photon deposits and time gate extend the experiment.
The baseline uses triangle rasterization and a depth buffer. Within the flashlight, analytical intersections add reflected and refracted views. Emitted rays first intersect the scene, refract through the glass and deposit finite photon footprints on the first receiver they reach. The same paths form a soft volumetric caustic. Occluded direct fog and the refracted beams share the optical time window. Drift, absorption and emission tints are deliberately artistic medium models, inspired by the transport studies in RadianceLab and LTC.
When still, the receiver and refracted beam buffers average independent emitted populations before tone mapping. Sample totals keep growing without a four-batch cap. Moving geometry or an animated medium invalidates the old image and uses a low-cost preview. A nearby time-gate sweep can keep a short exponential history; it deliberately trails the current ruler slightly. Holding still starts a fresh arithmetic mean at the exact gate. Fixed spatial bandwidth and finite beam width remain biased; this is progressive averaging, not a shrinking-kernel PPM estimator.
Gyroid membranes concentrate fog into thin periodic sheets; dense pockets alternate with almost empty channels. Scale and contrast reshape that density. Short density quadrature affects attenuation as well as scattering. Like the procedural-medium studies in RadianceLab, this makes the field itself visible, but this compact browser route uses a bounded approximation rather than full heterogeneous transport.
The zebra library keeps the original oxide/copper pair. Added looks change roughness and metal response; the glass bands trace a refracted background, the steel pair uses an anisotropic highlight, and relief perturbs the normal. Laser foil is an artistic angle-dependent interference colour, not a spectral diffraction solver. This remains a deliberately biased optical study. It is not a complete path tracer, a converged global-illumination estimate or a multiple-scattering volume solver.
03 / THE RIVE CONNECTION
The instrument belongs to Rive.
The reticle, optical-time ruler, labels and three primary sliders are actual Rive vector content. The scene editor, setup list and Living fog switches are host controls. They share values with the GPU renderer, so the composition remains interactive across the boundary.
Here, a RIVX Suite carries the ordinary .riv interface and its external WebGPU player. The companion GPU Canvas authoring explores packaging the optical render passes inside a Rive document; its browser release has a separate compile/signing step. Living fog uses compute passes in the external player. These material, medium and handle variants belong to the browser Suite; they have not been copied into that private companion document.