@nebula-spatial/viewer 0.5.11 → 0.5.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,44 @@
2
2
 
3
3
  All notable changes to this package are documented in this file.
4
4
 
5
+ ## 0.5.13
6
+
7
+ ### Added
8
+
9
+ - 扩展 MaterialX Standard Surface 常用语义:emission weight/color、specular color/anisotropy/rotation、coat color 与 coat IOR(F0 近似)、subsurface 受控透射近似、颜色亮度 `opacity`、`base` 权重;`specular_color`/`sheen_color` 颜色纹理、`coat_normal` 到 `clearcoatNormalMap`、`specular` 权重 A 通道到 `specularIntensityMap`。
10
+ - 支持实体外壳包围实体介质的嵌套透射:通过封闭网格射线识别内层介质并校验完整几何包含关系,合并真实壁厚与内部介质光程,将内层 IOR、透射色和体积吸收接入 transmission shader,同时保留屏幕空间折射。
11
+ - 新增官方 MaterialX 库审计基线与 `MATERIALX-LIBRARY-AUDIT.md`(随包发布):覆盖官方 TestSuite / StandardSurface Examples 的节点出现次数、分类和适配边界;仓库内可通过 `npm run audit:materialx` 重跑,`--strict` 下未知节点直接失败。
12
+
13
+ ### Changed
14
+
15
+ - 嵌套标签由覆盖层改为完整标签材质栈:离屏透射时只抑制相机近侧片元,保留背面标签采样;未声明双面且整体反向绕序的纹理表面也能正确显示。
16
+ - 完善 MaterialX 基础色权重、coat 纹理衰减和重复适配的组合逻辑,补充官方多材质球体链路回归。
17
+ - MaterialX UV 与通道语义完善:支持 `ND_separate3_color3` 通道提取、glTF normal map 标准 `[2,2,2]` / `[-1,-1,-1]` scale/bias、`ND_multiply_vector2(FA)` UV 缩放与 `texcoord` reader 组合;节点自身与上游同时存在 UV 变换时报告 `TEXTURE_UV_UNSUPPORTED`,不再静默选取。
18
+
19
+ ### Fixed
20
+
21
+ - 修复实体透射标签重复采样:标签材质栈对所有透射体积统一判定,避免同一标签被多个体积重复安装 shader。
22
+ - 修复 MaterialX 纹理 UV 变换在上游 `multiply`/`transform2d` 链中丢失,以及 glTF normal map 未应用标准解码 scale/bias 的问题。
23
+
24
+ ### Behavior notes
25
+
26
+ - 实体嵌套透射仅在外壳完整包含内层介质且射线校验通过时启用;不满足时保持原有的单层透射近似,不使用包围盒推断替代。
27
+ - MaterialX 仍不执行任意节点图。程序化噪声、ramp、复杂 blend/layer、条件节点和多 UV set 继续保留 gap,并在审计报告中列出。
28
+ - 本次发布只更新 Viewer;`@nebula-spatial/cad-loader`、私有 `scene-runtime` 和 OpenUSD 运行时均无变更。
29
+
30
+ ## 0.5.12
31
+
32
+ ### Fixed
33
+
34
+ - 修复薄壁瓶壳包裹实体液体时的嵌套标签渲染:在 Three.js 内部 transmission target 中使用全屏 HDR 背景,避免厚折射采样落到 HDR 图像之外;最终画面仍通过 stencil 保持模型外背景透明。
35
+ - 为水体边界内的印刷标签补充前表面 overlay,保留水体正面折射和背面标签采样,并过滤标签端面避免覆盖印刷内容;共享材质通过局部克隆隔离,退出时恢复并释放。
36
+ - 修复已由前表面 overlay 承担的印刷材质继续进入水体 transmission target、在下沿产生重复文字的问题;内层标签仍参与折射,并补齐恢复、释放与回归测试。
37
+
38
+ ### Behavior notes
39
+
40
+ - 本次修复仅影响嵌套透射结构(薄壁外壳 + 实体液体 + 内嵌印刷标签);无 transmission 的模型和普通不透明标签行为不变。
41
+ - 本次发布更新 Viewer,并包含私有 `@nebula-spatial/scene-runtime` 的 transmission HDR 背层调整;`@nebula-spatial/cad-loader` 版本不变。
42
+
5
43
  ## 0.5.11
6
44
 
7
45
  ### Added
