Files
workinf_Blender_Wasm/tests/golden/WEB-MATERIAL-METALS-20261122/implementation.json
mes123456 63db6caf1f
Some checks failed
M6 deployable RC / quick (push) Has been cancelled
M6 deployable RC / chromium (push) Has been cancelled
M6 deployable RC / release (push) Has been cancelled
feat(web): studio worlds, camera-view/offscreen environment parity, material and undo coverage
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>
2026-11-23 09:27:47 +08:00

226 lines
13 KiB
JSON

{
"schemaVersion": 1,
"case": "WEB-MATERIAL-METALS-20261122",
"operation": "MATERIAL_PRINCIPLED_METALS_IMPLEMENTATION",
"workflow": "Add Monkey x4 -> add material slot -> rename Gold/Silver/Copper/Iron -> set Base Color/Metallic/Roughness -> apply -> MATERIAL shading lit by the preview environment",
"acceptance": "NOT_CLAIMED",
"verification": "CHROMIUM_CASE_PASS",
"browser": "chromium",
"storage": "OPFS",
"queueMutation": false,
"spec": "/home/mes123456/workinf_Blender_Wasm/web/tests/e2e/wbv2-material-metals-production.spec.ts",
"fixture": "/home/mes123456/workinf_Blender_Wasm/tests/files/web/basic_scene.blend",
"result": {
"run": "npx playwright test tests/e2e/wbv2-material-metals-production.spec.ts --workers=1",
"outcome": "9 passed (metals + material undo/redo + studio worlds + environment lighting + camera view onscreen/offscreen + OPFS save/reopen + undo across save + undo depth); npm run typecheck exit 0",
"suzanneCount": 4,
"snapshotRevision": 21,
"previewEnvironment": "studio-exr",
"studioEnvironment": {
"name": "forest",
"source": "blender-5.2.0/release/datafiles/studiolights/world/forest.exr",
"width": 1024,
"height": 512,
"pixelsSha256": "d38926cdc1c9c6b1c08d1737cb2795dfbfb32a23b7888d9da5e4c5956dfc730d",
"manifest": "/home/mes123456/workinf_Blender_Wasm/web/app/public/lights/forest.json"
},
"artifact": "/home/mes123456/workinf_Blender_Wasm/tests/golden/WEB-MATERIAL-METALS-20261122/metals-production.json",
"screenshot": "/home/mes123456/workinf_Blender_Wasm/tests/golden/WEB-MATERIAL-METALS-20261122/metals-four-suzanne.png"
},
"artifacts": {
"files": [
{
"path": "/home/mes123456/workinf_Blender_Wasm/web/app/src/app/App.tsx",
"sha256": "d4a92fcd84038fcac8ed408525e9ee969f71e16cab21b90085464ba5f649f32d"
},
{
"path": "/home/mes123456/workinf_Blender_Wasm/web/app/src/workers/web-engine.worker.ts",
"sha256": "007eea14c2d3a7b69c4c840435b4bdca3c26e95cc5f6b711a322bd3a6759efda"
},
{
"path": "/home/mes123456/workinf_Blender_Wasm/web/app/src/workers/viewport-render.worker.ts",
"sha256": "c5955b75b948920ff0bed477fb930aca7f5710b2a316f9dfee7a1a41146952c5"
},
{
"path": "/home/mes123456/workinf_Blender_Wasm/web/protocol/web-engine.ts",
"sha256": "2624057e891a2e716f383cca72e2227ae167126d06ec87b8b395c72cb8d46183"
},
{
"path": "/home/mes123456/workinf_Blender_Wasm/web/app/src/three-adapter/pbr.ts",
"sha256": "a13d7b0740972943dd41d47dd181c033b9d5c922c0d94f5db8e50effd197c0c1"
},
{
"path": "/home/mes123456/workinf_Blender_Wasm/web/app/src/three-adapter/viewport.ts",
"sha256": "f876c479dbc46a1b983e8a7f941b892f92fd2a5b89407cf7388efb11617a43f0"
},
{
"path": "/home/mes123456/workinf_Blender_Wasm/web/app/src/three-adapter/texture-assets.ts",
"sha256": "96b1fe3407a83f5a1035a8a4294a9099835a59c49427e2ae15a64d0ac74b73e3"
},
{
"path": "/home/mes123456/workinf_Blender_Wasm/web/app/src/three-adapter/studio-environment.ts",
"sha256": "f2e4014ffd54cbb0aff7f9c759df2d8c255d0763dde16e51d28ec63809c1b7a4"
},
{
"path": "/home/mes123456/workinf_Blender_Wasm/web/app/src/three-adapter/studio-light.ts",
"sha256": "3f92b48cd261f6d32fbb83992830016425575b0b370b14a7d3abd4d02c2ae51e"
},
{
"path": "/home/mes123456/workinf_Blender_Wasm/web/app/src/three-adapter/offscreen-viewport.ts",
"sha256": "5e5409b192db8e6940e906a79e90f729e22eb923c44cc6b79dc2db61cd62a3e8"
},
{
"path": "/home/mes123456/workinf_Blender_Wasm/web/app/src/three-adapter/offscreen-viewport-protocol.ts",
"sha256": "c3d83f8911fde7239a06f11249d8ae66f2244e9f9f09eb0f70de230af57b7609"
}
],
"lightDatasets": [
{
"path": "/home/mes123456/workinf_Blender_Wasm/web/app/public/lights/city.json",
"sha256": "21e39e3fdc11382f5e4d2578535197fb63e21abab774779aea7e3bfe80d10393"
},
{
"path": "/home/mes123456/workinf_Blender_Wasm/web/app/public/lights/courtyard.json",
"sha256": "68ccb2f7fd7c8151cf4d5d35beda49cb3ec8b328b350ea575e92cd4cca30eb5a"
},
{
"path": "/home/mes123456/workinf_Blender_Wasm/web/app/public/lights/forest.json",
"sha256": "aa058becf676cda64067c6a045674193c9a2c46411adbad2be7e4e99b9c88d7d"
},
{
"path": "/home/mes123456/workinf_Blender_Wasm/web/app/public/lights/interior.json",
"sha256": "00ce20a71f36618e018c6a73a54da8d9d5b0c28515c5eb78825c870e2d93a18d"
},
{
"path": "/home/mes123456/workinf_Blender_Wasm/web/app/public/lights/night.json",
"sha256": "3c4a28f5394e0b6cd578d6dd80efc21fdff796074717fffb31f466a2d95862ff"
},
{
"path": "/home/mes123456/workinf_Blender_Wasm/web/app/public/lights/studio.json",
"sha256": "c62e0c9664d2f8feef6f500d291507730dc3bc07f1a58518d90ac55d70861de4"
},
{
"path": "/home/mes123456/workinf_Blender_Wasm/web/app/public/lights/sunrise.json",
"sha256": "e696d7bc216cd878a6c4d3844c3214d410913920f53a863fd935421330f340a5"
},
{
"path": "/home/mes123456/workinf_Blender_Wasm/web/app/public/lights/sunset.json",
"sha256": "ef2b5b20d603f3e587d4764e068aa200b5c18ec5e0e4982723f81bb860c06c13"
}
]
},
"gapsFixed": [
{
"id": "base-color-color-space",
"visibleSymptom": "\u540c\u4e00 sRGB \u989c\u8272\u5728 Web \u4e0e\u684c\u9762\u6e32\u67d3\u4e0d\u4e00\u81f4\uff08\u9762\u677f\u628a sRGB \u5341\u516d\u8fdb\u5236\u5f53\u7ebf\u6027\u503c\u5199\u5165\uff09",
"fix": "App.tsx \u6750\u8d28\u9762\u677f\u5199\u8def\u5f84\u8fc7 srgbToLinear\u3001\u56de\u586b\u8fc7 linearToSrgb\uff1b\u8f6c\u6362\u590d\u7528\u5e76\u6269\u5c55 three-adapter/pbr.ts \u5df2\u6709 srgbToLinear",
"sourceBasis": "Blender \u989c\u8272\u5c5e\u6027\u6309\u7ebf\u6027\u5b58\u50a8\uff1b\u684c\u9762\u53d6\u8272\u5668\u8d1f\u8d23 sRGB hex \u4e0e\u7ebf\u6027\u503c\u4e92\u8f6c"
},
{
"id": "material-rename",
"visibleSymptom": "\u56db\u79cd\u91d1\u5c5e\u6750\u8d28\u5168\u90e8\u540d\u4e3a Material\uff0c\u65e0\u6cd5\u533a\u5206",
"fix": "\u6750\u8d28\u9762\u677f\u65b0\u589e\u540d\u79f0\u8f93\u5165\uff0c\u5931\u7126/Enter \u63d0\u4ea4\u5df2\u6709 renameId \u547d\u4ee4",
"sourceBasis": "web_engine_main_state.cpp:17740 rename_id \u5df2\u652f\u6301 material: \u524d\u7f00"
},
{
"id": "new-slot-activation",
"visibleSymptom": "\u70b9\u65b0\u589e\u69fd\u540e Principled \u63a7\u4ef6\u4e0d\u51fa\u73b0\uff08\u57fa\u7840\u4f53\u81ea\u5e26\u7a7a\u69fd\uff0c\u9762\u677f\u505c\u5728\u7a7a\u69fd\uff09",
"fix": "\u65b0\u589e\u69fd\u6210\u529f\u540e\u628a\u6d3b\u52a8\u69fd\u5207\u5230\u65b0\u69fd\u7d22\u5f15",
"sourceBasis": "web_engine_blend_reader.cpp:4350-4363 \u672a\u8d4b\u6750\u8d28\u7684\u69fd\u8bfb\u4e3a\u7a7a\u5b57\u7b26\u4e32\uff1bApp.tsx activeMaterial \u5bf9\u7a7a\u69fd\u89e3\u6790\u5931\u8d25"
},
{
"id": "operator-context-stale",
"visibleSymptom": "\u8fde\u7eed\u8c03\u7528\u539f\u751f operator \u65f6\u5076\u53d1\u4e0a\u4e0b\u6587\u8fc7\u671f\uff0c\u7334\u5934\u521b\u5efa\u5931\u8d25",
"fix": "invokeNativeOperator \u4f7f\u7528\u6700\u65b0 revision\uff0c\u5e76\u5728 OPERATOR_CONTEXT_STALE \u65f6\u91cd\u8bd5\u4e00\u6b21",
"sourceBasis": "\u539f\u751f operator \u9700\u8981\u4e0e Main \u5f53\u524d revision \u4e00\u81f4"
},
{
"id": "preview-environment-missing",
"visibleSymptom": "Material Preview \u4e0b metallic=1 \u7684\u6750\u8d28\u5b8c\u5168\u53d1\u9ed1\uff08\u65e0\u73af\u5883\u5149\u53ef\u53cd\u5c04\uff09\uff1b\u684c\u9762 Material Preview \u7531\u5185\u7f6e studio \u73af\u5883\u7167\u660e",
"fix": "viewport.ts \u5728 MATERIAL \u4e14\u672a\u542f\u7528 Scene World \u65f6\u6302\u8f7d studio \u73af\u5883\u8d34\u56fe\uff08PMREM\uff09\uff0cRendered / Scene World \u6539\u7528\u4e16\u754c\u73af\u5883\uff1bsetTextureAssets \u4e0d\u518d\u65e0\u6761\u4ef6\u7528\u4e16\u754c\u989c\u8272\u8986\u76d6\u89c6\u53e3\u73af\u5883",
"sourceBasis": "blender-5.2.0 View3DShading.use_scene_world\uff1bEEVEE Material Preview \u4f7f\u7528\u5185\u7f6e studio light\uff0cWorld \u7684 Background \u989c\u8272\u53ef\u76f4\u63a5\u4f5c\u4e3a\u73af\u5883"
},
{
"id": "studio-environment-desktop-exr",
"visibleSymptom": "Material Preview \u7684 studio \u73af\u5883\u662f\u7a0b\u5e8f\u5316\u53cc\u5149\u6591\u6e10\u53d8\uff0c\u91d1\u5c5e\u53cd\u5c04\u7684\u4eae\u6591\u4f4d\u7f6e/\u5f3a\u5ea6\u4e0e\u684c\u9762 forest.exr \u4e0d\u4e00\u81f4",
"fix": "tools/web/import-studiolight-world.py \u628a\u684c\u9762 studiolights/world/forest.exr \u89e3\u7801\u4e3a\u7cbe\u786e float32 \u50cf\u7d20\uff08WBENV1 + 1024x512 RGB\uff09\uff0cviewport.ts \u8f7d\u5165\u540e PMREM \u9884\u8fc7\u6ee4\uff0c\u6e10\u53d8\u4ec5\u4f5c\u52a0\u8f7d\u524d\u56de\u9000\uff1b\u539f\u751f world \u73af\u5883\u65cb\u8f6c\u7ecf Mapping \u8282\u70b9\u8bfb\u56de",
"sourceBasis": "blenkernel/intern/studiolight.cc STUDIOLIGHT_WORLD_DEFAULT = forest.exr\uff1b\u684c\u9762 World \u65cb\u8f6c\u5b9e\u73b0\u4e3a Mapping \u8282\u70b9\u63a5\u5165 Environment Texture \u7684 Vector"
},
{
"id": "studio-environment-selection",
"visibleSymptom": "\u684c\u9762 Viewport Shading \u7684 studio light \u5217\u8868\u6709 8 \u4e2a\u4e16\u754c\u73af\u5883\uff0cWeb \u53ea\u6709\u56fa\u5b9a\u7684 forest\uff0c\u7528\u6237\u65e0\u6cd5\u5207\u6362",
"fix": "tools/web/import-studiolight-world.py \u6279\u91cf\u751f\u6210 8 \u4e2a studiolights/world/*.exr \u7684\u7cbe\u786e float32 \u6570\u636e\u96c6\uff08web/app/public/lights/\uff09\uff0c\u65b0\u589e\u5171\u4eab\u52a0\u8f7d\u5668 three-adapter/studio-environment.ts\uff1bN \u9762\u677f\u65b0\u589e aria-label=\"studio \u73af\u5883\" \u9009\u62e9\u5668\uff1b\u4e3b\u89c6\u53e3\u4e0e\u79bb\u5c4f worker \u5171\u7528\u540c\u4e00\u52a0\u8f7d\u5668",
"sourceBasis": "blender-5.2.0/release/datafiles/studiolights/world/\uff08city/courtyard/forest/interior/night/studio/sunrise/sunset\uff09\uff1bSTUDIOLIGHT_WORLD_DEFAULT = forest.exr"
},
{
"id": "world-rotation-offscreen-and-camera-view",
"visibleSymptom": "\u73af\u5883\u65cb\u8f6c\u53ea\u5f71\u54cd\u5149\u7167\u53cd\u5c04\uff0c\u76f8\u673a\u89c6\u56fe/\u79bb\u5c4f\u51fa\u56fe\u7684\u4e16\u754c\u80cc\u666f\u4e0d\u65cb\u8f6c\uff0c\u4e0e\u684c\u9762 World Mapping \u8282\u70b9\u884c\u4e3a\u4e0d\u4e00\u81f4",
"fix": "texture-assets.ts applyEnvironment \u540c\u65f6\u8bbe\u7f6e scene.backgroundRotation/backgroundIntensity\uff1bviewport.ts \u5728 Scene World \u4e0b\u6062\u590d\u80cc\u666f\u7ed8\u5236\uff08\u542b MATERIAL \u9884\u89c8\uff09\uff1boffscreen-viewport \u534f\u8bae\u65b0\u589e studioLight \u547d\u4ee4\uff0cviewport-render.worker.ts \u7528\u5171\u4eab\u52a0\u8f7d\u5668\u5e94\u7528 studio \u73af\u5883\u4e0e\u65cb\u8f6c",
"sourceBasis": "\u684c\u9762 World \u65cb\u8f6c\u662f Mapping \u8282\u70b9\u63a5 Environment Texture Vector\uff0c\u80cc\u666f\u548c\u7167\u660e\u4f7f\u7528\u540c\u4e00\u5f20\u73af\u5883\u56fe"
}
],
"metalPresets": {
"Gold": {
"srgbHex": "#FFD700",
"baseColorLinear": [
1,
0.679,
0
],
"metallic": 1,
"roughness": 0.2
},
"Silver": {
"srgbHex": "#EDEDED",
"baseColorLinear": [
0.845,
0.845,
0.845
],
"metallic": 1,
"roughness": 0.15
},
"Copper": {
"srgbHex": "#B87333",
"baseColorLinear": [
0.479,
0.171,
0.033
],
"metallic": 1,
"roughness": 0.3
},
"Iron": {
"srgbHex": "#8A8A8A",
"baseColorLinear": [
0.258,
0.258,
0.258
],
"metallic": 1,
"roughness": 0.5
}
},
"unverified": [
"undo history byte cap (256 MiB) not exercised with an oversized scene",
"node-graph socket edits undo/redo (panel Principled and rename are covered)",
"screenshot comparison against a desktop reference render",
"studio world render is verified via dataset pixel identity + luminance rank correlation + screenshots, not a same-machine desktop render diff"
],
"nextActions": [
"Exercise the 256 MiB history byte cap with a large scene",
"Desktop reference render comparison for metal colour accuracy",
"Undo/redo for shader-node socket edits"
],
"evidence": {
"environmentLighting": "tests/golden/WEB-ENVIRONMENT-LIGHTING-20261122/environment-lighting.json",
"cameraView": "tests/golden/WEB-ENVIRONMENT-CAMERA-VIEW-20261122/camera-view.json",
"opfsSaveReopen": "tests/golden/WEB-OPFS-SAVE-REOPEN-20261122/opfs-save-reopen.json",
"verification": "npx playwright test (env + metals + camera view + opfs) -> 4 passed; npm run typecheck exit 0",
"cameraViewOffscreen": "tests/golden/WEB-ENVIRONMENT-CAMERA-VIEW-20261122/camera-view-offscreen.json",
"materialUndoRedo": "tests/golden/WEB-MATERIAL-UNDO-REDO-20261122/material-undo-redo.json",
"studioWorlds": "tests/golden/WEB-ENVIRONMENT-STUDIO-WORLDS-20261122/studio-worlds-lighting.json",
"undoAcrossSave": "tests/golden/WEB-UNDO-HISTORY-PERSISTENCE-20261122/undo-across-save.json",
"undoHistoryDepth": "tests/golden/WEB-UNDO-HISTORY-PERSISTENCE-20261122/undo-history-depth.json"
}
}