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 · 未声明许可