@@ -0,0 +1,250 @@
1
+ # MaterialX Official Library Coverage Audit
2
+
3
+ - Generated: 2026-11-12
4
+ - MaterialX revision: `9176de82cd993bace533b734e17f9ca738061714`
5
+ - MaterialX checkout: `materialx-official-validation`
6
+ - Files scanned: `168`
7
+ - Nodes observed: `157`
8
+ - Parse errors: `2`
9
+
10
+ This report extracts node usage from the official MaterialX TestSuite and
11
+ StandardSurface examples, then applies the Viewer Adapter policy. It is an
12
+ audit of declared coverage, not a claim that each conditional node is
13
+ executable in every authored graph.
14
+
15
+ ## Classification Summary
16
+
17
+ | Classification | Meaning | Nodes | Occurrences |
18
+ |---|---|---:|---:|
19
+ | `adapter-bounded` | Mapped common slots with documented material-level approximation. | 2 | 114 |
20
+ | `adapter-conditional` | Only specific constant, channel, UV or texture-graph forms are mapped. | 24 | 769 |
21
+ | `shader-required` | Requires graph/shader evaluation or work beyond the Adapter layer. | 126 | 751 |
22
+ | `structural` | Material/look organization rather than a renderable shader node. | 5 | 254 |
23
+
24
+ ## Node Matrix
25
+
26
+ | Node | Group | TestSuite | Examples | Total | Classification | Adapter boundary |
27
+ |---|---|---:|---:|---:|---|---|
28
+ | `standard_surface` | `pbr` | 77 | 34 | 111 | `adapter-bounded` | Standard Surface common PBR slots map to Three.js; advanced layering/BSDF semantics remain incomplete. |
29
+ | `open_pbr_surface` | `pbr` | 3 | 0 | 3 | `adapter-bounded` | OpenPBR subset mapped to MeshPhysicalMaterial; advanced BSDF/volume semantics remain incomplete. |
30
+ | `image` | `texture2d` | 68 | 59 | 127 | `adapter-conditional` | Texture lookup only when resource, channel, color space and UV contract resolve. |
31
+ | `multiply` | `pbr` | 104 | 12 | 116 | `adapter-conditional` | Constant affine operand only when one side is a sampled texture or UV graph. |
32
+ | `constant` | `procedural` | 98 | 1 | 99 | `adapter-conditional` | Folded only as a constant operand for supported texture/UV affine graphs. |
33
+ | `add` | `pbr` | 42 | 4 | 46 | `adapter-conditional` | Constant affine operand only when one side is a sampled texture or UV graph. |
34
+ | `mix` | `pbr` | 43 | 3 | 46 | `adapter-conditional` | Only texture plus constant foreground/background with a constant mask. |
35
+ | `tiledimage` | `texture2d` | 33 | 10 | 43 | `adapter-conditional` | Authored tiling/offset and supported UV/address modes only. |
36
+ | `texcoord` | `geometric` | 40 | 1 | 41 | `adapter-conditional` | UV0 or a resolved single UV set; multiple UV sets remain gaps. |
37
+ | `divide` | `math` | 29 | 1 | 30 | `adapter-conditional` | Constant affine operand only; vector divisors and shader evaluation remain gaps. |
38
+ | `subtract` | `math` | 29 | 1 | 30 | `adapter-conditional` | Constant affine operand only; vector subtraction is not evaluated per pixel. |
39
+ | `normalmap` | `math` | 13 | 16 | 29 | `adapter-conditional` | Default scale/frame chains only; custom tangent frames remain gaps. |
40
+ | `transformmatrix` | `math` | 28 | 0 | 28 | `adapter-conditional` | Constant matrix33 only, converted from MaterialX row-vector convention. |
41
+ | `extract` | `channel` | 24 | 1 | 25 | `adapter-conditional` | Texture channel extraction only when index and source width are known. |
42
+ | `convert` | `shader` | 22 | 2 | 24 | `adapter-conditional` | Only equivalent-width texture channel conversions are accepted. |
43
+ | `remap` | `adjustment` | 23 | 0 | 23 | `adapter-conditional` | Only constant linear remap inputs that fold into scale/bias. |
44
+ | `invert` | `math` | 21 | 0 | 21 | `adapter-conditional` | Official `amount - in` folded only when amount is constant and affine. |
45
+ | `place2d` | `math` | 9 | 1 | 10 | `adapter-conditional` | Constant SRT inputs and supported operation order only. |
46
+ | `geompropvalue` | `geometric` | 8 | 0 | 8 | `adapter-conditional` | UV semantics only when the geometry property resolves to a supported UV set. |
47
+ | `combine3` | `channel` | 5 | 1 | 6 | `adapter-conditional` | Only same-source R/G/B channel composition with identical affine transforms. |
48
+ | `separate2` | `channel` | 4 | 0 | 4 | `adapter-conditional` | Same-source vector2 channel extraction into texture R/G. |
49
+ | `separate3` | `channel` | 4 | 0 | 4 | `adapter-conditional` | Same-source packed texture channel extraction into RGB. |
50
+ | `normalize` | `math` | 3 | 0 | 3 | `adapter-conditional` | Normal pass-through only inside a supported normal-map chain. |
51
+ | `rotate2d` | `math` | 3 | 0 | 3 | `adapter-conditional` | Constant angle folded into a UV affine matrix. |
52
+ | `separate4` | `channel` | 2 | 0 | 2 | `adapter-conditional` | Channel extraction only when the requested source channel is authored. |
53
+ | `contrast` | `adjustment` | 1 | 0 | 1 | `adapter-conditional` | Constant amount/pivot folded into texture scale/bias. |
54
+ | `ifequal` | `conditional` | 34 | 0 | 34 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
55
+ | `dielectric_bsdf` | `pbr` | 33 | 0 | 33 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
56
+ | `layer` | `pbr` | 30 | 0 | 30 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
57
+ | `oren_nayar_diffuse_bsdf` | `pbr` | 29 | 0 | 29 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
58
+ | `ifgreatereq` | `conditional` | 28 | 0 | 28 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
59
+ | `switch` | `conditional` | 28 | 0 | 28 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
60
+ | `ifgreater` | `conditional` | 23 | 0 | 23 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
61
+ | `max` | `math` | 19 | 1 | 20 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
62
+ | `clamp` | `math` | 18 | 1 | 19 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
63
+ | `position` | `geometric` | 17 | 1 | 18 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
64
+ | `modulo` | `math` | 17 | 0 | 17 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
65
+ | `surface_unlit` | `shader` | 16 | 0 | 16 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
66
+ | `conductor_bsdf` | `pbr` | 13 | 0 | 13 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
67
+ | `power` | `math` | 12 | 1 | 13 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
68
+ | `uniform_edf` | `pbr` | 13 | 0 | 13 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
69
+ | `floor` | `math` | 12 | 0 | 12 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
70
+ | `ramp4` | `procedural2d` | 12 | 0 | 12 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
71
+ | `safepower` | `math` | 12 | 0 | 12 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
72
+ | `min` | `math` | 11 | 0 | 11 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
73
+ | `fractal3d` | `procedural3d` | 8 | 1 | 9 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
74
+ | `generalized_schlick_bsdf` | `pbr` | 9 | 0 | 9 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
75
+ | `normal` | `geometric` | 9 | 0 | 9 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
76
+ | `ramptb` | `procedural2d` | 9 | 0 | 9 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
77
+ | `absval` | `math` | 8 | 0 | 8 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
78
+ | `dot` | `organization` | 8 | 0 | 8 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
79
+ | `noise2d` | `procedural2d` | 8 | 0 | 8 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
80
+ | `subsurface_bsdf` | `pbr` | 8 | 0 | 8 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
81
+ | `blur` | `convolution2d` | 7 | 0 | 7 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
82
+ | `ceil` | `math` | 7 | 0 | 7 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
83
+ | `line` | `procedural2d` | 7 | 0 | 7 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
84
+ | `ramplr` | `procedural2d` | 7 | 0 | 7 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
85
+ | `round` | `math` | 7 | 0 | 7 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
86
+ | `splitlr` | `procedural2d` | 7 | 0 | 7 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
87
+ | `splittb` | `procedural2d` | 7 | 0 | 7 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
88
+ | `sqrt` | `math` | 7 | 0 | 7 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
89
+ | `triplanarprojection` | `texture3d` | 7 | 0 | 7 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
90
+ | `fract` | `math` | 6 | 0 | 6 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
91
+ | `noise3d` | `procedural3d` | 6 | 0 | 6 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
92
+ | `sign` | `math` | 6 | 0 | 6 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
93
+ | `sin` | `math` | 5 | 1 | 6 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
94
+ | `smoothstep` | `adjustment` | 6 | 0 | 6 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
95
+ | `atan2` | `math` | 5 | 0 | 5 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
96
+ | `combine2` | `channel` | 5 | 0 | 5 | `shader-required` | Official node group `channel` is not currently folded into a material slot. |
97
+ | `combine4` | `channel` | 5 | 0 | 5 | `shader-required` | Official node group `channel` is not currently folded into a material slot. |
98
+ | `displacement` | `pbr` | 5 | 0 | 5 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
99
+ | `dotproduct` | `math` | 4 | 1 | 5 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
100
+ | `maxcomponent` | `math` | 5 | 0 | 5 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
101
+ | `mincomponent` | `math` | 5 | 0 | 5 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
102
+ | `sheen_bsdf` | `pbr` | 5 | 0 | 5 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
103
+ | `transformpoint` | `math` | 5 | 0 | 5 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
104
+ | `transformvector` | `math` | 5 | 0 | 5 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
105
+ | `acos` | `math` | 4 | 0 | 4 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
106
+ | `artistic_ior` | `pbr` | 4 | 0 | 4 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
107
+ | `asin` | `math` | 4 | 0 | 4 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
108
+ | `burn` | `compositing` | 4 | 0 | 4 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
109
+ | `cos` | `math` | 4 | 0 | 4 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
110
+ | `dodge` | `compositing` | 4 | 0 | 4 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
111
+ | `exp` | `math` | 4 | 0 | 4 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
112
+ | `fractal2d` | `procedural2d` | 4 | 0 | 4 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
113
+ | `hextiledimage` | `texture2d` | 2 | 2 | 4 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
114
+ | `ln` | `math` | 4 | 0 | 4 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
115
+ | `roughness_anisotropy` | `pbr` | 4 | 0 | 4 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
116
+ | `tan` | `math` | 4 | 0 | 4 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
117
+ | `transformnormal` | `math` | 4 | 0 | 4 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
118
+ | `cellnoise2d` | `procedural2d` | 3 | 0 | 3 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
119
+ | `creatematrix` | `math` | 3 | 0 | 3 | `shader-required` | Official node group `math` is not currently folded into a material slot. |
120
+ | `difference` | `compositing` | 3 | 0 | 3 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
121
+ | `geomcolor` | `geometric` | 3 | 0 | 3 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
122
+ | `hsvtorgb` | `adjustment` | 2 | 1 | 3 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
123
+ | `inside` | `compositing` | 3 | 0 | 3 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
124
+ | `luminance` | `adjustment` | 3 | 0 | 3 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
125
+ | `magnitude` | `math` | 3 | 0 | 3 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
126
+ | `minus` | `compositing` | 3 | 0 | 3 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
127
+ | `outside` | `compositing` | 3 | 0 | 3 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
128
+ | `plus` | `compositing` | 3 | 0 | 3 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
129
+ | `rgbtohsv` | `adjustment` | 2 | 1 | 3 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
130
+ | `screen` | `compositing` | 3 | 0 | 3 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
131
+ | `translucent_bsdf` | `pbr` | 3 | 0 | 3 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
132
+ | `worleynoise2d` | `procedural2d` | 3 | 0 | 3 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
133
+ | `worleynoise3d` | `procedural3d` | 3 | 0 | 3 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
134
+ | `burley_diffuse_bsdf` | `pbr` | 2 | 0 | 2 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
135
+ | `cellnoise3d` | `procedural3d` | 2 | 0 | 2 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
136
+ | `chiang_hair_bsdf` | `pbr` | 2 | 0 | 2 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
137
+ | `circle` | `procedural2d` | 2 | 0 | 2 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
138
+ | `determinant` | `math` | 2 | 0 | 2 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
139
+ | `disjointover` | `compositing` | 2 | 0 | 2 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
140
+ | `flake3d` | `procedural3d` | 2 | 0 | 2 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
141
+ | `gooch_shade` | `npr` | 2 | 0 | 2 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
142
+ | `heighttonormal` | `convolution2d` | 2 | 0 | 2 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
143
+ | `invertmatrix` | `math` | 2 | 0 | 2 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
144
+ | `rotate3d` | `math` | 2 | 0 | 2 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
145
+ | `time` | `application` | 2 | 0 | 2 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
146
+ | `transpose` | `math` | 2 | 0 | 2 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
147
+ | `and` | `conditional` | 1 | 0 | 1 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
148
+ | `anisotropic_vdf` | `pbr` | 1 | 0 | 1 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
149
+ | `bitangent` | `geometric` | 1 | 0 | 1 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
150
+ | `blackbody` | `pbr` | 1 | 0 | 1 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
151
+ | `chiang_hair_absorption_from_color` | `pbr` | 1 | 0 | 1 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
152
+ | `chiang_hair_roughness` | `pbr` | 1 | 0 | 1 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
153
+ | `crosshatch` | `procedural2d` | 1 | 0 | 1 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
154
+ | `crossproduct` | `math` | 1 | 0 | 1 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
155
+ | `deon_hair_absorption_from_melanin` | `pbr` | 1 | 0 | 1 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
156
+ | `facingratio` | `npr` | 1 | 0 | 1 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
157
+ | `flake2d` | `procedural2d` | 1 | 0 | 1 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
158
+ | `frame` | `application` | 1 | 0 | 1 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
159
+ | `generalized_schlick_edf` | `pbr` | 1 | 0 | 1 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
160
+ | `geompropvalueuniform` | `geometric` | 1 | 0 | 1 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
161
+ | `grid` | `procedural2d` | 1 | 0 | 1 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
162
+ | `hextilednormalmap` | `math` | 1 | 0 | 1 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
163
+ | `light` | `pbr` | 1 | 0 | 1 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
164
+ | `mask` | `compositing` | 1 | 0 | 1 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
165
+ | `matte` | `compositing` | 1 | 0 | 1 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
166
+ | `not` | `conditional` | 1 | 0 | 1 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
167
+ | `or` | `conditional` | 1 | 0 | 1 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
168
+ | `over` | `compositing` | 1 | 0 | 1 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
169
+ | `premult` | `compositing` | 1 | 0 | 1 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
170
+ | `randomcolor` | `procedural3d` | 1 | 0 | 1 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
171
+ | `roughness_dual` | `pbr` | 1 | 0 | 1 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
172
+ | `tangent` | `geometric` | 1 | 0 | 1 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
173
+ | `tiledcircles` | `procedural2d` | 1 | 0 | 1 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
174
+ | `tiledcloverleafs` | `procedural2d` | 1 | 0 | 1 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
175
+ | `tiledhexagons` | `procedural2d` | 1 | 0 | 1 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
176
+ | `unpremult` | `compositing` | 1 | 0 | 1 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
177
+ | `viewdirection` | `npr` | 1 | 0 | 1 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
178
+ | `volumematerial` | `material` | 1 | 0 | 1 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
179
+ | `xor` | `conditional` | 1 | 0 | 1 | `shader-required` | Requires graph/shader evaluation or a dedicated runtime approximation. |
180
+ | `surfacematerial` | `material` | 102 | 34 | 136 | `structural` | Material/look organization; not a shader node for Adapter evaluation. |
181
+ | `surface` | `pbr` | 90 | 0 | 90 | `structural` | Material/look organization; not a shader node for Adapter evaluation. |
182
+ | `materialassign` | `-` | 7 | 19 | 26 | `structural` | Material/look organization; not a shader node for Adapter evaluation. |
183
+ | `in` | `compositing` | 1 | 0 | 1 | `structural` | Material/look organization; not a shader node for Adapter evaluation. |
184
+ | `out` | `compositing` | 1 | 0 | 1 | `structural` | Material/look organization; not a shader node for Adapter evaluation. |
185
+
186
+ ## Standard Surface Inputs
187
+
188
+ | Shader | Input | Occurrences | Classification | Adapter boundary |
189
+ |---|---|---:|---|---|
190
+ | `open_pbr_surface` | `geometry_opacity` | 1 | `adapter-bounded` | Coverage subset. |
191
+ | `open_pbr_surface` | `geometry_thin_walled` | 1 | `adapter-bounded` | Physical thin-wall policy. |
192
+ | `open_pbr_surface` | `subsurface_color` | 1 | `adapter-gap` | OpenPBR SSS is not yet approximated. |
193
+ | `open_pbr_surface` | `subsurface_scatter_anisotropy` | 1 | `adapter-gap` | No stock phase-function parameter. |
194
+ | `open_pbr_surface` | `subsurface_weight` | 1 | `adapter-gap` | OpenPBR SSS is not yet approximated; StandardSurface bounded SSS work does not imply OpenPBR coverage. |
195
+ | `open_pbr_surface` | `transmission_weight` | 1 | `adapter-bounded` | Physical transmission subset. |
196
+ | `standard_surface` | `base_color` | 92 | `adapter-bounded` | Maps to MeshStandardMaterial color. |
197
+ | `standard_surface` | `specular_roughness` | 48 | `adapter-bounded` | Maps to roughness. |
198
+ | `standard_surface` | `base` | 36 | `adapter-bounded` | Multiplies the authored base color. |
199
+ | `standard_surface` | `metalness` | 32 | `adapter-bounded` | Maps to metalness. |
200
+ | `standard_surface` | `normal` | 32 | `adapter-bounded` | Maps supported normal-map graphs to normalMap. |
201
+ | `standard_surface` | `specular` | 24 | `adapter-bounded` | Maps to specular intensity where the physical material is required. |
202
+ | `standard_surface` | `subsurface` | 21 | `adapter-bounded` | A controlled transmission lobe approximates SSS; random-walk scattering is not equivalent. |
203
+ | `standard_surface` | `subsurface_color` | 21 | `adapter-bounded` | Tints the approximate transmission/SSS lobe. |
204
+ | `standard_surface` | `subsurface_scale` | 19 | `adapter-bounded` | Preserved as mean-free-path scale metadata. |
205
+ | `standard_surface` | `subsurface_radius` | 16 | `adapter-bounded` | Preserved as mean-free-path metadata for the bounded approximation. |
206
+ | `standard_surface` | `coat` | 15 | `adapter-bounded` | Maps to clearcoat weight. |
207
+ | `standard_surface` | `specular_color` | 15 | `adapter-bounded` | Maps to constant or texture specular color. |
208
+ | `standard_surface` | `coat_roughness` | 9 | `adapter-bounded` | Maps to clearcoat roughness. |
209
+ | `standard_surface` | `specular_IOR` | 9 | `adapter-bounded` | Maps to MeshPhysicalMaterial IOR. |
210
+ | `standard_surface` | `specular_anisotropy` | 8 | `adapter-bounded` | Constant values map to anisotropy; tangent-frame differences remain bounded. |
211
+ | `standard_surface` | `coat_color` | 6 | `adapter-bounded` | Constant values attenuate substrate and emission; a connected map is supported when it can own the base map slot. |
212
+ | `standard_surface` | `opacity` | 6 | `adapter-bounded` | Official color luminance maps to coverage; connected color textures use a bounded 8-bit luminance repack. |
213
+ | `standard_surface` | `transmission_color` | 6 | `adapter-bounded` | Used as a transmission lobe tint and volume attenuation input. |
214
+ | `standard_surface` | `specular_rotation` | 5 | `adapter-bounded` | Normalized rotation maps to anisotropyRotation times 2pi. |
215
+ | `standard_surface` | `transmission` | 5 | `adapter-bounded` | Uses the physical transmission lobe and same-mesh thickness when available. |
216
+ | `standard_surface` | `emission` | 4 | `adapter-bounded` | Maps to emissiveIntensity. |
217
+ | `standard_surface` | `emission_color` | 4 | `adapter-bounded` | Maps to constant or texture emissive color. |
218
+ | `standard_surface` | `thin_walled` | 4 | `adapter-bounded` | Controls physical transmission thickness policy. |
219
+ | `standard_surface` | `coat_IOR` | 3 | `adapter-bounded` | Scales clearcoat strength by the F0 ratio; the clearcoat IOR itself is fixed by Three.js. |
220
+ | `standard_surface` | `coat_anisotropy` | 3 | `adapter-gap` | MeshPhysicalMaterial has no separate anisotropic clearcoat distribution. |
221
+ | `standard_surface` | `diffuse_roughness` | 3 | `adapter-bounded` | Preserved as authored metadata; stock Three.js uses Lambert diffuse rather than Oren-Nayar. |
222
+ | `standard_surface` | `thin_film_IOR` | 3 | `adapter-gap` | Thin-film interference is deferred. |
223
+ | `standard_surface` | `thin_film_thickness` | 3 | `adapter-gap` | Thin-film interference is deferred. |
224
+ | `standard_surface` | `coat_normal` | 2 | `adapter-bounded` | Maps to clearcoatNormalMap. |
225
+ | `standard_surface` | `coat_rotation` | 2 | `adapter-gap` | No separate clearcoat anisotropy rotation is available. |
226
+ | `standard_surface` | `sheen` | 2 | `adapter-bounded` | Maps to sheen weight. |
227
+ | `standard_surface` | `sheen_color` | 2 | `adapter-bounded` | Maps to constant or texture sheen color. |
228
+ | `standard_surface` | `sheen_roughness` | 2 | `adapter-bounded` | Maps to sheen roughness. |
229
+ | `standard_surface` | `transmission_depth` | 2 | `adapter-bounded` | Used as a Beer-Lambert depth when the geometry contract resolves. |
230
+ | `standard_surface` | `transmission_dispersion` | 2 | `adapter-gap` | Spectral dispersion requires a renderer path beyond the Adapter. |
231
+ | `standard_surface` | `transmission_extra_roughness` | 2 | `adapter-gap` | Three.js cannot independently roughen transmission versus reflection. |
232
+ | `standard_surface` | `transmission_scatter` | 2 | `adapter-gap` | Volumetric scatter is not represented by the stock physical material. |
233
+ | `standard_surface` | `transmission_scatter_anisotropy` | 2 | `adapter-gap` | No equivalent stock Three.js phase-function parameter. |
234
+ | `standard_surface` | `coat_affect_color` | 1 | `adapter-gap` | Offline coat saturation coupling is not expressible in the stock material. |
235
+ | `standard_surface` | `coat_affect_roughness` | 1 | `adapter-gap` | Offline coat/base roughness coupling is not expressible in the stock material. |
236
+ | `standard_surface` | `subsurface_anisotropy` | 1 | `adapter-gap` | The stock Three.js physical material has no SSS phase anisotropy. |
237
+ | `standard_surface` | `tangent` | 1 | `adapter-gap` | Custom tangent frames are not yet consumed as stock material inputs. |
238
+
239
+ ## Parse Errors
240
+
241
+ These official files were skipped because their XML is not well formed
242
+ (for example, an unescaped `<UDIM>` token inside an attribute value).
243
+
244
+ - `resources/Materials/TestSuite/nprlib/toon_shade.mtlx: unbound prefix: line 19, column 2`
245
+ - `resources/Materials/TestSuite/stdlib/texture/udim.mtlx: not well-formed (invalid token): line 4, column 78`
246
+
247
+ ## Source Groups
248
+
249
+ - `resources/Materials/TestSuite`: 146 files
250
+ - `resources/Materials/Examples/StandardSurface`: 22 files
@@ -1,6 +1,6 @@
1
1
  # USD 视觉材质适配矩阵
