Files
workinf_Blender_Wasm/docs/status/N-017.md
2026-08-12 19:31:41 -04:00

47 lines
3.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# N-017 Paint 与权重
状态:`BLOCKED`stroke/patch schema、真实 Three raycast 命中、Main 顶点色/权重 transaction
已落地PBVH brush、texture paint 和 GPU/image 生命周期未实现)
## 已验证切片
1. N-017-A部分`PaintStrokeIR` 覆盖 Vertex Color、Weight、Texture Paint携带
object/revision、radius/strength、pressure、PBVH face/barycentric hit 和 UV hit。
2. N-017-A部分`WeightPatchIR` 覆盖有界 vertex index/value、normalize 和 mirror 意图。
3. 预算限制为单 stroke 100k samples/64 MiB 估算、单 weight patch 1M entries、单 texture
tile 256 MiB非法 barycentric、pressure、color、weight 和非有限数会结构化拒绝。
4. N-017-B部分`setVertexColors` 在单用户 Mesh 上创建/转换 `POINT``CORNER`
`FLOAT_COLOR` 属性,并更新 active color`setVertexWeights` 在真实 Object/Mesh 上创建顶点组、
写入/移除 `MDeformWeight`,支持逐顶点 normalize。
5. 顶点色和权重都已通过 Main undo/redo 与 `.blend` save/reopen`mirror:true` 在没有已验证
对称拓扑映射时返回 `CAPABILITY_MISSING`,不会伪造镜像结果。
6. `paintHitFromIntersection` 消费真实 Three `Raycaster` intersection按 indexed/non-indexed
triangle 解析顶点,输出对象/data stable ID、source face、局部 barycentric、世界法线、
插值 UV 与 pressure测试使用真实 BufferGeometry 射线,不注入伪命中。
7. Properties paint 面板消费 viewport 的真实 VERT selection可向选中顶点提交 `POINT`
`WebPaintColor` 和 vertex group weight每次操作只发一个既有 Main transaction继续使用
revision、undo/redo、save/reopen 边界。它不是 PBVH brush 或 texture paint。
8. N-017-A/C协议边界有界 CPU brush 对候选顶点执行 smoothstep falloff、遮挡标记过滤和
front-face 法线门;它不宣称 PBVH 加速或桌面 brush 等价。`UdimTilePatchIR` 约束 1001-1999
tile、RGBA8、色彩空间、尺寸/256 MiB 预算、revision、base/result SHA-256并在内存中验证
原子 range patch尚未绑定 Blender packed image/UDIM Main 写回与保存。
## 仍然阻断
- N-017-A真实 PBVH 加速结构、由深度缓冲生成的遮挡标记,以及 brush falloff 与桌面语义的
golden 对照;基础 Mesh/UV raycast hit 和有界 CPU 候选 falloff 已完成。
- N-017-Blimit/clean、已验证拓扑映射上的 mirror、桌面 brush/falloff 对照。
- N-017-CBlender packed/UDIM tile Main transaction、dirty tile、色彩转换和原子保存当前
只有内容哈希绑定的浏览器内存 patch 边界。
- N-017-D/Earmature golden、seam bleed、mask/selection、GPU dispose、quota、坏图和 UI。
## 验收
```bash
WEB_TEST_PORT=5203 npm --prefix web run test:e2e -- --grep "N-017 paint"
npm --prefix web run test:paint-roundtrip
```
`test:paint-roundtrip` 覆盖 CORNER color、vertex group patch、normalize、mirror 错误门、
undo/redo 与 save/reopen。