Lantern Night in Hoi An
Blue hour over the Thu Bon River in Hoi An: silk lanterns glow above ochre shophouses, wooden boats glide past, and hundreds of candle lanterns drift on the water in long, shimmering reflections.
Generated automatically by Claude API (automat) with claude-opus-5.5: the automat wrote the page, looked at its screenshots and fixed it where needed. This is not a single-shot result: comparisons on this site show models in one attempt.
Starting prompt
Build "Lantern Night in Hoi An": the old town of Hoi An, Vietnam, on a lantern-festival night, rendered live in 3D and filmed like a slow, dreamy travel-documentary shot from a boat on the Thu Bon River. It should feel warm, real and close, and be beautiful from the very first frame, never toy-like. Single self-contained HTML file; Three.js and its addons from a CDN via an import map are fine; build everything procedurally (canvas textures are fine), with no external models or image files.
The scene (metres, y up; the river surface is at y = 0 and is about 60 m wide):
- The north bank (the main view): a riverside row of about 18 two-storey shophouses, each 4–6 m wide and 7–9 m tall. Their walls are washed in mustard and ochre yellow (#d9a441 to #c98a2e), with weathered patches, damp streaks and peeling plaster from a canvas texture. Each has dark teak shutters and balconies, and a roof of curved terracotta yin-yang tiles with a slight sag and mossy ridges. Some ground-floor doorways are open, lit warm orange from inside, and some upper windows glow. There is a stone quay about 1.2 m above the water with a few steps down to it. A few frangipani and bougainvillea trees in silhouette add magenta flowers on the walls.
- Silk lanterns everywhere: about 400 of them in strings across the street fronts, under the eaves and along the quay. They come in shapes with real proportions: round (35–50 cm), elongated ovals, and diamond "Hoi An" lanterns with a bamboo rib frame, a red tassel below and a dark wooden top and bottom cap. Their colours are crimson, saffron, emerald, violet, turquoise and rose. Use instanced meshes with an emissive fabric shader that shows the ribs as darker lines, is brighter in the centre and dimmer at the edges, and has a slow, individual flicker. Lanterns sway gently on their strings, each with its own phase.
- The Japanese Covered Bridge at the west end of the bank: a small arched wooden bridge, about 18 m long, with a tiled roof and red lacquered posts, lit from inside, as a landmark in the middle distance.
- The south bank (behind the camera at first, then seen in the wide shots): lower houses, palms and a moored row of boats, darker, for depth.
- The river: dark, glassy water with slow ripples and a faint current flowing east. Around 250 floating paper candle lanterns (open lotus-shaped cups, 15 cm across, in pink, red, yellow and white, each with a tiny flame) drift downstream in loose clusters and bob gently. They respawn upstream out of view, so they never run out.
- Boats: four or five wooden sampans, about 7 m long, with dark hulls, a painted eye at the bow and a curved woven bamboo canopy hung with lanterns. Each is rowed by a single small figure in a conical non la hat standing at the stern with a long oar (small silhouettes for scale only, no faces). One boat slowly releases candle lanterns into the water.
- People for scale: small silhouetted figures strolling on the quay and on the bridge, a few leaning on the rail.
The look:
- Blue hour, fixed so that the loop is seamless: a deep indigo sky at the top fading to violet and to a last band of dusky magenta and amber low in the west, behind the bridge. A few early stars and a thin crescent moon.
- Reflections are the hero. Every light source (lanterns, candle cups, doorways, windows) casts a long, vertically stretched, rippling reflection streak on the water: additive, soft-edged quads below each light, distorted horizontally by scrolling noise and broken into shimmering fragments. The water also reflects the sky gradient through a Fresnel term (dark near the camera, brighter towards the horizon). Do not use a second render pass for the reflections.
- Atmosphere: a light warm haze over the water, thin drifting smoke from incense near the quay, and a few hundred floating dust and moth specks catching the lantern light. Exponential fog towards the deep violet, matched by the sky near the horizon.
- Lighting: a cool, dim moon/sky light for the shapes, plus a handful of warm point lights (no more than 6, moved to follow the camera's region) so that the walls and boats pick up warm pools of lantern light. ACES tone mapping, a generous but controlled bloom on the lanterns and flames, a soft vignette and slight film grain.
- Palette: indigo and teal shadows against saffron, crimson and gold glows, rich but harmonious.
Hero shot (frame 0 and the frame at 8 s): the camera is about 1.2 m above the water, 15 m off the north bank, looking slightly upstream along the river. In the foreground, a cluster of floating candle lanterns sits close to the lens, softly out of focus. In the middle ground, a sampan glides from right to left, hung with glowing lanterns, its rower in silhouette. Behind it, the ochre shophouses glow under strings of coloured silk lanterns, all doubled by long, shimmering reflections. In the far background, the lit covered bridge stands under the magenta afterglow. By 8 s the boat has moved about a third of the way across and the camera has drifted closer to the drifting lanterns.
Camera loop (~90 s, a smooth, closed Catmull-Rom path with a gentle boat-like bob and roll):
1. 0–20 s: the hero shot, drifting slowly upstream at water level.
2. 20–40 s: a slow pass along the quay, close enough to see the lantern ribs, the tassels, the tile texture and people walking.
3. 40–58 s: a gentle rise to about 6 m with a turn towards the covered bridge; the candle lanterns spread out on the water below.
4. 58–75 s: a wide view from mid-river showing both banks, the boats and the full ribbon of reflections.
5. 75–90 s: a descent back to water level, gliding past the releasing boat, then joining the start of the path.
Drag to look around and pinch or scroll to zoom gently; the camera eases back to the path about 4 s after the last input. Everything starts automatically and is visibly moving from the first frame (water, flames, lantern sway, boats).
Interface: a small, elegant caption at the bottom left in a serif Google Font: "Lantern Night in Hoi An", a subtitle "Thu Bon River · Quang Nam, Vietnam", and one short line that changes with each stage, crossfading (for example "Silk lanterns stretched on bamboo frames, a craft of the old trading port", "Floating candles are set on the river at the full moon"). A tiny "drag to look" hint fades after 4 s. On a portrait phone, widen the field of view and pull the camera back.
Engineering rules (the page must work on the first load, with no fixes):
- Single self-contained HTML file. Three.js r170 and its addons ONLY from the CDN via this exact import map: <script type="importmap">{"imports":{"three":"https://cdn.jsdelivr.net/npm/three@0.170.0/build/three.module.js","three/addons/":"https://cdn.jsdelivr.net/npm/three@0.170.0/examples/jsm/"}}</script>. Google Fonts are allowed. Everything else is procedural (canvas textures are fine): no external models, images, audio or any other fetch.
- It runs in an iframe with sandbox="allow-scripts" and no allow-same-origin: do not use localStorage, sessionStorage, cookies, alert or window.top.
- Use only methods that exist in Three.js r170. Every custom ShaderMaterial has fog: false and declares every uniform, constant and varying it uses. Declare each identifier once. Never reuse one scratch vector for two values needed at once. Guard animated values against NaN, and clamp shader terms that could blow up (an Inf pixel turns the bloomed image black).
- Use InstancedMesh for the lanterns, candle cups, roof tiles and reflection streaks. Cap the pixel ratio at 2 and stay near 60 fps on a laptop. No console errors.
- It works in a ~1150×700 frame and on a phone (390×844, touch).
- 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 700 to 1,000 lines, compact and well structured.