2
2
 
3
- > 更新日期:2026-11-11
3
+ > 更新日期:2026-11-12
4
4
  >
5
5
  > 本文描述浏览器 Viewer 当前对 USD 材质的**语义转换与视觉近似边界**,不是渲染器等价性声明。没有资产资源、没有材质连接或缺少可靠光学数据时,适配层不会生成替代内容。
6
6
 
@@ -23,17 +23,18 @@
23
23
  | KTX2 纹理资源 | 已转换 | ETC1S/UASTC 通过 Three.js `KTX2Loader` 和宿主 renderer 支持检测转码;颜色纹理为 sRGB,normal/ORM 为线性 | 压缩纹理的逐像素 CPU 重排;异步上传尚未完成的中间帧 | 原生同步构建器只保留可识别占位,视觉适配层完成异步转码后再绑定 |
24
24
  | `UsdPreviewSurface` Material interface | 已转换(受限) | `Surface.inputs:* -> Material.inputs:*` 常量、IOR、clearcoat、透明度,以及颜色/自发光/受支持标量纹理 | 无值 interface、未知上游节点、interface opacity/normal 纹理 | 只有值和上游实际落地后才消解 Loader 警告;其余保持 gap |
25
25
  | 标准 UDIM 纹理资源 | 已转换(单 tile / atlas) | `<UDIM>` 模板按包内实际四位 tile 文件解析;唯一 tile 可直接绑定,不假定 `1001`;多 tile 按标准列/行坐标合成紧凑 atlas,并保留 authored UV 通过纹理矩阵采样 | 单张 atlas 超过纹理尺寸上限、非标准 wrap 或无法由普通纹理矩阵表达的逐 tile 采样语义;超大集合仍需要 texture-array/virtual-texture 管线 | atlas 使用 clamp 并记录有界近似;无法安全合成时报告 `USD_VISUAL_TEXTURE_UDIM_MULTI_TILE_UNSUPPORTED`,不静默选择任一 tile |
