Inspirations

Volcanic Lightning

A stratovolcano erupts across a bay at night in a dirty thunderstorm: branching lightning crackles through a raymarched ash plume lit orange by a lava fountain, while bombs arc, lava steams into the sea and onlookers on a harbour jetty watch.

Made in Claude Code (Claude subscription) with claude-opus-5.5. The agent wrote code, looked at the preview and fixed it over several iterations. This is not a single-shot result: comparisons on this site show models in one attempt.

Starting prompt

Build "Volcanic Lightning": a real-time 3D night scene of a "dirty thunderstorm": a stratovolcano erupting across a bay, its ash plume lit orange from below by a lava fountain and crackling with lightning, watched from a small fishing harbour. It should look like a night photograph of Sakurajima brought to life, beautiful from the first frame. Single self-contained HTML file; Three.js and its addons from a CDN via an import map are fine; build everything procedurally (canvas and data textures are fine), no external models or image files.

The scene (metres, y up; the camera stands on the harbour shore about 2.5 m above the water, looking along −z):
- The volcano: a concave stratovolcano about 1,200 m high and 10 km across, its summit 7.2 km away, a little left of centre. A 420 m crater with a raised rim, an older lower peak on its left shoulder, radial erosion gullies, grey ash above and dark forest below. Its foot meets the bay 2.3 km away, where village lights give scale.
- Lava: a fountain of incandescent spatter a few hundred metres high pulsing in the crater. Three lava flows follow the gullies down the camera-facing flank: glowing channels with a dark crust and bright cracks that creep downhill. One reaches the sea, where a white steam plume (laze) rises a few hundred metres, lit orange from below.
- Bombs: incandescent blocks thrown at 45–100 m/s on true ballistic arcs (up to 20 s aloft, short glowing trails), landing on the upper flanks and cooling from yellow-orange to dull red.
- The plume: a raymarched volumetric ash column that widens with height, bends right in the wind and spreads at about 4.5 km into a flat umbrella cloud drifting 9 km downwind, with soft wind-blown veils of falling ash beneath. Cauliflower billows rise continuously; a thinner gas jet at the vent lets the fountain show through. Lit orange from below, fading to dark brown-grey higher up; its silhouette hides the stars.
- The harbour, our human world for scale: plaster houses with dark hip roofs climbing a hill on the left, warm lit windows, sodium lamps along a stone quay. A wooden jetty on piles reaches out left of centre; on its T-shaped end a photographer leans over a camera on a tripod beside two onlookers, one filming on a phone: convincing 1.75 m silhouettes with a faint rim of eruption light. Three white fishing boats with lit wheelhouse windows bob gently, one at anchor with a mast light. On the right a breakwater ends in a lighthouse flashing green every 4 s.
- The bay: calm water mirroring everything, broken into vertical streaks by ripples that are stronger near the camera.
- The sky: deep navy over a faint warm horizon, about 6,000 twinkling stars and a glow of scattered lava light around the summit.

Lightning, the heart of the piece:
- Real kinds: a constant crackle of tiny vent discharges in the jet; near-vent bolts a few hundred metres long; plume lightning 1–2 km long branching out of the column; long horizontal "spider" bolts under the umbrella; cloud-to-ground strikes onto the flank.
- Each bolt is a jagged, branching 3D channel (midpoint displacement, branches that thin and fade), drawn as screen-space ribbons with a white core and blue-violet halo. It flickers like real lightning: a quick leader, a return stroke and one to three restrikes along the main channel, then a fading continuing current.
- Bolts light the ash around them for a moment (blue-white light inside the plume raymarch), the flanks and the harbour, and show in the water. Channels behind dense ash are veiled.
- About one large flash every 1–2 s, more in the storm phase, never more than three per second; the light they cast rises and fades smoothly, never strobing. A big cloud-to-ground strike lands around 8 s.

The look: ACES filmic tone mapping, correct sRGB output, bloom on bolts, lava and lights, a soft vignette. Dramatic but always readable, never a black mush, never washed out. The plume is a half-resolution raymarch through a tileable 3D noise texture, clipped by the scene depth and accumulated over frames so it stays smooth. The water reflects distant things by screen-space reflection of the finished frame and the harbour by a planar mirror render, both rippled.

The film: a 60-second seamless loop driven by wall-clock time, one slow camera move along the shore:
1. Dirty thunderstorm (0–12 s): the wide hero view, bolts crackling in the column, the people on the jetty.
2. Lava fountain (12–24 s): a slow push in on the summit as the fountain surges and bombs fly.
3. Plume lightning (24–38 s): a tilt up to the umbrella as long branching bolts race through it.
4. Lava meets the sea (38–50 s): a pan down and right to the steaming ocean entry, a boat and the lighthouse.
5. A 30,000 K channel (50–60 s): back to the wide view for a cloud-to-ground strike, then loop.

Interface: a small, elegant caption in the lower-left corner with the title, the current phase and one short sentence of real physics that changes with it. Drag to look; the view returns to the path a few seconds after the last input. Everything moves from the first frame, with lightning in the first seconds, without interaction. The layout works on a phone, with a taller field of view in portrait.

Engineering rules (the page must work on the first load, with no fixes):
- Use Three.js r170 and only methods that exist on each of its classes. Give every custom ShaderMaterial `fog: false`, and declare every uniform, constant and varying its shaders use.
- Declare each identifier once. Inside one calculation, never reuse a shared scratch vector for two values that are both still needed; use local vectors.
- Guard every animated value against NaN.
- Drive the film by wall-clock time (performance.now), not by accumulated frame steps. Compile all shaders before the first frame and allocate nothing per frame.
- Answer with the complete file exactly once, in a single ```html code block: no drafts, partial snippets or notes.

Keep planning brief and write the code. Aim for roughly 1,000 to 1,400 lines, compact and well structured.