# 초실사 블록 월드: HTML 파일 하나로 만든 포토리얼 복셀 게임

AI 에이전트가 three.js 파일 하나로 플레이 가능한 포토리얼 복셀 샌드박스 게임과 30초 시네마틱을 만듭니다. 전체 프롬프트, 결과물, Subclip 단계.

Canonical URL: https://www.subclip.app/ko/agent-skills/community/examples/ultra-realistic-blockworld

## 무엇을 만드나요

이 프롬프트는 three.js 파일 하나로 완전한 1인칭 복셀 샌드박스 게임(탐험, 채굴, 건축, 제작, 밤 버티기)을 요구합니다. 모든 블록은 캘 수 있는 1m 정육면체로 남지만, 세계는 사진처럼 보여야 합니다. 사실감을 위한 작업도 자세히 나열합니다: 시차 효과와 모서리 베벨이 있는 절차적 PBR 재질, 반투명 나뭇잎 카드와 바람에 흔들리는 풀, 볼류메트릭 구름이 있는 물리 기반 하늘, 캐스케이드 그림자, 반사와 커스틱이 있는 물, 날씨, 눈 순응. 게임은 오리지널이어야 하고 실제로 플레이할 수 있어야 하며, `?demo=1` 모드에서는 30초 시네마틱을 프레임 단위로 렌더링합니다.

결과물은 ASHLAR로, Claude Code에서 claude-sonnet-5-5 모델을 요청해(Rez는 Sonnet 5.6 (next)로 표기) 약 252분 동안 만들었습니다: 블록 84종, 바이옴 11개, 제작, 제련, 오리지널 생물, 합성 사운드.

## 프롬프트 (prompt.md)

저장소의 prompt.md를 한 글자도 바꾸지 않고 그대로 실었습니다. 저장소의 모든 모델이 이 프롬프트를 똑같이 받았습니다. {{FOLDER}} 자리표시자가 있으면 보내기 전에 빈 출력 폴더로 바꾸세요.