26
- | `UsdPreviewSurface` / OpenPBR 颜色纹理 | 已转换(受限) | `diffuseColor`/`base_color` RGB sRGB 到 `map`,`emissiveColor`/`emission_color` 到 `emissiveMap`;单位 scale/bias、wrap、UV 变换 | 非 RGB、非 sRGB、非单位 scale/bias、多 UV set、未知 wrap | 不从槽位名称强行改色彩空间,不生成缺失像素 |
27
- | `UsdPreviewSurface` 法线纹理 | 已转换(受限) | raw RGB、标准 `[2,2,2]` / `[-1,-1,-1]` 解码、wrap、UV 变换到 `normalMap` | 非标准 scale/bias、多 UV set、未知输出/节点 | Three.js 自带 2x-1 解码;不把未解码 RGB 或猜测的切线手性当作等价 |
26
+ | `UsdPreviewSurface` / OpenPBR / MaterialX 颜色纹理 | 已转换(受限) | `diffuseColor`/`base_color` RGB sRGB 到 `map`,`emissiveColor`/`emission_color` 到 `emissiveMap`,OpenPBR `specular_color` 与 MaterialX `specular_color` 到 `specularColorMap`,OpenPBR `fuzz_color` 与 MaterialX `sheen_color` 到 `sheenColorMap`;MaterialX `coat_color` 在无基础颜色图时可占用 `map` 作为基体衰减;单位 scale/bias、wrap、UV 变换 | 非 RGB、非 sRGB、多 UV set、未知 wrap、无法进入 `MeshPhysicalMaterial` 的目标;基础色图与 coat 色图同时存在时需要双纹理乘算 | 不从槽位名称强行改色彩空间,不生成缺失像素;颜色图增益只折叠为对应材质的颜色乘数 |
27
+ | `UsdPreviewSurface` / OpenPBR / MaterialX 法线纹理 | 已转换(受限) | raw RGB、标准 `[2,2,2]` / `[-1,-1,-1]` 解码、wrap、UV 变换到 `normalMap`;OpenPBR `geometry_coat_normal` 与 MaterialX `coat_normal` 到 `clearcoatNormalMap` | 非标准 PreviewSurface scale/bias、多 UV set、未知输出/节点、自定义 tangent frame | Three.js 自带 2x-1 解码;清漆法线只写入独立 `clearcoatNormalMap`,不覆盖基础法线 |
28
28
  | `UsdPreviewSurface` 常量介质透明 | 有界近似 | `opacityMode=transparent`、常量 IOR、`MeshPhysicalMaterial.transmission`、反射保留 | Three.js 与 PreviewSurface 的透射瓣、粗糙度和多层透射不完全等价 | 不把所有 opacity 机械转换为玻璃 |
