ai21.net
語言

孤島驚魂3克隆遊戲(優化版)

示範影片

孤島驚魂3克隆遊戲(優化版) — 1

提示詞

CLOSING THE GAP TO THE REFERENCE (Stages 6–11)

Stages 1–5 are done: the world, controller, outpost, water, sky, vegetation, hands, weapons, inventory, weather, time of day, audio and menus all work, and the layout already matches the reference. What's missing is image quality. Right now the frame looks like clean low-poly under a milky haze. The reference looks like a saturated, high-contrast, gritty, lived-in photograph. Stages 6–11 close that gap.

Global rules for Stages 6–11:
- Every new effect sits behind a quality flag. Low must stay fast.
- Don't break earlier stages: time of day, weather, rain, wetness and lightning must all still combine correctly. At the end of each stage, check Noon/Clear and Sunset/Storm once.
- Keep existing APIs compatible: getWaterHeight(x,z), addRipple(x,z,strength), setSkyState({...}), shared globals (wind, wetness, rain, time) and the effects event bus.
- Rebuild the standalone bundle after every change and do one console-error check. No test loops.
- Run each stage in a fresh session. Do only that stage.

────────────────────────
STAGE 6 — Light, atmosphere, color grading, dappled shadows (reasoning: High)
Goal: remove the milky haze and get a punchy tropical-noon frame with lace-like leaf shadows. This stage is the cheapest and has the biggest impact.

