Post 100

Sunlight on the Pool Floor

Water is transparent now: look down through the surface and the sea floor is there, refracted, colour-shifted by depth, and dappled with real caustics driven by the wave maths. RiverFlow makes the whole field travel and churn. Two more nodes stop being decorative.

Last release gave Lux a real ocean, with one caveat nobody had to say out loud: the water was opaque. Handsome from a distance, but lean over the side of the boat and it might as well have been painted steel. Meanwhile two nodes, Caustics and RiverFlow, sat in the library accepting connections and politely discarding them, and their four demo patches contained, on close inspection, no water whatsoever. A caustics demo set in a desert.

Seeing through it

The water surface now samples the scene behind it: a refracted look-through, bent by the wave normals, with per-channel Beer-Lambert absorption doing the colour work. Shallow water over a sandy floor reads sandy-green; as the bottom falls away the red dies first, then the green, exactly as the extinction pin specifies, until only the scatter colour of the deep remains. The extinction values you type are real optical coefficients per metre, so the tropical-shallows preset behaves like tropical shallows.

Caustics ride that same path. The wave simulation already computes, per texel, how much the surface is focusing or spreading light, because that quantity (the Jacobian) is what decides where foam breaks. Where it indicates convergence, refracted sunlight piles up on the floor below, brightest near the focal depth you choose. So the dapple pattern on the pool floor is not a scrolling texture: it is derived from the same wave field that displaces the surface above it, and it sharpens and scatters as the waves do. Turn the intensity pin from 0.2 to 3 and the floor goes from quiet shimmer to full holiday-brochure.

RiverFlow finally does what its name promised: it transports the entire wave field along the wind direction at your chosen speed and churns it with a turbulence warp, so a fast river at speed 10 has visibly travelled and broken up while a lazy drift at 0.2 has barely moved. Geometry, not tint. The fast and slow demo patches, byte-identical for their entire prior existence, now disagree about everything.

Housekeeping with a body count

The four demo patches were rebuilt to contain actual water, in the process surfacing a vintage bug: their floor planes had been fed radians into a degrees pin and were standing almost perfectly on edge, like submerged billboards. Both nodes also lost a dead texture input that no code had ever read, and the renderer lost its last two warn-once-and-drop apologies. Every environment payload that reaches the renderer now either draws pixels or tells you precisely why not.

What it buys you

Water you can see into, floors that dance with focused light, rivers that flow. With this, every node in the environment family (sky, cloud, fog, water, flow, caustics) ends in pixels, and the volumetrics rebuild that started with fog is complete. The sea is open; bring a towel.

← All posts