{"slug": "claude-fable-5-sidi-bousaid-3d-prompt", "title": "Claude Fable 5: Sidi Bousaid 3D prompt", "summary": "A developer created a single-file HTML application using Three.js that renders a photo-realistic, navigable 3D scene of the Tunisian cliffside village Sidi Bou Said. The scene features procedurally generated white-washed buildings with blue accents, a cobblestone alleyway, Mediterranean sea and sky, bougainvillea vines, and realistic lighting, all without external assets.", "body_md": "Write a complete, production-ready, single-file HTML/JavaScript application that renders a highly detailed, photo-realistic, navigable 3D scene of the iconic cliffside village of **Sidi Bou Said, Tunisia** using Three.js.\n\n- Do NOT use any external asset URLs (no external .gltf, .obj, .jpg, or .png files) as they can break or fail CORS. All textures, heights, and models must be generated dynamically and procedurally within the script (e.g., using HTML Canvas to draw textures, procedural noise algorithms for plaster and stone, or mathematical structures for 3D meshes).\n- Do NOT write placeholder comments, truncated code blocks, \"// TODO\" markers, or \"left as an exercise\" shorthand. Every single function, shader, loop, and variable must be written out in its entirety.\n- The output must be a single, copy-pasteable HTML file that runs perfectly immediately when opened in a browser.\n\n**Libraries**: Load Three.js and OrbitControls via a reliable CDN (cdnjs or unpkg).** Iconic Architecture (Sidi Bou Said Style)**:** White-Washed Plaster Walls**: Buildings with flat roofs, rounded corners, and a couple of traditional domes (*koubba*). Implement a procedural stucco texture (low-frequency noise bump map) applied to a clean matte-white material to mimic hand-plastered walls.**Sidi Bou Said Blue Accents**: Distinctive vibrant blue doors, arched frames, and window grates.** Ornamental Windows & Doors**: Procedurally generate arched wooden doors featuring detailed black ornamental stud patterns (drawn using canvas coordinates). Create blue wooden window screens (*mushrabiya*) or curved wrought-iron protective grilles using nested geometries.\n\n**Cliffside Terrain & Cobblestone Alleyway**:- Establish a winding, sloped pedestrian alleyway representing the steep streets of the village, ending at a viewpoint overlook.\n- The street must use a procedural cobblestone texture (canvas-generated noise representing individual rounded stones with grey grout) applied as a displacement and roughness map.\n- Add a rustic stone retaining wall/barrier at the edge of the cliff.\n\n**The Mediterranean Overlook (Background Sea & Sky)**:- Provide a dramatic view of the Gulf of Tunis below the cliff.\n- Water: Use a custom shader or a deep-blue MeshStandardMaterial with layered scrolling normal maps to simulate calm, glittering sea water reflecting the afternoon sun.\n- Sky: A warm, bright Mediterranean sky with subtle atmospheric scattering and a powerful sun source.\n\n**Procedural Flora (Vibrant Bougainvillea & Olive Trees)**:** Bougainvillea**: Create climbing vines draped over the white walls. Use instanced meshes for thousands of tiny, vibrant magenta/pink petals (procedural alpha-masked shapes) clustered together.**Potted Plants**: Place terracotta pots along the alleyway containing small green plants and flowers.\n\n**Mediterranean Lighting & Shadows**:- Setup a high-intensity DirectionalLight representing the intense Tunisian sun, casting sharp but soft-edged shadows (\n`THREE.PCFSoftShadowMap`\n\n). - Use a HemisphereLight with a sky-blue hemisphere color and a warm sandy ground color to emulate realistic bounce light bouncing off the white walls.\n- Configure ACESFilmicToneMapping to handle the high contrast between the bright white-washed walls and deep blue shadows without blowing out the highlights.\n\n- Setup a high-intensity DirectionalLight representing the intense Tunisian sun, casting sharp but soft-edged shadows (\n**Navigation & Exploration**:- Implement OrbitControls or a first-person WASD/PointerLock setup. Restrict the camera height and boundary limits to keep the user at human scale (eye-level) as they navigate up and down the winding blue-and-white alleyway.\n\n**Optimization**:- Maintain 60 FPS on standard desktop GPUs by employing instanced geometry for repeating architectural elements (stairs, window frames, flowers) and handling window resizing flawlessly.\n\nGenerate the full, un-truncated, single-file HTML code now.", "url": "https://wpnews.pro/news/claude-fable-5-sidi-bousaid-3d-prompt", "canonical_source": "https://gist.github.com/cnemri/c917e11b3a6936823b509dcff53392aa", "published_at": "2026-06-10 10:57:55+00:00", "updated_at": "2026-06-13 10:18:13.493456+00:00", "lang": "en", "topics": ["developer-tools"], "entities": ["Three.js", "Sidi Bou Said", "Tunisia", "OrbitControls", "ACESFilmicToneMapping"], "alternates": {"html": "https://wpnews.pro/news/claude-fable-5-sidi-bousaid-3d-prompt", "markdown": "https://wpnews.pro/news/claude-fable-5-sidi-bousaid-3d-prompt.md", "text": "https://wpnews.pro/news/claude-fable-5-sidi-bousaid-3d-prompt.txt", "jsonld": "https://wpnews.pro/news/claude-fable-5-sidi-bousaid-3d-prompt.jsonld"}}