1. Haze/fog: cut daytime fog density and height sharply. Fog only lies low at the foot of the mountains and far out over the water. Aerial perspective is blue (#9cc3dc → #cfe6f5), never white. Mountains read in 3 depth layers, with more blue on each layer further back.
2. Sky: zenith ~#4f9fe0 fading to a #cfe6f5 horizon. Cumulus clouds get crisp, sunlit white tops, blue-grey undersides and a silver lining near the sun. Denser clouds, less smeared vapor.
3. Sun and ambient: stronger sun; darker, cooler ambient/hemisphere light so shadows go deep (shadowed areas at ~15–20% of lit brightness); warm bounce light from the sand.
4. Grading: an S-curve for contrast, saturation ~×1.25, slightly lower exposure, warm highlights and cool turquoise shadows. Add a contrast-adaptive sharpening pass after FXAA. Raise the bloom threshold so it never washes the frame out. God rays only through foliage, not across the whole screen. Make sure eye adaptation doesn't brighten the image back up.
5. Dappled shadows: add 1–2 palms over the shelter, with one trunk and its fronds framing the top-left of the starting view like the reference. Leaves cast alpha-tested shadows (custom depth/distance materials using the leaf mask). Also add an animated light cookie that projects leaf dapples inside the shelter and sways with the wind. Tighten the shadow frustum/cascade near the player so shadows on the table stay crisp.
6. Ambient occlusion: stronger SSAO where surfaces meet (table/deck, crates, legs, props on the table), plus small contact-shadow decals under objects.
7. First-person hands: warmer skin, a bit more fill light from the sand, and scale/position closer to the reference (large, low in frame).
Acceptance: the starting frame next to the reference has comparable contrast and saturation, a deep blue sky, and visible leaf dapples on the deck and table.

────────────────────────
STAGE 7 — FLAGSHIP WATER (reasoning: Max)
Goal: water is the star of the game, at modern AAA quality — something you'd watch for minutes. Rewrite the water module in depth, not as patches, while keeping the CPU height query (getWaterHeight) exactly in sync with the GPU surface.

7.1 Wave model
- Large swell: 6–8 Gerstner harmonics using the correct deep-water dispersion relation. The CPU height query evaluates the same harmonics (iterative inverse displacement).
- Fine surface: GPU FFT ocean spectrum (Phillips/JONSWAP) with ping-pong render targets, 128²–256², in 2–3 cascades at different scales. Output displacement, normals and a Jacobian map for foam. Low quality: 1 cascade at 64² or baked tileable normals.
- No visible tiling: non-multiple cascade sizes plus rotation. In the distance, filter normals (Toksvig/LEAN-style) instead of letting them shimmer.
- Shallow water: waves shoal (grow steeper and shorter as depth drops) and refract toward the shore along the seabed gradient. Inside the lagoon it's calm and almost mirror-like; beyond the reef it's livelier.

7.2 Optics
- Per-channel RGB Beer–Lambert absorption over the real underwater ray length (from the scene depth buffer), plus in-scattering (#1fb0b8 / #16739e). Result: 0–0.5 m of water is nearly colorless, 1–3 m is vivid turquoise (#46d6c8), 6 m and deeper is deep blue, with a sharp turquoise-to-blue edge at the reef drop-off like the reference.
- Screen-space refraction offset by the normal and scaled by depth. Use a depth test so objects above the surface don't leak into the refraction. Add subtle chromatic dispersion.
- Reflections: screen-space reflections (High) with a sky/PMREM fallback, plus a half-resolution planar reflection over the near lagoon (High) so the pier, boat and palms reflect properly. Schlick Fresnel with F0 = 0.02: clear up close, mirror-like at grazing angles.
- Sun: a tight GGX highlight plus stochastic micro-facet glitter sparkling on wave crests. A proper sun glitter path at sunset, a moon path at night.
- Subsurface scattering: backlit wave crests glow turquoise.
- The sky and clouds in reflections come from the same sky function, and clouds move in the reflection too.

7.3 Seabed, caustics, reef
- Animated caustics (layered Voronoi or a baked caustic texture with perspective warp), RGB chromatic split, intensity by depth. Project them onto everything underwater: sand, rocks, pier piles, boat hull, the player's legs. Caustics fade in shadow (sample the shadow map).
- Reef: 40–80 instanced coral/rock clusters on the lagoon floor (the dark patches in the reference), swaying seagrass, sand ripples on the bottom (normal map), scattered shells. The seabed gets its own darker wet material.
- Underwater light shafts when looking up from below the surface.

7.4 Shore and foam
- Swash: a thin sheet of water runs up the sand and drains back. It leaves a dark wet band that dries with a delay, and a bubbly foam line rides on its leading edge.
- Foam: a real procedural bubble/foam texture, not raw noise. It spawns on crests (from the FFT Jacobian), along the shoreline, and around rocks, piles and the boat (from depth difference). It persists and decays over time (an accumulation buffer on High).
- Rings of foam and small ripples around piles and rocks standing in the water.

7.5 Interactivity
- addRipple feeds a real height-field wave simulation: a 256² ping-pong grid centered on the player that scrolls with them. Stone splashes, bullet impacts, raindrops and the player's footsteps in water create rings that reflect and interfere physically.
- Wake/Kelvin-style bow waves from the player wading.
- Buoyancy: the boat, fallen crates, shells and stones bob using the height query plus the surface normal. The boat tugs at its mooring lines. Fix the boat: hull above the waterline, clearly visible next to the pier in the starting frame.
- Underwater mode (camera below the surface): water-colored underwater fog, distortion, caustic light shafts, muffled audio (emit an 'underwater' event for the audio system), and a correct half-in/half-out waterline split across the screen.

7.6 Weather and time hooks
- Expose every new parameter through water.setParams({...}), driven by the weather/time compositor: wind drives the spectrum (flat calm when clear → whitecaps in a storm), rain adds droplet rings to the height field plus surface roughness, night gives a moon path, sunset a golden path.

7.7 Performance
- High: FFT with 2 cascades at 256², planar reflection + SSR, height field at 256². Low: 1 cascade at 64² (or baked normals), no planar reflection/SSR, height field at 128². Target: water under ~4 ms per frame on a mid-range GPU at High.
Acceptance: the starting frame shows crystal-clear turquoise shallows with a visible reef and caustics, a crisp drop-off into deep blue, a living swash line on the beach, and the pier and boat reflected. A thrown stone produces physically believable interfering rings.

────────────────────────
STAGE 8 — Terrain: karst mountains, rocks, beach, jungle (reasoning: High)
1. Karst mountains: ridged-multifractal displacement on top of the current shapes, sheer vertical walls, ledges and erosion gullies. A slope-based shader: steep areas are grey limestone with vertical streaks; ledges and gentle slopes are green canopy (a crown-shaped noise with occlusion between crowns). Thousands of cheap instanced canopy billboards on the slopes (one draw call). The sea arch and rock islet use the same materials.
2. Boulders: noise-deformed rocks with sharp ridged facets, grouped in clusters of 3–7, half-buried in sand or water, moss on top, and a dark wet band at the waterline. Triplanar texturing.
3. Jungle: broadleaf trees with clumped card-based crowns; palms of different ages and leans; dense undergrowth on the right-hand slope (ferns, bushes, banana/monstera) at 3–4× the current density with LODs; vines between trees; grass along the beach edge. No more "lawn": dark soil and leaf litter under the trees.
4. Beach: wind ripples (normal map), a wet band synced with the Stage 7 swash, pebbles, driftwood, fallen palm fronds, coconuts; a gradual transition from sand to soil to jungle, with grass.
5. Move the hut and the watchtower 20–30% closer into the starting frame if it doesn't break collisions or paths.

────────────────────────
STAGE 9 — Next-level procedural materials (reasoning: High)
All generators produce albedo/normal/roughness(/AO) maps at 1024² (512² on Low), cached.
1. Old weathered wood: stretched-noise grain, knots, cracks, a different tone and UV offset per plank, dark seams, grime in the corners, sun bleaching, worn light edges (from curvature). No striped "zebra" look. Used for the deck, table, pier, crates and posts.
2. Metal: paint → chipping → rust, driven by curvature/noise masks, plus rust streaks and scratches (barrel, ammo can, lantern). The mug gets chipped enamel.
3. Fabric: canvas with visible weave, stains and faded folds. Flags in faded rust-brown (#a8352a → rust), with torn alpha edges and a dirty skull.
4. Leopard pelt: correct rosette pattern plus fur shells (4–6 layers, High only) or a dense normal map, with a jagged hide edge.
5. Rope: twisted-fiber normals, thicker, frayed ends.
6. Rock and sand: triplanar mapping, moss by normal direction; grainy sand with tiny crystal glints in the sun.
If hand-made tileable PBR texture sets exist locally, use them instead of the matching generator (and embed them in the standalone bundle).

────────────────────────
STAGE 10 — Foreground props + custom models (reasoning: Medium)
1. Load any local .glb models from the models folder through the existing loader, keeping the procedural fallback. For each model: real-world scale in meters, grounding on its surface, colliders, shadows, wetness injection, and the Stage 3 interactions (inspecting the lantern/mug/map; the crate lid opens if the model has a separate lid part, otherwise keep the procedural lid).
2. Table: make the props larger and lay them out like the reference — the AK diagonally across the whole table, the knife on the front edge, the map under the knife, the mug, the ammo can, the lantern on the right, the bottle.
3. Left side: the cot (tube frame, sagging canvas, a plump pillow), the pelt hanging over its edge, a backpack and a crate next to the cot, a rusty barrel.
4. A torn flag hanging from the canopy at the top right, like the reference; rope lashings on the posts.
5. The boat moored at the pier (buoyancy from Stage 7), a crate on the pier, mooring ropes to the piles.
6. Hut and watchtower: corrugated tin roof, canvas awning, barrels, crates.

────────────────────────
STAGE 11 — Performance + final match against the reference (reasoning: Medium)
1. An FPS/frame-time overlay (F3) with a per-pass breakdown. Budget: ≥60 FPS on High on a mid-range discrete GPU, ≥30 FPS on Low on a modern iGPU.
2. Optimize: instancing, LODs, distance culling, half-resolution for the expensive passes, cached and compressed textures, proper disposal.
3. Take one screenshot from the starting view next to the reference and do a final palette tune. Check every time-of-day × weather combination.
4. Rebuild the bundle, do one console check, update the status log.

中文翻譯

縮小與參考圖的差距(階段 6–11)

階段 1–5 已完成:世界、控制器、前哨、水面、天空、植被、雙手、武器、物品欄、天氣、時間、音頻和菜單都能正常工作,佈局也已經與參考圖一致。缺的是畫面質量。現在這一幀看起來像乳白薄霧下的乾淨低多邊形。參考圖看起來像一張飽和、高對比、粗糲、有生活痕跡的照片。階段 6–11 用來縮小這一差距。

階段 6–11 的全局規則:
- 每個新效果都放在質量開關之後。Low 必須保持快速。
- 不要破壞更早的階段:時間、天氣、雨、溼潤度和閃電都必須仍能正確組合。每個階段結束時,檢查一次正午/晴朗與日落/風暴。
- 保持現有 API 兼容:getWaterHeight(x,z)、addRipple(x,z,strength)、setSkyState({...})、共享全局變量(wind、wetness、rain、time)以及效果事件總線。
- 每次改動後重新構建獨立包,並做一次控制臺錯誤檢查。不要測試循環。
- 每個階段都在全新會話中運行。只做該階段。

────────────────────────
階段 6 — 光照、大氣、調色、斑駁陰影(推理:High)
目標:去掉乳白薄霧,得到一幀有力度的熱帶正午畫面,帶蕾絲般的樹葉陰影。這個階段成本最低、影響最大。

1. 霧/霾:大幅削減白天的霧密度和霧高度。霧只低伏在山腳和遠處水面上方。空氣透視是藍色(#9cc3dc → #cfe6f5),絕不是白色。山體呈現爲 3 個深度層,越靠後的層藍色越多。
2. 天空:天頂約 #4f9fe0,漸變到 #cfe6f5 的地平線。積雲要有清晰的、被陽光照亮的白色頂部、藍灰色底部和靠近太陽處的銀邊。雲更濃密,更少塗抹狀的霧氣。
3. 太陽與環境光:更強的太陽;更暗、更冷的環境光/半球光,讓陰影更深(陰影區域約爲受光亮度的 15–20%);來自沙灘的暖色反彈光。
4. 調色:用 S 曲線提升對比度,飽和度約 ×1.25,曝光略低,暖色高光和冷青色陰影。在 FXAA 之後加一道對比度自適應銳化。提高泛光閾值,讓它永遠不會把畫面洗白。耶穌光只穿過植被,不橫貫整個屏幕。確保眼睛自適應不會把畫面重新提亮。
5. 斑駁陰影:在棚屋上方加 1–2 棵棕櫚,一根樹幹及其葉片像參考圖那樣框住起始視角的左上方。樹葉投射 alpha 測試陰影(使用葉片遮罩的自定義深度/距離材質)。再加一個動態光照 cookie,在棚屋內投射樹葉光斑並隨風擺動。收緊玩家附近的陰影視錐/級聯,讓桌上的陰影保持清晰。
6. 環境光遮蔽:在表面交接處加強 SSAO(桌子/甲板、木箱、桌腿、桌上的道具),並在物體下方加小的接觸陰影貼花。
7. 第一人稱雙手:膚色更暖,來自沙灘的補光稍多一點,縮放/位置更接近參考圖(大,位於畫面下方)。
驗收:把起始幀與參考圖並排,對比度和飽和度相當,天空深藍,甲板和桌上有可見的樹葉光斑。

────────────────────────
階段 7 — 旗艦級水面(推理:Max)
目標:水面是遊戲的主角,達到現代 AAA 品質——那種你會盯着看上好幾分鐘的水。深度重寫水面模塊,而不是打補丁,同時讓 CPU 高度查詢(getWaterHeight)與 GPU 表面完全同步。

7.1 波浪模型
- 大湧浪:使用正確的深水色散關係的 6–8 個 Gerstner 諧波。CPU 高度查詢求值同樣的諧波(迭代反向位移)。
- 精細水面:GPU FFT 海洋頻譜(Phillips/JONSWAP),配合乒乓渲染目標,128²–256²,以 2–3 個不同尺度的級聯。輸出位移、法線和用於泡沫的 Jacobian 圖。低畫質:64² 的 1 個級聯,或烘焙的可平鋪法線。
- 無可察覺的平鋪:級聯尺寸互不爲倍數,再加旋轉。遠處對法線做過濾(Toksvig/LEAN 風格),而不是讓它們閃爍。
- 淺水:波浪變淺(隨深度下降變得更陡、更短),並沿海牀梯度向岸邊折射。潟湖內平靜、幾乎如鏡;礁石之外更有活力。

7.2 光學
- 逐通道 RGB Beer–Lambert 吸收,按真實水下光線長度(來自場景深度緩衝)計算,再加內散射(#1fb0b8 / #16739e)。結果:0–0.5 米水深幾乎無色,1–3 米是鮮豔的綠松石色(#46d6c8),6 米及更深是深藍,並在礁石落差處有像參考圖那樣銳利的綠松石色到藍色分界。
- 屏幕空間折射,按法線偏移並按深度縮放。使用深度測試,使水面以上的物體不會滲入折射。加入細微的色散。
- 反射:屏幕空間反射(High),帶天空/PMREM 回退,再加近處潟湖上方的半分辨率平面反射(High),讓碼頭、船和棕櫚正確映出。Schlick 菲涅爾,F0 = 0.02:近處清澈,掠射角如鏡。
- 太陽:緊緻的 GGX 高光,加上在波峯上閃爍的隨機微表面粼光。日落時有一條恰當的太陽粼光帶,夜晚有一條月光帶。
- 次表面散射:逆光的波峯泛出綠松石色光暈。
- 反射中的天空和雲來自同一個天空函數,雲在反射中也會移動。

7.3 海牀、焦散、礁石
- 動態焦散(分層 Voronoi 或帶透視扭曲的烘焙焦散貼圖),RGB 色散分離,強度隨深度變化。將它們投射到水下的一切:沙地、巖石、碼頭樁、船體、玩家的腿。焦散在陰影中淡出(採樣陰影貼圖)。
- 礁石:潟湖底部 40–80 個實例化的珊瑚/巖石簇(參考圖中的深色斑塊),搖曳的海草,底部的沙紋(法線貼圖),散落的貝殼。海牀使用自己更深的溼潤材質。
- 從水面下向上看時的水下光束。

7.4 岸邊與泡沫
- 沖流:一層薄水衝上沙灘再退回去。它留下一條深色溼痕,延遲一段時間才變幹,泡沫線隨着它的前緣推進。
- 泡沫:真正的程序化氣泡/泡沫紋理,而不是原始噪波。它從波峯(來自 FFT Jacobian)、沿岸線,以及巖石、樁和船周圍(來自深度差)生成。它會持續存在並隨時間衰減(High 下用累積緩衝)。
- 立在水中的樁和巖石周圍有泡沫環和小漣漪。

7.5 交互性
- addRipple 饋入真實的高度場波浪模擬:一個以玩家爲中心、隨玩家滾動移動的 256² 乒乓網格。石頭濺落、子彈命中、雨滴和玩家在水中的腳步會產生物理上正確反射與幹涉的環。
- 玩家涉水時產生尾跡/開爾文式船首波。
- 浮力:船、掉落的木箱、貝殼和石頭使用高度查詢加表面法線來上下浮動。船會拽動繫泊繩。修好船:船體位於水線以上,在起始幀中在碼頭旁清晰可見。
- 水下模式(相機位於水面以下):水色水下霧、扭曲、焦散光束、悶響的音頻(爲音頻系統發出 'underwater' 事件),以及正確的半入水/半出水水線屏幕分割。

7.6 天氣與時間掛鉤
- 通過 water.setParams({...}) 暴露每個新參數,由天氣/時間合成器驅動:風驅動頻譜(晴朗時風平浪靜 → 暴風雨時白浪),雨向高度場添加雨滴環並增加表面粗糙度,夜晚給出月光帶,日落給出金色光帶。

7.7 性能
- High:FFT 使用 256² 的 2 個級聯,平面反射 + SSR,高度場 256²。Low:64² 的 1 個級聯(或烘焙法線),無平面反射/SSR,高度場 128²。目標:High 下中端 GPU 上水面每幀低於約 4 ms。
驗收:起始幀顯示清澈見底的綠松石色淺灘,可見礁石和焦散,一道清晰的向深藍的落差,沙灘上一條流動的沖流線,以及碼頭和船的倒影。投出的石頭會產生物理上可信的幹涉環。

────────────────────────
階段 8 — 地形:喀斯特山體、巖石、沙灘、叢林(推理:High)
1. 喀斯特山體:在現有形狀之上疊加脊狀多重分形位移,陡直的垂直崖壁、巖架和侵蝕溝壑。基於坡度的着色器:陡峭區域是帶垂直條紋的灰色石灰巖;巖架和緩坡是綠色樹冠(一種冠形噪波,冠與冠之間有遮蔽)。山坡上有數千個廉價的實例化樹冠公告板(一次繪製調用)。海蝕拱和巖石小島使用相同材質。
2. 巨石:經噪波變形的巖石,帶銳利的脊狀切面,以 3–7 個成簇分組,半埋在沙或水中,頂部有苔蘚,水線處有一圈深色溼痕。三平面貼圖。
3. 叢林:闊葉樹,樹冠是成簇的卡片式樹冠;不同年齡和傾斜度的棕櫚;右側山坡上茂密的林下植被(蕨類、灌木、香蕉/龜背竹),密度爲當前的 3–4 倍並帶 LOD;樹與樹之間的藤蔓;海灘邊緣的草。不再有“草坪”:樹下是深色土壤和落葉。
4. 海灘:風紋(法線貼圖)、與階段 7 沖流同步的溼痕、卵石、浮木、掉落的棕櫚葉、椰子;從沙到土壤到叢林的漸變過渡,帶草。
5. 如果不會破壞碰撞或路徑,把棚屋和瞭望塔向起始幀內移近 20–30%。

────────────────────────
階段 9 — 下一層級的程序化材質(推理:High)
所有生成器都產出 1024² 的 albedo/normal/roughness(/AO) 貼圖(Low 下爲 512²),並緩存。
1. 老舊風化的木頭:拉伸噪波木紋、節疤、裂縫,每塊木板有不同的色調和 UV 偏移,深色接縫,角落污垢,日曬褪色,磨損的淺色邊緣(來自曲率)。不要條紋狀“斑馬”外觀。用於甲板、桌子、碼頭、木箱和立柱。
2. 金屬:漆面 → 掉漆 → 鏽蝕,由曲率/噪波遮罩驅動,另有鏽跡流痕和劃痕(油桶、彈藥箱、提燈)。杯子使用磕碰掉瓷的搪瓷。
3. 織物:可見織紋的帆布,有污漬和褪色的褶皺。旗幟爲褪色的鏽棕色(#a8352a → 鏽色),帶撕裂的 alpha 邊緣和一個髒污的骷髏。
4. 豹皮:正確的玫瑰斑圖案,加上毛皮殼層(4–6 層,僅 High)或高密度法線貼圖,邊緣呈鋸齒狀的皮邊。
5. 繩索:扭曲纖維法線,更粗,末端磨損。
6. 巖石和沙子:三平面映射,按法線方向生長苔蘚;顆粒感沙子,在陽光下有細小的晶體閃光。
如果本地存在手工製作的可平鋪 PBR 貼圖集,就用它們替代對應的生成器(並把它們嵌入獨立包)。

────────────────────────
階段 10 — 前景道具 + 自定義模型(推理:Medium)
1. 通過現有加載器從 models 文件夾加載任意本地 .glb 模型,保留程序化回退。對每個模型:以米爲單位的真實世界縮放、貼地放置、碰撞體、陰影、溼度注入,以及階段 3 的交互(查看提燈/杯子/地圖;如果模型有獨立蓋子部件,木箱蓋可以打開,否則保留程序化蓋子)。
2. 桌子:把道具做得更大,並按參考圖擺放——AK 斜跨整張桌子,刀放在前緣,地圖在刀下面,杯子、彈藥箱,提燈在右側,還有瓶子。
3. 左側:行軍牀(管狀框架、下陷的帆布、一個飽滿的枕頭),豹皮搭在牀沿,牀邊一個背包和一個木箱,一個生鏽的油桶。
4. 右上角從頂棚垂下的一面破旗,如參考圖;立柱上有繩索綁紮。
5. 停泊在碼頭的船(浮力來自階段 7),碼頭上的一個木箱,繫到樁上的纜繩。
6. 棚屋和瞭望塔:波紋鐵皮屋頂、帆布遮陽篷、油桶、木箱。

────────────────────────
階段 11 — 性能 + 與參考圖最終對齊(推理:Medium)
1. 一個 FPS/幀時間疊加層(F3),帶逐通道分解。預算:High 下中端獨立 GPU 上 ≥60 FPS,Low 下現代核顯上 ≥30 FPS。
2. 優化:實例化、LOD、距離剔除、昂貴通道使用半分辨率、緩存並壓縮貼圖、正確釋放。
3. 從起始視角截一張圖與參考圖並排,做最後的色板微調。檢查每一種時間 × 天氣組合。
4. 重新構建包,做一次控制臺檢查,更新狀態日誌。

溯源

原作者
maxt3chno
發佈日期
2026-09-26(由推文 ID 反解)
原始出處
查看原帖 ↗
收錄來源
zhuyansen/awesome-opus-5.5-video · 2103960867327115462 · 未聲明授權