Inspirations

The Oak at Night

A floating island above a moonlit sea of clouds, rendered entirely as soft Gaussian splats: an ancient oak swaying in the wind, a crackling campfire whose light flickers on the bark and the canopy, rising sparks, fireflies, and a slow orbit that dips to the fire and rises over the island.

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 "The Oak at Night": a real-time 3D diorama of a small floating island at night, rendered entirely as a Gaussian-splat capture. Everything (foliage, bark, grass, moss, rocks, earth and clouds) is made of many thousands of soft, semi-transparent, oriented 3D Gaussians. No hard polygons apart from the sky. It must look like a beautiful splat scan, never like noise. Single self-contained HTML file; Three.js r170 and its addons from a CDN via an import map are fine; build everything procedurally, with no models, splat files or images. No people anywhere; no brand names or logos.

The scene (metres, y up; the island centre at the origin):
- An island about 14 m across with a domed grassy top. Dense grass leans outward and spills over the rim. Drifts of wildflowers and moss cushions grow around five mossy boulders. There is a 3.7 m spruce near the rim, a ring of stones around the fire, and a 2 m log with ringed ends. Nobody sits on it.
- The underside tapers 8.5 m to a point. It shows humus under the turf, then earth with clay and ochre strata, rocky outcrops and bedded stones. Dozens of roots hang from it, the oak's thick roots dangle beneath its trunk, and rocks hang from the tip.
- The oak is the hero. A gnarled 1.5 m trunk with deep bark fissures, lichen and moss flares into buttress roots. At about 3 m it splits into six great crooked limbs, each grown towards its share of the crown. The crown is broad and flat-topped, about 16 m across and 12 m tall, and built from about 85 clusters. Each cluster is three to six layered, drooping sprays on short twigs, with ragged edges and holes where branches and sky show through. The leaf splats vary in size, orientation and colour: deep green, olive, lighter young leaves, darker ones and a few brown. The leaves face mostly up, so the clusters never shade like round lobes. The hollow under the crown stays open, so the limbs show.
- A campfire 4.8 m from the trunk, with flame tongues, glowing charred sticks and embers.
- Below lies a sea of moonlit cumulus heads, bright on their moon side, hazing into the horizon. Above is a deep blue sky with soft stars and a low moon with a halo, which stands just beside the crown in the opening shot.

Splat rendering:
- Store each splat in float textures. Draw one instanced quad per splat. Project its 3D covariance with the perspective Jacobian and add a 0.3 px² low-pass. Expand the quad along the eigenvectors (counter-clockwise winding). Use a windowed Gaussian with a slightly flat opaque core. Cull splats behind the camera or well off-screen.
- Sort back to front with a counting sort in a Web Worker built from a Blob. Blend without a depth test. A depth-only pre-pass of the opaque cores hides particles behind the trunk and leaves.
- About 330k splats. Cut cloud quads at 2σ to keep overdraw low.

Light, night but readable everywhere:
- Bake per-splat light at load. March a 0.4 m density grid towards the moon, the fire and the sky, for shadows, occlusion and firelight blocked by the trunk.
- The moon is cool and desaturated. A cool fill from the far side and the moonlit cloud sea bouncing up keep the backlit side and the underside legible. Leaves catch a silver rim when you look toward the moon.
- The fire is an animated point light. Each splat stores its fire response, which the shader multiplies by the flicker.

Motion, all from a 40-second clock:
- Gusts travel through the crown and grass. Leaves flutter and turn slightly, so the crown shimmers.
- Sparks come in bursts from the embers. They are buoyant and then slow, swirl and drift off with the wind, and cool from yellow-white to deep orange. They die within 1.5 to 3 m, with a rare one climbing higher. Sizes and brightness vary, and they never form a straight line.
- A soft smoke plume bends with the wind.
- Fireflies blink over the grass and cold motes drift down. The clouds drift and the island bobs 12 cm.

The camera, one seamless 40-second orbit through periodic Hermite keys:
- Start: a wide view from the fire side, the oak against the moon.
- It sweeps in low to the fire and looks up into the firelit limbs.
- It pulls out high over the island and the clouds, dips below the island to the roots, then returns.
- Drag to orbit and scroll to zoom, easing back after 3 s. In portrait, widen the view and tilt up, most of all near the fire, so no part of the orbit is half foreground.

Look: deep night blues against the warm orange of the fire. Bloom is a gentle warm glow on the fire, sparks and fireflies only, never a column. ACES tone mapping, sRGB output, a soft vignette and very subtle grain.

Interface: only a small elegant caption, a title and one line. Moving from the first frame, with no loader or click to start.

Engineering rules (the page must work on the first load, with no fixes):
- In <head>, the import map comes before any module script.
- Use only methods that exist in Three.js r170. Give every ShaderMaterial `fog: false` and declare every uniform and varying.
- Take time from the rAF timestamp, never accumulated dt. Make every motion periodic in the loop, and support `?t=SECONDS` and `&freeze=1`.
- Build all splats, the light bake and the first sort before the first frame. Warm up with compileAsync and a few offscreen renders, so there is no stall later, including at the loop wrap.
- Cap the pixel ratio at 1.25 and lower it under sustained load, to hold 60 fps on an M1 Pro.
- The page runs in a sandboxed iframe with an opaque origin: no storage, cookies or dialogs. Guard animated values against NaN.
- Answer with the complete file exactly once, in a single ```html code block.

Keep planning brief: roughly 1,100 to 1,300 lines, compact and clear.