29
29
  | `UsdPreviewSurface` `presence` | 已转换(常量) | 整体覆盖率、零值消失、中间值透明 | 纹理驱动和复杂连接 | 不与玻璃 transmission 混淆 |
30
30
  | `UsdPreviewSurface` `opacityThreshold` | 已转换(受限) | 常量小于阈值裁切,大于等于阈值保留 | 复杂纹理过滤、跨渲染器阈值边缘差异 | 不将裁切误作连续半透明 |
31
31
  | `UsdPreviewSurface` 透明纹理 | 已转换(受限) | raw、UV0、明确通道、scale/bias、支持的 wrap 模式 | 非 raw 色彩空间、复杂 UV、多节点合成 | 只重排已有像素,不生成纹理 |
32
- | `UsdPreviewSurface` / OpenPBR 标量纹理 | 已转换(受限) | roughness G、metalness B、occlusion R、coat R/G、transmission R、thickness G、sheenRoughness A | 多 UV set、未知 wrap、非 raw、连接型 scale/bias、来源冲突贴图 | 按 IR 合同重排;Loader 证明失效才替换,否则保留 gap |
32
+ | `UsdPreviewSurface` / OpenPBR / MaterialX 标量纹理 | 已转换(受限) | roughness G、metalness B、occlusion R、coat R/G、transmission R、thickness G、specular intensity A、sheenRoughness A | 多 UV set、未知 wrap、非 raw、连接型 scale/bias、来源冲突贴图 | 按 IR 合同重排;OpenPBR `specular_weight` 与 MaterialX `specular` 进入 `specularIntensityMap` 的 A 通道,Loader 证明失效才替换,否则保留 gap |
33
33
  | `UsdPreviewSurface` 纯金属透明 | 有界近似 | 保留纯金属镜面响应,不转成玻璃 | 半金属、复杂 specular workflow | 金属和玻璃分支严格区分 |
