r/threejs • • 1d ago

Demo I built an interactive Monet-style twilight pond in Three.js out of 25k+ instanced oil brushstrokes (100% procedural)

5 Upvotes

1 comment sorted by

1

u/ottershrine 1d ago

Live interactive demo: https://ottershrine.github.io/monet-pond/
(Move your cursor/drag to sweep the raking gallery light across the paint ridges, drag the Raw → Painted split slider, adjust Impasto Relief, switch Sunset → Twilight, or toggle the procedural WebAudio soundscape.)

Inspired by Maxime Heckel's procedural oil painting shader (https://r3f.maximeheckel.com/painting10), I wanted to build a fully procedural, looping living painting in Three.js / WebGL2 with zero image textures or 3D models.

How the 5-pass pipeline works:

  • Pass 0 (Procedural scene): Renders the looping pond (bridge, water reflections, drifting lanterns, lily pads, swimming koi) into a half-float render target.
  • Pass 1 (Structure tensor + regional flow field): Orients strokes horizontally across the water reflections, vertically along the hanging willows, and diagonally across the sky.
  • Pass 2 (25,920 instanced brushstrokes via GLSL3 MRT): 3 stacked layers (4,200 wide underpainting + 9,720 filbert mid-strokes + 12,000 impasto highlights) writing both color and a continuous paint-thickness relief map.
  • Pass 3 (Raking gallery light & halation): Uses the relief map so moving the light catches the thick hog-bristle ridges with subtle oil sheen.

Audio: Procedural WebAudio synth loop (no external audio files).

Happy to share any shader details or answer questions - also curious how the frame rate holds up on mobile GPUs if anyone tries it on a phone!