```
# Task: an ULTRA-REALISTIC, photoreal HDR voxel sandbox game in ONE HTML file

You are the sole engineer on this build: you write all the code, run it, test it, render it and fix it. Nobody else will touch the code.

Build a complete, playable first-person voxel sandbox game (explore, mine, build, craft, survive the night) as ONE self-contained HTML file with three.js. The twist that defines this project: it is the **ultra-realistic** take on the block-sandbox genre. The world is still made of 1 m cubes you can mine and place one by one, but it must look like a photograph of a real place that happens to be built from blocks: real-looking stone, soil, bark, sand, snow, water, sky, light and weather. Think "a AAA photoreal engine renders a block world", not "pixel art with bloom". It is a public showcase posted on X: the kind of shot where people ask "this is a block game? in a browser?". It must also be a real, comprehensive game, not a tech demo with a camera.

Make it an original game: invent its name, block set, creatures, items and UI. Do not copy any existing game's name, logo, textures, characters, creatures, sounds or menus. No blocky green exploding creatures, no famous block-game mob silhouettes, no famous block-game default-character look. Your creatures, items and menus are your own designs.

## Your folder
Work ONLY inside `{{FOLDER}}` (create it if missing). Apart from tool installs and caches, touch nothing outside it. If you need a local HTTP server, use a random high port (4xxxx).

## Hard rules
- One file, `blockworld.html`. The only external dependency allowed is three.js (core plus `examples/jsm` addons) from an exact pinned version on jsdelivr or unpkg via an import map. No downloaded models, image textures, HDRIs, sound files or fonts: every texture, material, model, sound and the sky is generated in code. Web Workers from Blob URLs are fine. GPU-side texture generation (render-to-texture with procedural shaders at startup) is encouraged.
- The voxel grid is sacred: blocks are 1 m cubes, every block is minable and placeable, chunks stream and remesh live. Realism comes from materials, lighting, detail geometry and post-processing layered on top of the grid, never from replacing it with a heightmap or a static mesh.
- Smooth: the default "High" preset holds 60 fps at 1080p with a generous render distance on a modern desktop GPU; an "Ultra" preset may go further for screenshots and the cinematic. Mesh chunks off the main thread or in time-sliced batches so streaming never stutters. Show a short loading screen while procedural materials bake.

## World
- Seeded, effectively endless terrain streamed in 16x16 chunks (tall world, deep underground): layered noise with continents, rolling hills, cliffs, eroded ridgelines, tall mountains with snow caps and scree slopes, rivers that carve valleys, lakes and oceans with beaches. Terrain shapes should read as geologically plausible: strata visible in cliff faces, talus at cliff bases, river gravel, wet sand at the waterline.
- At least 6 distinct biomes with smooth transitions (e.g. temperate broadleaf forest, birch/blossom grove, desert with dunes and layered sandstone mesas, snowy conifer taiga, swamp or jungle, ocean with reefs), each with its own blocks, foliage colour, tree species and props.
- Caves and ravines with ore veins (several ores at different depths, each with a convincing mineral look: metallic glints, crystalline facets, oxidised stains), underground lava and water pools, glowing crystals or bioluminescent fungi.
- Several tree species with believable silhouettes (trunk taper, branching, canopy shape built from leaf blocks plus detail foliage), dense tall grass, flowers, ferns, bushes, cacti, reeds, lily pads, fallen logs, rocks and pebbles.
- Many block types (aim for 40+), including transparent (glass, leaves, ice, water), emissive (lava, lamps, torches, crystals) and functional ones (crafting table, furnace, chest, door, ladder). Functional blocks get modelled detail (a furnace with a glowing mouth and soot, a chest with planks, iron bands and a hinged lid that animates, a door that swings).

## Gameplay
- First-person controller with pointer lock: walk, sprint, crouch, jump, swim, climb ladders, creative fly toggle; solid AABB collision and step-up; subtle, physically motivated head bob, camera inertia and FOV kick on sprint; landing impact.
- A realistic first-person viewmodel: hands/arm and held item (tool with wood grain handle and forged metal head, a torch with real flame, a held block) with idle sway, swing and mining animations, lit by the scene (shadows, torchlight).
- Mining with hardness, a break overlay that looks like real cracking/chipping (not pixel cracks), debris particles that are lit, shadowed, bounce and settle; dust puffs; block placement with a soft "thunk"; item drops that are small 3D objects which float, bob and get picked up.
- Hotbar (9 slots, mouse wheel / number keys), full inventory screen, chests, a crafting grid with real recipes (planks, sticks, tools of several tiers, torches, glass, lamps, doors...), furnace smelting with visible fire. Item icons are rendered from the real 3D materials.
- Survival and creative modes: health, hunger, fall, drowning and lava damage, respawn; creative has a searchable block palette.
- Full day/night cycle. Passive animals that wander, graze, flock and flee, with smooth procedural animation (legs, heads, tails) and natural-looking shading (fur/feather/scale approximations, not flat colour boxes). Original hostile night creatures with pathing that chase the player, telegraphed attacks and simple combat with knockback, hit flashes and death animations.
- Synthesized WebAudio sound with a realistic character (filtered noise, granular textures, convolution reverb that changes in caves): footsteps per material (grass, gravel, stone, sand, snow, wood, water), mining and placing, ambient wind that rises with altitude, birds by day, insects and crickets by night, rivers and surf, rain and thunder, cave drips and echoes, fire crackle.
- Title screen (a live 3D scene of the world behind it), pause menu, settings (render distance, shadow quality, FOV, mouse sensitivity, graphics preset Low/Medium/High/Ultra), a debug overlay with FPS, frame time, draw calls and coordinates, save/load of the world edits and player to localStorage. Clean, modern, original UI typography and layout.

## Graphics: ultra-realistic HDR (this is the showcase)
### Materials
- Physically based materials for every block, generated in code at startup: high-resolution procedural textures (at least 256x256 per face, 512x512 on Ultra) stored in texture arrays with full mipmaps and anisotropic filtering. Each material has albedo, normal, roughness, ambient occlusion and height channels. Linear filtering, not nearest: this is photoreal, not pixel art.
- Material work that sells realism: stone with mineral grain, fractures and lichen; soil with clods, roots and pebbles; grass-topped blocks whose top blends into the side with overhanging grass; bark with deep furrows; sand with ripples and grain sparkle; snow with sparkle and soft subsurface look; ice with internal cracks and refraction; planks with real grain and nail holes; metal ores with anisotropic glints; glass with subtle imperfections.
- Break the tiling: world-space macro variation, stochastic/hex tiling or texture bombing so no two neighbouring faces look identical; slope- and exposure-aware detail (moss on shaded north faces and cave ceilings, snow accumulating on block tops at altitude, wet darkening near water).
- Parallax occlusion mapping (with self-shadowing where it pays off) on stone, cobble, brick, bark and gravel, so flat faces show real depth at grazing angles.
- Soft bevelled block edges in the shader (edge normal rounding plus edge AO/wear) so blocks read as cut physical stone and timber, while silhouettes stay cubic.

### Vegetation
- Leaves are not opaque cubes: leaf blocks render as dense alpha-tested (alpha-to-coverage) clusters of individual leaf cards with translucency/subsurface backlighting, so the sun glows through canopies.
- Dense instanced grass blades, flowers and ferns on grass blocks with distance-based density falloff, all swaying in a shared wind field with gusts that ripple across meadows; trees sway at the canopy.

### Light and atmosphere
- Full HDR pipeline: render into half-float targets, AgX or ACES tone mapping with automatic exposure (eye adaptation: walking out of a dark cave into daylight blooms, then settles), filmic colour grading per time of day, physically scaled bloom driven by real HDR intensities (sun, lava, lamps, crystals, lightning).
- Physically based sky with Rayleigh/Mie atmospheric scattering (precomputed LUTs welcome) that changes from dawn to noon to golden hour to night; sun and moon discs with limb darkening, moonlight, stars and a faint galaxy band at night.
- Raymarched volumetric clouds (cumulus by day, storm towers when weather turns) that cast shadows on the terrain and catch sunset colours.
- Sun shadows with cascaded shadow maps (4 cascades, stable texel snapping, PCSS-style or soft PCF filtering), contact shadows for small detail; crisp up close and stable while moving.
- Ambient occlusion at every scale: per-vertex voxel AO, plus screen-space AO (GTAO/SAO quality) for detail geometry.
- Indirect light: smooth voxel light propagation for sky light and block light (caves are truly dark, torchlight falls off softly and colours walls warm), plus cheap colour bleed / bounce approximation so sunlit sand lights the underside of overhangs warm.
- Volumetric fog and light shafts that are actually shadowed (raymarched against the shadow map): god rays through forest canopies and cave openings, glowing haze in lava caves; height fog and aerial perspective so distant mountains turn blue and soft.
- Water: Gerstner/FFT-style waves on the ocean, calmer flow on rivers that follow the current, animated normals, Fresnel, screen-space reflections with sky fallback, refraction with depth-based absorption (turquoise shallows to deep blue), foam at shorelines and around obstacles, caustics on the bottom, underwater fog, colour shift, light shafts and muffled audio.
- Torches, lava, furnaces and lamps flicker with dynamic shadowless point lights (with a budget and culling); lava has a convincing crust that glows through cracks.
- Weather: rain with streaks, splashes, puddles and wet glossy darkened surfaces with reflections (wetness raises specular, lowers roughness) in some biomes; snow with accumulation in cold ones; thunderstorms with forked lightning that lights the whole world and the clouds from inside.
- Clean anti-aliasing (TAA with good history rejection, or SMAA plus supersampling on Ultra), no shimmering on edges, foliage or specular highlights. Sharpening after TAA.
- Camera realism used with taste: subtle lens flare from the sun, physically based depth of field and motion blur, chromatic aberration, vignette and film grain only in the cinematic.

## Cinematic mode and video
- `blockworld.html?demo=1` runs a scripted cinematic flythrough of a fixed seed on the Ultra preset and exposes `window.renderAt(t)` (t in seconds) that poses camera, sun, clouds, weather, water, wind, foliage, creatures and particles for time t and renders exactly one frame, with no dependence on wall-clock time; re-rendering a frame gives the identical image. TAA/temporal effects must converge deterministically (e.g. render a fixed number of jittered sub-frames per output frame).
- The film is 30.0 s: sunrise over mountains and ocean with volumetric clouds, a low glide across a forest meadow with grass waving and light shafts through the canopy, dive into a cave lit by lava and crystals with the exposure adapting, out over a desert at golden hour, a thunderstorm rolling in with lightning and rain-soaked reflective ground, ending on a night sky over a torch-lit village or build. Slow, confident camera moves with easing, no clipping.
- `blockworld.mp4`: 1920x1080, 60 fps, exactly 30.0 s (1800 frames), H.264 High, yuv420p, CRF 18 or lower, `-movflags +faststart`, no audio, no text or UI in frame. Capture deterministically frame by frame through `renderAt` with a locally installed `playwright-core` or `puppeteer-core` driving the machine's Chrome or Edge, piped into ffmpeg; never screen-record in real time. Make sure WebGL runs on the real GPU (`WEBGL_debug_renderer_info` must not report SwiftShader), e.g. `--use-angle=d3d11 --enable-gpu --ignore-gpu-blocklist` on Windows, or run headed. Render supersampled (e.g. 2x) and downscale. Verify with ffprobe.
- `stills/`: 4-6 PNG frames from the film plus 2 gameplay screenshots with the HUD.
- `NOTES.md`: what you built, controls, key rendering techniques, the exact render command, how long it took.

## Quality bar
Play the game yourself through the browser (move, mine, build, craft, survive a night) and fix every bug you find. Look at your renders (open the PNGs with your image-reading tool) again and again and critique them harshly, like a lead graphics engineer at a AAA studio judging photorealism: does this look like a photograph? Hunt for anything that betrays "game": flat or plastic-looking materials, obvious texture tiling, banding, shadow acne, peter-panning, light leaks into caves, chunk seams, z-fighting on water, shimmering or aliasing, flat lighting, blown-out or crushed highlights, over-saturated colours, fog that looks like a wall, foliage that looks like cardboard. Fix and re-render. Before calling it done, extract and review frames from the finished MP4 (start, every ~3 s, end).

Do not cut scope or settle for a quick version: this is a flagship showcase. If something has to be simplified for performance, keep it on Ultra and scale it down only in lower presets.

## Final reply
Absolute paths to `blockworld.html` and `blockworld.mp4`, the ffprobe stats (resolution, fps, frame count, duration, file size), the controls, the total build time, and a 3-5 line summary of what makes it look realistic.
```

