Alexis Mabanza @ alexvolkihar.ovh

Caustics

Sunlight focused by moving water

Sunlight falls on a wavy surface and every ray is bent by Snell’s law on its way down to the floor. Under the crests the rays converge like they would under a lens, and the light piles up into the bright folded lines of a caustic network. Under the troughs it spreads thin. The surface can be a long swell, a short chop, a ruffled wind sea or a set of rings spreading from drops. The floor depth is set from the surface’s own curvature: soft light before the first focus, sharp lines right at it, or a denser net past it. Pools are deeper at one end, so the lines sharpen across the picture. The floor is then seen from above through the same water, so the grout and lane lines wobble, and the water column tints it with depth. In the rarest scene the surface is a leaded window of coloured glass, and its light falls on a wall: each pane tints the light it lets through, and the uneven glass bends it into small caustics of its own. The light is added up in linear units, and each piece sets its own exposure from its brightest and its median light, so the cores of the lines roll off towards white instead of clipping flat. Press New seed for a fresh hash, then share the URL to show someone that exact piece.

All series
0xfe515a35…5023
Floor LanesSurface RuffledFocus SoftLight NoonPalette Aqua
0xf1952a18…6b71
Floor LanesSurface ChopFocus DeepLight SlantPalette Amber
0xc16efa45…dfdb
Floor PebblesSurface ChopFocus DeepLight NoonPalette Ink
0xa301b675…4acf
Floor TilesSurface ChopFocus SharpLight PrismPalette Lagoon
0x7a9c7f5c…0420
Floor SandSurface DropsFocus DeepLight SlantPalette Amber
0xf4115d8b…6e01
Floor TilesSurface SwellFocus SharpLight NoonPalette Aqua
0x91a10f04…0543
Floor TilesSurface DropsFocus DeepLight SlantPalette Amber
0x0a26b1ef…2cdd
Floor TilesSurface RuffledFocus SoftLight NoonPalette Nocturne
0xccc6d50d…7384
Floor WindowSurface ChopFocus SharpLight NoonPalette Nocturne
0xa666dc04…33eb
Floor WindowSurface ChopFocus DeepLight NoonPalette Ink
0x876b8363…cefa
Floor TilesSurface ChopFocus DeepLight SlantPalette Ink
0x1b2928a4…0b9f
Floor LanesSurface ChopFocus SharpLight PrismPalette Lagoon

Traits

The weights were set before any drawing code was written. They were then checked against a census of 2,000 seeds.

TraitValues (weight)
FloorTiles 32 · Sand 24 · Pebbles 18 · Lanes 16 · Window 10
SurfaceChop 36 · Swell 28 · Ruffled 20 · Drops 16
FocusSoft 24 · Sharp 50 · Deep 26
LightNoon 56 · Slant 30 · Prism 14
PaletteAqua 30 · Lagoon 22 · Amber 18 · Nocturne 18 · Ink 12

Credits

  • Light transport: one ray per lattice point of the surface, refracted with the vector form of Snell’s law and followed down to the floor, its light gathered there in an illumination map, after James Arvo, Backward Ray Tracing (SIGGRAPH 1986 course notes, "Developments in Ray Tracing").
  • Brightness by area ratio: each small triangle of the surface carries a fixed amount of light, spread over the triangle it becomes on the floor, as in Evan Wallace, Rendering Realtime Caustics in WebGL (2016). Triangles that shrink are splatted as single photons, larger ones are cut into more photons or rasterised.
  • Background: Jos Stam’s Random Caustics (SIGGRAPH 1996 sketch) showed caustic textures on a pool floor at different depths; this series traces rays instead of Stam’s wave optics.
  • Exposure: the exposure is set from percentiles of a small fixed probe render, in the spirit of the key value of Erik Reinhard, Michael Stark, Peter Shirley and Jim Ferwerda, Photographic Tone Reproduction for Digital Images (SIGGRAPH 2002). The highlights then roll off on an exponential shoulder, as filmic curves do: see John Hable, Filmic Tonemapping Operators (2010).
  • Water: sums of plane waves, ring packets from drops, and Beer–Lambert absorption by the water column. The Prism light gives each colour channel its own refractive index, with the dispersion of water exaggerated so the fringes show. The implementation is original, written from these descriptions.
  • Randomness: sfc32 by Chris Doty-Humphrey. The hash seeding, named sub-streams and verification follow Camille Roux’s genart skill (MIT).
  • The palettes are original. The code was written with an AI assistant. It draws everything itself: no AI-generated images.

Artworks © Alexvolkihar, licensed CC BY-NC-ND 4.0. Code under the repository licence (MIT).


>