34
34
  | OpenPBR 基础字段 | 已转换 / 有界近似 | 常量基础色及 `base_weight`、金属度、粗糙度、IOR、emission、coverage | 纹理化 `base_color` 的独立 `base_weight` 分层、raw affine、connected coverage、复杂纹理图 | OpenPBR 明确 authored 字段优先;PreviewSurface 仅补齐缺失字段,压制项不进入纹理回退 |
35
35
  | OpenPBR transmission / coat | 有界近似 | 常量与目标通道纹理、薄壁 `thickness=0`、独立 `transmission_color`;`depth=0` 作为 lobe tint,有限 `transmission_depth` 使用米制 Beer-Lambert;闭合实体从同一 mesh 的 backface ray 生成逐顶点光程 | 散射、色散、多层透射、跨 mesh 体积、复杂纹理驱动 depth;coat color/IOR 仍不完整 | `base_weight=0` 只关闭 base,不让 transmission tint 污染 `base_color`;无可靠同 mesh backface 光程时不生成替代厚度 |
36
- | OpenPBR fuzz / anisotropy | 有界近似 | sheen 参数、标量纹理、anisotropy 常量 | 完整 fuzz BRDF、切线手性、thin film | 未连接 fuzz color 不凭空启用 sheen |
36
+ | OpenPBR fuzz / anisotropy | 有界近似 | `fuzz_weight`、`fuzz_color` 颜色纹理、`fuzz_roughness`、anisotropy 常量 | 完整 fuzz BRDF、连接型 fuzz weight、切线手性、thin film | 未连接 fuzz color 不凭空启用 sheen;连接型 fuzz color 只有在已有可表达权重时才启用 sheen |
37
+ | MaterialX Standard Surface 常用字段 | 有界近似 | `base`/`base_color`、`diffuse_roughness` 元数据、`metalness`、`specular`/`specular_color`/`specular_roughness`/`specular_IOR`、`specular_anisotropy`/`specular_rotation`、`emission * emission_color`、颜色亮度 `opacity`、sheen、coat、`coat_color` 衰减、`coat_IOR` F0 近似、`subsurface` 受控透射近似 | Oren-Nayar 漫反射、完整 SSS、清漆独立 IOR/色散、coat 各向异性、coat/base 耦合、thin film、transmission scatter/dispersion | 有明确主干视觉意图的字段进入有界近似;无股票材质等价项保留结构化近似诊断,不宣称离线 BSDF 等价 |
37
38
  | MaterialX Standard Surface 薄壁透射 | 有界近似 | 常量 opacity 与 transmission 分离;Loader 透射结果保留 | 完整 MaterialX 节点执行、复杂组合和多层透射 | 不把 transmission_depth 当几何壁厚 |