## 생성 결과

### Sonnet 5.6 (next): ASHLAR

요청한 모델: claude-sonnet-5-5. 하네스: Claude Code (via T3 Code). 추론 강도: xhigh. 제작 시간: 252분. GPU: NVIDIA GeForce RTX 3090. 렌더러: three.js 0.180.0. 영상: 1920x1080, 30 s.

영상: https://subclipweb.subclip.app/agent-skills/community/examples/ultra-realistic-blockworld/sonnet-5.6-next.mp4?v=3

Claude Code(T3 Code 경유)에서 약 252분 동안 만들었고, 실수로 인한 중단과 연결 오류 두 번으로 약 35분이 멈춰 있었습니다(Rez는 Sonnet 5.6 (next)로 표기, RTX 3090에서 claude-sonnet-5-5를 xhigh 강도로 요청). 텍스처는 Web Worker에서 헥스 타일링, 시차 효과, 모서리 인식 베벨을 적용해 밉맵 텍스처 배열로 합성하고, 청크는 메인 스레드 밖에서 복셀 앰비언트 오클루전과 컬러 블록 조명을 넣어 메시로 만듭니다. 프레임은 그림자 캐스케이드 4단계, GTAO, 레이마칭 구름과 안개, 스크린 스페이스 반사, TAA, 자동 노출, AgX 톤 매핑을 갖춘 디퍼드 HDR 파이프라인입니다. 영상은 고정 시드 위에 카메라용 세트피스를 더해 연출했고, 프레임마다 서브프레임 8개를 평균합니다. 스크립트 플레이 테스트는 제작, 건축, 저장, 적대 생물 18마리가 나오는 밤 전체를 다뤘습니다. 스스로 밝힌 약점: 사람이 직접 플레이해 본 적이 없고, 오디오를 들어 본 사람도 없으며, 0번 프레임이 거의 검고, 먼 절벽이 계단처럼 보이며, 스트리밍이 여전히 끊깁니다.

