Inspirations

Through Saturn's Rings

A Cassini-style flight to Saturn: banded clouds with the polar hexagon, named ring structure and shadows, a dive through the Cassini Division among tumbling ice particles, the rings glowing from below with the Sun behind them, and Mimas crossing the planet.

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 "Through Saturn's Rings": a cinematic, real-time 3D flight to Saturn and through its rings, like a Cassini mission film. Single self-contained HTML file; Three.js and its addons from a CDN via an import map are fine; build everything procedurally (canvas or data textures are fine), no external models, images or other files.

Scale and setup (1 unit = 1,000 km, y along Saturn's spin axis, rings in the plane y = 0):
- The Sun: a distant light about 20° above the ring plane, so it lights the north face of the rings.
- Saturn: an oblate spheroid, 60,268 km equatorial and 54,364 km polar radius, with a custom shader:
  - soft, pale butterscotch cloud bands from a latitude colour table, with noise-warped band edges, fine streaks and a slow differential drift (fastest at the equator);
  - a few subtle white storm ovals;
  - the north-polar hexagon at about 78° N: a six-sided jet-stream outline in blue-grey around a dark central vortex;
  - a soft terminator, limb darkening, a thin haze rim that glows strongly when the Sun is behind the planet, and faint ringshine on the night side;
  - the shadow of the rings on the clouds: from each point, trace towards the Sun to the ring plane and dim by the ring opacity there.
- The rings: a radial profile in kilometres baked into a data texture (optical depth, colour, fine-structure amount, dust fraction):
  - a faint D ring (66,900–74,490);
  - the dark grey C ring with brighter plateaus and the Colombo and Maxwell gaps (to 91,980);
  - the bright, cream, heavily structured B ring (to 117,580);
  - the Cassini Division with its own small gaps (to 122,170);
  - the A ring with the 325 km Encke Gap and the 42 km Keeler Gap (to 136,775);
  - a thin, slightly eccentric, braided F ring at 140,220 km.
- Draw the rings by ray-casting the plane y = 0 in a full-screen pass, not as a mesh, so the shading holds from 400,000 km down to a few metres. In that pass:
  - test the planet and Mimas analytically for occlusion;
  - shade the lit face with single scattering and the unlit face with diffuse transmission, so from below the thin rings glow and the dense B ring goes dark;
  - add a forward-scattering dust glow when looking towards the Sun, and cast the planet's shadow across the rings;
  - add fine radial ringlets and A-ring density waves that fade with the pixel footprint, so nothing shimmers;
  - near the crossing point, let the floor break into glittering grains as the camera closes in.
- Ring particles at the crossing point: a separate scene in metres, drawn over the main pass after clearing the depth buffer.
  - Thousands of instanced, lumpy icy grains in three size classes, from 3 cm to about 2 m, plus tens of thousands of point sprites further out.
  - They lie in a layer about 10 m thick, tumble slowly and have frosty shading with a bright rim when backlit.
  - Keep them off the camera's path.
- Mimas, 396 km across, with a cratered canvas texture and the huge Herschel crater, on its slightly inclined orbit at 185,540 km.
- A few thousand stars at infinity.

The look:
- Black space and pastel true colours, ACES tone mapping, gentle bloom only on the Sun and the brightest glints, and a soft vignette.
- The Sun is a small hot disc with a halo. It is hidden by the planet and dimmed by any ring in front of it.
- It must never look washed out.

The flight: 60 seconds, then it loops with a short fade through black.
- Move the camera along a logarithmic path: position = crossing point + 3 m · sinh(s(t)) · direction(t). Interpolate s and the direction through keyframes with monotone cubics.
- This turns a 400,000 km approach into a smooth dive through a 10 m layer.
1. Approach (0–12 s): start about 430,000 km out and 34° above the ring plane. Saturn is gibbous, with the rings' shadow on it and its own shadow across the rings, and the hexagon at the top. The camera swings around the planet as it closes.
2. Skimming the rings (12–20.5 s): descend to a few thousand km over the outer rings, crossing the F ring and the A ring towards the Cassini Division, with Saturn huge ahead.
3. Through the Cassini Division (20.5–31 s): steepen into a dive at a radius of 119,150 km. The floor turns into glitter, then into particles that stream past as the camera levels off and crosses the plane at 27 s. Beyond, the rings are a thin bright line across Saturn's crescent.
4. Beneath the rings (31–47 s): look up through the rings at the Sun, then turn towards the glowing ring arcs and the crescent while dropping thousands of kilometres below the plane.
5. Mimas (47–60 s): pull out to 191,000 km, just below the ring plane, and hold while Mimas glides across Saturn's disc.

Interface:
- A small, elegant caption with the title, the stage number and name, one line of real facts, and one live readout (range to Saturn, altitude above or below the ring plane in km or m with the ring region beneath, range to Mimas).
- A thin progress bar for the five stages.
- Drag to look around; the view returns to the film about 2.5 s after the last input.
- Everything starts automatically and is visibly moving from the first frame, without any interaction. Use a wider field of view in portrait so it works on a phone.

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. Cap the pixel ratio at 2. The page runs in a sandboxed iframe, so do not use localStorage or other storage.
- 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 800 to 1,100 lines, compact and well structured.