38
39
  | MaterialX 实体透射 | 有界近似 | Standard Surface 的 transmission weight/color、IOR、`geometry_thin_walled`;闭合实体使用同一 mesh 的逐顶点 backface 光程,有限 `transmission_depth` 进入 Beer-Lambert attenuation | 体散射、色散、多层材质和跨 mesh 间隙;逐顶点光程不能表达高频薄壁变化 | 命中率低于 0.5 时报告 `USD_VISUAL_TRANSMISSION_GEOMETRY_UNAVAILABLE`;不使用 bbox、球探针或默认厚度 |
39
40
  | OmniPBR 基础颜色 | 已转换 / 有界近似 | 常量颜色、已有 diffuse texture | 复杂 UV、程序化节点 | 只使用资产已有资源 |
@@ -84,7 +85,10 @@ OpenPBR 与 MaterialX Standard Surface 在适配时生成独立的 `semantics`
84
85
 
85
86
  ```text
86
87
  base: weight, color, diffuseRoughness, metalness
87
- specular: weight, color, roughness, ior, anisotropy
88
+ specular: weight, color, roughness, ior, anisotropy, rotation
89
+ emission: weight, color
90
+ coat: weight, color, roughness, ior, anisotropy, rotation
91
+ subsurface: weight, color, radius, scale, anisotropy
88
92
  transmission: weight, color, depth, scatter, scatterAnisotropy, dispersion, thinWalled
89
93
  geometry: normal, uvSets
90
94
  ```
@@ -113,10 +117,16 @@ hitRatio, minThickness, maxThickness
113
117
 
114
118
  ### MaterialX 当前边界
115
119
 
116
- - 已覆盖 `ND_standard_surface_surfaceshader` 与 `ND_open_pbr_surface_surfaceshader` 的常见颜色、roughness、metalness、IOR、coat、transmission、thickness、AO、sheen roughness、常量透明和透明纹理。
117
- - 纹理图求值支持直接图片节点、channel extract/swizzle/convert、常量及简单四则运算,以及受支持的 UV transform/geomprop。
118
- - 支持 `ND_gltf_image_color4_* -> ND_separate4_color4 -> ND_combine3_color3` 的标签 RGB/alpha 还原,以及 `ND_gltf_normalmap_vector3_*` 的 UV pivot/scale。
119
- - 尚未执行完整 MaterialX 节点图;程序化纹理、ramp、噪声、复杂 blend/layer/条件节点、多 UV set、复杂法线和体积散射仍会保留为 gap。
120
+ | 节点类别 | 当前覆盖 | 处理原则 |
121
+ |---|---|---|
122
+ | Surface Shader | `ND_standard_surface_surfaceshader`、`ND_open_pbr_surface_surfaceshader` 的基础、specular weight/color/anisotropy/rotation、emission、coat/coat color/coat IOR、coat normal、subsurface、transmission、thickness、AO、sheen weight/color/roughness 和透明语义 | 只映射 Three.js 能明确表达的字段或文档化有界近似;Oren-Nayar、完整 SSS、coat 各向异性/耦合、高级 BSDF 和体积语义保留 gap;连接型标量权重不能由图集表达时不得默认启用 |
123
+ | Image | `ND_image_*`、`ND_tiledimage_*`、`ND_gltf_image_*`、`ND_gltf_normalmap_vector3_*` | filename、sRGB/raw、channel、wrap 和受支持的 UV 语义进入 IR;GPU mip/anisotropy 按 renderer 能力统一设置 |
124
+ | UV | `texcoord`、`geompropvalue_vector2`、`transform2d`、`place2d`、`rotate2d`、`transformmatrix_vector2M3`、`invert_vector2/2FA`、常量 `add/subtract/multiply/divide_vector2/2FA` | 可组合的 2×3 affine UV 变换折叠为目标纹理矩阵;MaterialX `matrix33` 按官方行主序、行向量约定转换;多 UV set、非常量除数或未知嵌套仍报 gap |
125
+ | Channel | `extract`、`separate2/3/4`、`combine3`、`convert`,以及兼容旧资产的 `swizzle` | 只有来源纹理、通道和变换完全一致时才重组;不猜测跨纹理通道 |
126
+ | Affine | 常量 `multiply/add/subtract/divide`、`contrast`、`invert`(官方语义 `amount - in`)、`mix`、线性 `remap`、`gamma=1 && doclamp=false` 的 `range` | 仅当参数为常量且可精确折叠为 scale/bias 时消费;非线性、clamp 或 gamma 变换不降级成近似 |
127
+ | Normal | 基础法线与 coat normal 的默认强度和 frame `normalize -> normalmap` 链、glTF normal map、标准 2x-1 解码 | 自定义 tangent/normal frame、非默认 scale、跨法线槽混合保留 gap |
128
+ | 程序化 / 合成 | noise、ramp、curve、checker、smoothstep、clamp、gamma、连接型 range/remap、纹理间 mix/blend/layer、条件节点 | 尚未执行任意节点图;线性 remap/range 仅作为常量仿射特例处理,其余必须报告节点路径和原因,不能静默返回默认色 |
129
+
120
130
  - 薄壁与实体 transmission 都是实时 Three.js transmission 近似;实体光程来自同 mesh 的 backface BVH,逐顶点插值不保证捕获所有薄壁、内部隔断或自相交细节。
121
131
  - 透射背景采用 screen-space refraction approximation,不执行二次光线、跨 mesh 体积积分、散射或色散。
122
132
 
@@ -151,6 +161,40 @@ hitRatio, minThickness, maxThickness
151
161
  - 通过修改背景、排序、颜色或强制双面制造“看起来更像”的资产特例;
152
162
  - 把 Storm、Three.js 实时结果或 Loader 成功解析当作 Cycles、RTX 或 Karma 的最终真值。
153
163
 