원본 파일: https://github.com/RezAIT00/agent-demos/tree/main/prompts/ultra-realistic-blockworld/generations/sonnet-5.6-next. Subclip 사본: https://github.com/subclip-app/agent-demos/tree/main/prompts/ultra-realistic-blockworld/generations/sonnet-5.6-next

## Subclip에서 만들기

1. **게임과 영상 분리.** Subclip은 영상 편집기이므로 프롬프트의 시네마틱 부분만 가져오세요. 플레이하고 싶다면 게임은 별도 페이지로 두고, 스크립트로 짠 플라이스루를 1920x1080, 60fps Subclip 프로젝트로 가져와 편집하고 타이틀과 음악을 입히세요.
2. **레이어에서 렌더러 테스트.** 렌더러에 대해서는 솔직히 말씀드립니다: Subclip 레이어 렌더러와 내보내기 경로에서 WebGPU와 무거운 WebGL2 지원은 아직 검증되지 않았습니다. 먼저 5초짜리 테스트 레이어를 만들어 미리보기와 내보낸 MP4에서 확인하고, 둘 중 하나라도 빈 화면이 나오거나 느리면 쓸 Canvas2D나 일반 WebGL 대안을 준비해 두세요. 이 작품은 TAA, 캐스케이드 그림자, 레이마칭 구름이 들어간 디퍼드 half-float 파이프라인을 써서 가장 무거운 종류의 WebGL2 장면입니다. 레이어가 감당하지 못하면 시네마틱을 Subclip 밖에서 렌더링하고 MP4를 미디어로 가져오세요.
3. **영상은 결정적으로 유지.** 런타임 레이어(`add_runtime_layer`, `validate_runtime_layer_source`로 확인)로 돌아간다면 프롬프트의 규칙은 그대로입니다: 각 프레임은 시간만으로 포즈가 정해지고, 시간축 효과는 정해진 수의 서브프레임으로 수렴시킵니다. 레이어 규칙은 [HyperFrames 모션 레이어](https://www.subclip.app/ko/agent-skills/community/hyperframes-motion-layers)와 [three.js 3D 장면](https://www.subclip.app/ko/agent-skills/community/threejs-3d-scenes) 스킬에서 설명합니다.
4. **타임라인에서 사운드와 타이틀 추가.** 프롬프트는 무음 시네마틱을 요구합니다. Subclip에서는 `search_public_audio`로 찾은 바람, 새, 천둥, 비 소리를 오디오 아이템으로 넣고, 여섯 개의 샷에 맞춰 자르고, 게임 이름을 타이틀 레이어에 올릴 수 있습니다.
5. **검토와 내보내기.** 구간 하나가 끝날 때마다 에이전트에게 `get_timeline_contact_sheet`를 요청하고, 중요한 순간(첫 프레임, 큰 변환마다, 마지막 프레임)은 `view_frame`으로 보게 하세요. 스틸만으로는 움직임 문제가 보이지 않으니 승인 전에 꼭 미리보기에서 재생해 보세요. 첫 프레임을 주의하세요: 원본에서는 거의 검은 화면이니 포스터 프레임은 직접 고르세요. `export_video`로 내보내세요.

## 관련 커뮤니티 스킬

- https://www.subclip.app/ko/agent-skills/community/threejs-3d-scenes
- https://www.subclip.app/ko/agent-skills/community/hyperframes-motion-layers
- https://www.subclip.app/ko/agent-skills/community/blender-to-subclip

## 출처와 크레딧

프롬프트와 생성 결과: **Rez** ([@RezAIT00](https://x.com/RezAIT00)), 출처 [github.com/RezAIT00/agent-demos](https://github.com/RezAIT00/agent-demos). Subclip이 보관한 저장소 사본: [github.com/subclip-app/agent-demos](https://github.com/subclip-app/agent-demos).

원본 프롬프트 폴더: https://github.com/RezAIT00/agent-demos/tree/main/prompts/ultra-realistic-blockworld. Subclip 사본: https://github.com/subclip-app/agent-demos/tree/main/prompts/ultra-realistic-blockworld

[모든 예제](https://www.subclip.app/ko/agent-skills/community/examples)