Environment lighting: - ship all eight desktop studiolights/world datasets (WBENV1 float32) and a shared loader used by both the main viewport and the offscreen worker - add the N-panel "studio 环境" selector - rotate the world background together with the environment (backgroundRotation/backgroundIntensity), so camera view and offscreen renders match the desktop Mapping-node behaviour Verification (Chromium, OPFS, NOT_CLAIMED): - environment lighting + 8 world pixel identity - camera-view rotation correspondence (camera matrices, 207 samples) - offscreen vs on-screen background parity after hiding geometry (1305 samples) - metals case extended with material-field OPFS roundtrip - material Principled edits and rename undo/redo - eight studio worlds: pairwise frame differences + luminance rank correlation - undo history depth capped at 64 steps and undo across OPFS save/reopen Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
37 lines
3.6 KiB
Markdown
37 lines
3.6 KiB
Markdown
# WEB-MATERIAL-METALS-20261122 status
|
||
|
||
- case: `WEB-MATERIAL-METALS-20261122`(猴头四金属材质:金/银/铜/铁)
|
||
- 类型:用户案例补缺(材质 Principled BSDF 参数调整);不是队列任务,未改动 `docs/EXECUTION_QUEUE.md` 与 `nextTask`
|
||
- 改动文件(当前哈希):
|
||
- `web/app/src/app/App.tsx`(`d4a92fcd…649f32d`)
|
||
- `web/app/src/three-adapter/pbr.ts`(`a13d7b07…d197c0c1`)
|
||
- `web/protocol/web-engine.ts`(`2624057e…8d46183`)
|
||
- `web/app/src/workers/web-engine.worker.ts`(`007eea14…759efda`)
|
||
- `web/app/src/three-adapter/viewport.ts`(`f876c479…17a43f0`)
|
||
- `web/app/src/three-adapter/studio-environment.ts`(`f2e4014f…09c1b7a4`,共享 studio 世界加载器)
|
||
- `web/app/src/workers/viewport-render.worker.ts`(`c5955b75…146952c5`)
|
||
- `web/app/src/three-adapter/texture-assets.ts`(`96b1fe34…0ac74b73e3`)
|
||
- `web/app/src/three-adapter/studio-light.ts`(`3f92b48c…c2e51e`)
|
||
- 已修缺口:
|
||
1. Base Color 的 sRGB↔线性转换(写入与回填两端),与桌面取色器语义一致;
|
||
2. 材质名称输入(复用 `renameId`,原生 material 分支);
|
||
3. 新增槽成功后自动激活新槽,Principled 控件立即可见;
|
||
4. `invokeNativeOperator` 使用最新 revision,并在 `OPERATOR_CONTEXT_STALE` 时重试一次;
|
||
5. 世界环境贴图入口(`setWorldProperties.environmentImageId`:原生建 Environment Texture → Background Color 链,worker 白名单同步);
|
||
6. Material Preview 缺少环境光导致金属发黑:MATERIAL 且未勾选「场景世界」时挂载 studio 环境(PMREM),Rendered / 场景世界改用世界环境;`setTextureAssets` 不再用世界颜色覆盖视口环境;
|
||
7. studio 环境替换为桌面 `forest.exr` 的逐像素 float32 数据(`web/app/public/lights/forest.bin` + manifest,生成器 `tools/web/import-studiolight-world.py`),渐变只作加载前回退。
|
||
- Chromium 实走(`web/tests/e2e/wbv2-material-metals-production.spec.ts`,fixture `tests/files/web/basic_scene.blend`):
|
||
- 结果:`1 passed (31.6s)`,snapshot revision 21,MESH 中 4 个 Suzanne;
|
||
- 读回数值:Gold (1, 0.68, 0, m1 r0.2)、Silver (0.847, m1 r0.15)、Copper (0.479, 0.171, 0.033, m1 r0.3)、Iron (0.254, m1 r0.5);
|
||
- `data-preview-environment = studio-exr`(桌面 `forest.exr`,像素哈希 `d38926cd…dfc730d`),材质预览由 studio 环境照明;
|
||
- 证据:`tests/golden/WEB-MATERIAL-METALS-20261122/metals-production.json`、`metals-four-suzanne.png`、`implementation.json`。
|
||
- 2026-11-22 增补:8 个 studio 环境可选;材质字段 OPFS 往返已覆盖(`OPFS Gold`,名称/基础色/金属度/粗糙度重开一致,见 `WEB-OPFS-SAVE-REOPEN-20261122`);四条用例合并运行 `4 passed (1.5m)`,`npm run typecheck` exit 0。
|
||
- 2026-11-22 增补:材质 Principled 编辑与重命名的 undo/redo 已覆盖(见 `WEB-MATERIAL-UNDO-REDO-20261122`);8 个 studio 世界的光照对照已覆盖(见 `WEB-ENVIRONMENT-STUDIO-WORLDS-20261122`,秩相关 0.976,8 张截图)。
|
||
- 未验证(如实记录):
|
||
- 节点 socket 级编辑的 undo/redo(面板 Principled 与 renameId 已覆盖);
|
||
- 四种材质(而非单个 OPFS Gold)经 OPFS 保存/重开的逐材质回读;
|
||
- 与桌面参考渲染的截图色差对比;
|
||
- 节点编辑器里颜色端口无数值取色器(仅记录为已知差异)。
|
||
- 验收:`NOT_CLAIMED`(单 case 通过是证据素材,不等于整体验收)。
|
||
- 下一动作:补材质 undo/redo 与材质字段 OPFS 往返断言;环境光剩余项见 `docs/status/WEB-ENVIRONMENT-LIGHTING-20261122.md`。
|