164
+ ## 官方 MaterialX 验证基线
165
+
166
+ 材质语义不只依赖本地自造 shader 数据,以下官方资源作为节点定义和真实图结构基线:
167
+
168
+ - `resources/Materials/TestSuite/stdlib`:官方标准库节点测试,包含 `texture`、`math/transform`、`math/matrix`、`channel`、`adjustment`、`noise` 等分组。
169
+ - `resources/Materials/Examples/StandardSurface`:官方 Standard Surface 材质示例,包含 wood、brass、copper、gold、glass、jade、plastic、velvet 等。
170
+ - `resources/Images`:官方示例使用的颜色、粗糙度、法线、渐变和 UDIM 测试纹理。
171
+
172
+ 当前模型级集成回归使用上述 `standard_surface_wood_tiled.mtlx` 和 `stdlib/math/transform.mtlx` 的等价 USD 球体场景:
173
+
174
+ - 保留 `ND_standard_surface_surfaceshader`、`ND_tiledimage_color3/float`、`ND_texcoord_vector2`、`ND_transformmatrix_vector2M3` 的实际 USD shader prim 和连接。
175
+ - 经过 OpenUSD WASM 解析、`outputs:mtlx:surface` 发现、Material IR、Adapter 和最终 Three.js `Texture.matrix` 全链路。
176
+ - 验证 4×4 平铺、sRGB/raw 色彩空间、`specular`、`coat`、`coat_roughness`,以及官方行主序 `matrix33` 到 Three.js 纹理矩阵的转换。
177
+ - 第三个球体验证 Standard Surface 常用字段:`diffuse_roughness`、`emission * emission_color`、specular anisotropy/rotation、`coat_color` 衰减、`coat_IOR` F0 近似和 `subsurface` 受控透射近似。
178
+
179
+ 需要注意:官方仓库直接提供的是 `.mtlx` 测试资产,而 Viewer 当前入口是 USD。因此该回归验证的是“官方节点图语义的 USD 等价场景”,不宣称 Viewer 可直接加载任意 `.mtlx` 文件,也不替代 MaterialXView/MaterialX Graph Editor 的官方逐像素参考图。
180
+
181
+ 官方资产覆盖审计可通过以下命令重跑:
182
+
183
+ ```powershell
184
+ $env:MATERIALX_ROOT = "D:\path\to\MaterialX"
185
+ npm run audit:materialx --workspace @nebula-spatial/viewer
186
+ ```
187
+
188
+ 生成的 [MATERIALX-LIBRARY-AUDIT.md](./MATERIALX-LIBRARY-AUDIT.md) 会列出每个节点在
189
+ TestSuite 与 StandardSurface Examples 中的出现次数、官方 nodegroup、当前分类和适配边界。
190
+ 未知节点在 `--strict` 模式下会直接失败,避免新官方节点在没有覆盖决策时被静默遗漏。
191
+ Surface 输入表同时标注 `adapter-bounded` 或 `adapter-gap`,明确区分“可近似表达”和“当前不处理”。
192
+
193
+ 2026-11-12 对 MaterialX `9176de82` 的快照结果:168 个文件、157 个标准节点,其中
194
+ 2 个 bounded Surface Shader、24 个 conditional Adapter 节点、126 个 shader-required 节点、
195
+ 5 个结构化节点,0 个未分类节点;2 个官方 XML 样例因未转义 `<UDIM>` 或命名空间前缀无法由
196
+ 标准 XML parser 读取,会在报告中显式列出而不是静默跳过。
197
+
154
198
  ## 验证范围
155
199
 
156
200
  当前回归覆盖真实 `S18-17` 的 14 个源材质、19 个有效 group 材质路径和 0 个空 material slot,以及真实
@@ -164,6 +208,9 @@ USDZ/外置 `file_texture`、标签 alpha、`OmniPBRBase`、connected `OmniSurfa
164
208
  扩展标量的源通道和目标通道重排、A 通道写入、Loader 失效贴图替换与重复适配、双 `surface` 终端优先级、OpenPBR volume gap、
165
209
  MaterialX 薄壁/实体边界、OmniPBR ORM/AO 受限路径、OmniGlass 常量参数、OmniSurfaceBase
166
210
  薄壁透射、标准 `<UDIM>` 唯一 tile/多 tile atlas、glTF PBR color/normal lookup、法线纹理和玻璃单双面策略。
211
+ 另覆盖由官方 MaterialX `standard_surface_wood_tiled` 与 `stdlib/math/transform` 派生的真实 USD 球体模型,
212
+ 包括 `ND_tiledimage_*`、`ND_transformmatrix_vector2M3`、Standard Surface 常用常量、coat 色衰减、
213
+ specular anisotropy/rotation、subsurface 透射近似和最终纹理矩阵。
167
214
  另覆盖 `core_definitions.mdl::thin_translucent_v2` 的真实输入签名、sRGB 颜色纹理、
168
215
  `file_texture.mono` 亮度粗糙度和薄壁 `transmission` 有界近似。
169
216
  核心预设集成场景另覆盖 `diffuse`、`scratched_metal_v2`、`scratched_plastic_v2`、
@@ -3,7 +3,7 @@ var On = (n, t, e) => t in n ? Cn(n, t, { enumerable: !0, configurable: !0, writ
3
3
  var K = (n, t, e) => On(n, typeof t != "symbol" ? t + "" : t, e);
4
4
  import { Vector3 as U, Box3 as st, Matrix4 as mt, BufferAttribute as bn, Line3 as ct, Plane as An, Vector2 as ht, Triangle as Et, BackSide as Fn, DoubleSide as _n, REVISION as Sn, Ray as zn, FrontSide as He, Mesh as $t, LineSegments as Ve, LineLoop as Bn, Line as Tn, Points as Pn, Sphere as Vn, BatchedMesh as jn, LineBasicMaterial as $n, MeshBasicMaterial as kn, WireframeGeometry as qn, EdgesGeometry as we } from "three";
5
5
  import { disposeModelResources as Jn } from "./resources-CHhCm2f7.js";
6
- import { t as Lt, u as We, v as Hn, w as Wn, x as Yn, U as Xn, p as Gn } from "./index-BStaY4GZ.js";
6
+ import { t as Lt, u as We, v as Hn, w as Wn, x as Yn, U as Xn, p as Gn } from "./index-DbJbq4N_.js";
7
7
  const Zn = /* @__PURE__ */ new Set([
8
8
  "E_MJCF_INCLUDE_CYCLE",
9
9
  "E_MJCF_PARSE",