Swim a reef while 50 years of ocean warming play out. Heat accumulates as degree heating weeks, corals bleach and sometimes die, algae move in unless fish graze them, and cool years let the reef recover. Change the world and watch the reef respond.
4. What am I seeing?
Light and colour fade with depth
Sunlight is absorbed by water exponentially, and red is absorbed about four times faster than green or blue. That is why everything turns blue-green by 10 m and a red fish looks grey.
I(z) = I0 · exp(-Kd · z)
Kd(R,G,B) = Kd · (3.8, 1.0, 0.72)
at 10 m, Kd = 0.10 /m: R 2.2 % G 36.8 % B 48.7 %
The slider changes Kd: plankton and sediment make water murkier (Kd 0.2 to 0.3). Coral growth also uses this light: photosynthesis saturates as 1 - exp(-I/Ik), so deep colonies grow slower. Every pixel is dimmed by the light path from the surface and by the path to your eye, then veiled with scattered blue light.
Caustics: bright net on the sand
Waves act as thousands of small lenses and focus sunlight into a moving bright network on the seabed. It shifts with the waves, fades with depth and vanishes at night. It is drawn procedurally from two interfering wave fields; its brightness uses the same sun and depth as the physics.
God rays and floating particles
Sunbeams become visible where light scatters off tiny particles and plankton. The shafts follow the refracted sun direction: sin(theta_water) = sin(theta_air) / 1.33, so even a low sun shines steeply into the water. The drifting specks (marine snow) are what make the beams and the distance haze readable.
Heat stress: degree heating weeks
Corals live close to their upper temperature limit. Reference: the Maximum Monthly Mean (MMM, 28.6 C here), the warmest month of the long-term average.
HotSpot(week) = SST - MMM
DHW = sum of HotSpot over the last 12 weeks,
counting only weeks with HotSpot ≥ 1 C [C-weeks]
DHW ≥ 4: significant bleaching likely. DHW ≥ 8: widespread mortality likely. The graph's top row shows DHW with those two lines. Sea temperature is the seasonal cycle + your warming trend + El Nino-like warm and cool events + weather noise.
Bleaching, death and recovery
Under heat the coral's symbiotic algae turn toxic and are expelled; the white skeleton shows through. A bleached coral is starving but alive. Each colony has its own tolerance (some are 20 % tougher) and sits at its own depth (deeper is slightly cooler).
stress D = DHW · (1 - 0.012 (depth-5)) / tolerance
bleach target = clamp((D - 3) / 5, 0, 1)
death hazard per week: 0.016 + 0.012 (D - 8) for D ≥ 8
recovery: when D < 2 the colony regains ~8.5 %/week
A cool year after an event lets survivors re-colour; survivors of strong events also raise the reef's average tolerance a little (acclimatisation/selection).
Algae overgrowth vs grazing fish
Dead coral is quickly colonised by algal turf and then larger seaweed. Grazers (parrotfish, surgeonfish) crop it. The balance per dead colony each week:
dA = 0.10 A (1 - A) + 0.035 (1 - A) - g A
g = 0.15 · B / (B + 250) B = grazer biomass [kg/ha]
If g is bigger than the algae growth rate the surface stays clean and coral larvae can settle; if grazers have been fished out, algae win and recovery stalls. Watch the grazers swim to the greenest dead colonies. Protection (fishing limits) cannot stop heat, but it decides whether the reef can recover afterwards.
Fish populations
Grazers, plankton feeders and predators follow logistic growth where the carrying capacity depends on living coral structure:
dB/dt = r B (1 - B / K(cover)) - F B - predation
K = 1400 · (0.2 + 0.8 · cover/max) [kg/ha]
Fewer corals means less shelter and a lower K, so fish decline after coral loss (and coral-feeding butterflyfish pairs vanish first). Fishing mortality F is cut to 6 % once the no-take rule starts. The number of fish you see scales with biomass; schools are boids (separation, alignment, cohesion) and predators make the shoals split and reform.
Carbonate budget: does the reef build or erode?
A reef persists only while it builds limestone faster than it loses it.
net = gross production - erosion [kg CaCO3 / m2 / yr]
gross ~ 16 · cover · (1 - 0.85 · mean bleaching)
erosion = 0.55 (boring organisms) + 0.0016 B (parrotfish)
+ 2.2 · algae cover
Positive means the structure grows; negative means it flattens, which is why dead skeletons visibly shrink in the scene and the habitat for fish falls.
Day, tide and season
The sun's height follows latitude and season (sin e = sin(lat) sin(decl) + cos(lat) cos(decl) cos(H), 17 deg S). Tide follows two cycles per lunar day, h = 0.9 sin(2 pi t / 12.42 h) m; the water above you changes by the tide. One scene "day" lasts 90 s of real time, independent from the 50-year time scrubber.
7. The science (and what is simplified)
Honest limits of this model
The equations above are real: Beer-Lambert absorption, the NOAA-style DHW accumulation, logistic fish dynamics and the carbonate-budget idea. The rates (bleaching speed, mortality hazard, algae growth, recruitment, erosion) are illustrative values tuned to reproduce known qualitative behaviour, not fitted to one real reef. Real reefs differ by species, depth, water flow, shading, local adaptation and disease; 400 colonies stand in for a whole reef; larval supply from other reefs is a single number; ocean acidification and storms are not simulated. The sea temperature series is synthetic: one random climate per seed, not a forecast. The warming slider is not a prediction for any place.
Bleaching events at DHW ≥ 4 and widespread death at DHW ≥ 8 follow the alert levels used by reef-monitoring agencies. Fish sizes and colours are generic representatives of their groups (plankton feeders are drawn larger than most real ones so they stay visible). No real reef, place or person is represented.
How it was made
Seabed terrain (spur-and-groove mesh), colony and rock placement and baked contact shadows were generated in Unity 6000.6 (batch mode, exported to glTF). Coral, fish, rock and algae models plus the sand and coral detail textures were built and baked in Blender 5.2 (Cycles). Rendering, shaders, behaviour and the model run in Three.js r160 with WebGL.
Controls
Tour: automatic flight. Orbit: drag to rotate, wheel / pinch to zoom. Free dive: drag to look, W A S D or the on-screen stick to swim, Q / E up and down. Click a blue pin for an explanation, or use the Before | After wipe to compare an earlier year with now (drag the white handle). URL options: ?q=low, ?embed=true.