13 KiB
13 KiB
N-015 非 Mesh 几何数据块
状态:BLOCKED / in_progress(VDB core 已覆盖 server、OPFS、Float32 WebGPU、显式 GPU 分页、
有限 grid 材质与 Main 属性重开;自动 demand paging 缺页重绘、联合重开和发布 golden 仍阻断)
更新时间:2026-08-14
当前声明
当前声明覆盖 Blender 5.2 .blend 中有限非 Mesh 数据的稳定识别、Main 权威写回、undo/redo、
保存重开、真实 evaluated mesh 报告和 WNM 二进制分块。Curve cyclic/handle 已有有界
属性读写、多目标选择、连续临时预览、handle-local gizmo 和单事务平移提交;未声明完整
topology editor。
Volume 采用“桌面/服务端 OpenVDB 转 NanoVDB,浏览器分块读取并以 WebGPU 渲染”的固定架构。
浏览器不直接解码 OpenVDB;当前已完成真实资源 catalog、独立 OpenVDB 13 -> NanoVDB 32 desktop
converter、受控 server job、转换/清单/分块协议、OPFS 绑定/重开、Float32 CPU/WGSL 树遍历、
有界体积积分、主线程/Offscreen 生产视口、显式 hash 校验 GPU 分页/LRU、有限 grid 材质和
Volume Main 属性保存重开。自动缺页重绘、联合重开和发布 golden 尚未完成,因此 N-015 整体保持
BLOCKED。
| 数据族 | Reader | Web 预览 | 当前门 |
|---|---|---|---|
| legacy Curve | 控制点、spline offset、resolution | WNM 控制折线;depsgraph 真 mesh | READY |
| legacy Surface | 控制点、spline offset、resolution | WNM 控制折线;depsgraph 真 mesh | READY |
| Font | body、对齐、extrude/bevel/offset 与摘要 | depsgraph 真 mesh(源文本仍保留) | READY(无控制笼) |
| Metaball | 元素类型、位置、半径、尺度 | bounded sphere proxy;depsgraph implicit mesh | READY |
| PointCloud | position/radius/POINT 属性 | WNM 分块 Points | READY(空数据为 summary-only) |
| Curves/Hair | position/radius/curve/POINT 属性 | WNM 分块 Points/curve line | READY(缺数据阻断) |
| Volume | path/grid metadata + VDB/NanoVDB 转换契约 | WebGPU 可渲染真实 density/color/temperature/emission;双生产视口已接入 | BLOCKED(自动缺页/联合恢复/golden) |
已实现任务
NonMeshDataIR加入 SceneIR schema 1,可选字段保持旧快照兼容。- parser 校验类型、状态、有限数、三元控制点、spline offset、Metaball 元素和错误码。
- native reader 为数据块生成稳定 ID,并把对象
dataId指向同一 ID;Web runtime 注册ID_MB、ID_PT和ID_VO,不再把三类对象降为 Empty。 - 单数据块最多读取 1M 点;越界或不完整数据返回
NON_MESH_DATA_BUDGET_EXCEEDED。 NonMeshGeometryChunkWNM schema 1 提供 65,536 点分块、SHA-256、属性 domain/storage、 256 MB 场景预算和 1M 点性能门;Worker/主线程/Offscreen 均传输并消费分块。- native reader 读取 PointCloud/Curves/Hair 的 position、radius、curve offset 和属性值,
不以摘要计数伪造点;Volume 保留项目路径和 OpenVDB grid metadata,raw
.vdb必须提交桌面/ 服务端转换,浏览器不接 OpenVDB decoder。 - depsgraph 对 Curve/Surface/Font/Metaball 通过
BKE_mesh_new_from_object输出真实位置、法线、 边/三角索引、UV、材质槽和 source face/edge mapping,并在 1M/2M 拓扑预算处结构化阻断。 Web ID registry 已注册ID_VF并在加载时恢复 Blender 未写入.blend的<builtin>字体 引用;Curve/Surface/Font/Metaball 的几何计数、边界、面积和位置/索引矩均通过 Blender 5.2 desktop golden。 - Main 已支持 Curve/Surface 控制点、resolution、有界 cyclic/handle 类型与 Bezier 左右 handle
坐标、Font body/geometry/layout 标量属性(spacing、line distance、word space、shear、font
size、x/y offset)、逐字符 kern/material/style flags 和最多 256 个 textbox、
.blend内已有/packed VFont 的 regular/bold/italic/bold-italic 四样式链接、 Metaball element 写回,以及 bounded Poly Curve create、delete、1D Poly/Bezier/NURBS conversion、 二维 Surface U/V dimensions/order/rational weight 网格替换和 Curve/Surface/Font/Metaball 数据块 重命名;一维多 spline 创建/删除/重排和批量 handle/cyclic 已由单个原子 Main 事务覆盖。 多 handle 选择、高亮和有界平移已由单个 Main transaction 覆盖;连续拖拽在主线程与 Offscreen Three 场景中做绝对坐标 preview,pointer cancel 恢复且 pointer up 只提交一次 Main。 handle-local gizmo 以所选 handle 质心为原点、控制点到 handle 的对齐平均切向为 X 轴, 构造稳定正交 Y/Z 轴并在两个 renderer 中投影。单用户、undo/redo、save/reopen 由check-nonmesh-roundtrip.mjs验证。 - 主线程与 OffscreenCanvas 对 PointCloud/Curve 控制点和 Bezier handle 代理提供 bounded raycast,并对 Mesh 的 VERT/EDGE/FACE 使用一致的三角顶点、边索引解析,回传既有 selection callback。selection history schema 2 覆盖跨对象、多 data block、多 element kind、revision/stale-hit、undo/redo 和有界 selected/unselected range patch,并兼容 schema 1。Bezier 左/右 handle 以全局控制点 映射独立拾取;多 handle 选择、高亮和有界平移经精确 Main 命令写回并通过 undo/redo、 save/reopen。连续 preview、局部轴投影和局部轴 Main delta 已接通。
queryNonMeshCapability(dataId)返回 N-015READY/BLOCKED与机器可读错误码;GLB 对未求值 非 Mesh 拒绝导出。Font/Metaball/二维 NURBS Surface 的 depsgraph 三角网格与 Curve 的 evaluated edge line primitive 已通过 GLB 导出和 Blender 5.2 桌面回导几何校验;零三角且零边的结果仍返回GLB_NON_MESH_UNMAPPED,不生成空 primitive。确定性 USDA 1.0 序列化器将三角求值写为UsdGeomMesh、edge-only 求值写为UsdGeomBasisCurves,缺 buffer/空场景结构化阻断;四对象 已通过 USD-enabled Blender 5.2.0 LTS desktop reimport。PointCloud 使用 GLBPOINTS/USDUsdGeomPoints,Curves/Hair 使用 GLBLINES/USDUsdGeomBasisCurves;radius 映射 USD widths,typed WNM 属性映射 primvars,GLB 属性损失结构化报告,7 对象 desktop reimport 已通过。 Volume 不生成 proxy 导出;GLB/USD 映射与 loss fixture 重新列入阻断切片。- Blender 5.2 fixture 已包含真实 PointCloud/Curves 属性;Chromium 主线程/Offscreen、真实 depsgraph、WNM 1M 性能测试均接入。
CurveGizmoDragIR为 PREVIEW/COMMIT 请求绑定 data ID、base revision、局部 axis vector、 轴向 delta 和最多 256 个去重 handle identity;UI gizmo 在单次 pointer commit 时先执行 stale revision、 重复 handle、有限坐标和预算校验;pointer move 仅更新 renderer 临时坐标,pointer cancel 恢复,pointer up 再合并为一次setCurveTopologyMain 事务。分块控制点会先按 point offset 重组为有界Float32Array,因此内联和二进制 Curve 使用同一局部坐标契约。- 当前 WASM build 保持
WITH_OPENVDB=OFF。VDBConversionRequestIR记录源 hash、grid allowlist、量化、chunk size、desktop/server converter identity;NanoVDBBundleManifestIR校验 grid type/class/semantic、transform/bounds、材质映射、连续 32-byte 对齐 range、逐块与 整包 SHA-256、CPU/GPU 预算。raw VDB 浏览器门固定返回VDB_CONVERSION_REQUIRED。 - 浏览器
streamNanoVDBChunks已按 range 串行读取、逐块复验和报告进度;HTTP adapter 严格要求206 Content-Range,对临时状态/网络异常有界重试,并以稳定 ETag/If-Range从中断 body 的 精确偏移续传;ETag 改变、错位 range 和短响应均阻断。协议 fixture 不冒充 native decoder。 - 独立
tools/vdbnative target 已实际链接 OpenVDB 13.0/TBB,调用 NanoVDB 32.9 adapter 转换真实多 grid fog、level set、大 bounds 稀疏体和 CC-BY-4.0 官方 sphere;转换 report 记录 segment/payload range、type/class、transform、bounds 和 active voxel。资源库 14 条记录均绑定 license/origin/byte length/SHA-256;截断 VDB 被真实 reader 拒绝,语义相同但 UUID 不同的源得到 相同 NanoVDB bundle hash。 - 受控 server job 已覆盖 content-hash 幂等、bubblewrap/只读 root/资源限制、进度、超时、取消、 原子输出和 HMAC 构件签名;相同输入的 desktop/server bundle hash 一致。
- OPFS 已覆盖逐块复验、staging 原子提交、内容去重、取消/残留恢复、source/converter/shader binding 失效、Worker 重开和 bundle LRU;真实 15 MiB NanoVDB bundle 已通过重开复验。读取时 再验 chunk hash,chunk tamper、有效结构的 manifest rollback、真实 quota 和旧 bundle 保持均通过。
- Float32 NanoVDB 已有 CPU reference 与 WGSL root/internal/leaf 遍历,native/CPU/GPU 固定点值和 active 状态一致;Chromium WebGPU 有界积分输出确定性 96x96 image hash。
- Volume source/display/interpolation/step/velocity 属性已写入 Blender Main,并通过 undo/redo、 save/reopen;它不等于 Principled Volume 完整节点语义。
- GPU grid 支持初始空驻留、经 manifest chunk hash 校验的显式单页加载、页表间接寻址、确定性
LRU 替换和设备重建后按需页重放;多材质 grid 按同一 manifest
maxResidentBytes分配页槽, Chromium 以 GPU 数据读取验证被触碰页保留、旧页淘汰和恢复后内容一致。
后续分解
- N-015-C1:按 handle 本地原点/方向放置的专用 gizmo UI、连续多 handle 拖拽 preview、 多 handle 选择、高亮、局部轴单事务平移、 多 spline 创建/删除/重排、批量 handle/cyclic editor transaction 和二维 Surface U/V topology/order/rational weight 网格替换已完成;完整 topology editor 不在本切片声明内。
- N-015-C2:任意外部路径的新字体导入与资源沙箱;已有/packed VFont 的四 style link Main 写回、字符级样式、kern/material 与 textbox 已完成并通过 PFB desktop/WASM golden。
- N-015-D1:跨对象 selection history、多目标 element identity、range patch、左右 handle raycast、多 handle preview、handle-local gizmo 与单次 Main 写回已完成。
- N-015-D2:evaluated preview 与源控制笼分层显示、WebGPU 等价。
- N-015-B3/D2/E1(Volume):真实资源、desktop/server converter、可续传 HTTP range、OPFS、 有界网络/Worker/quota/tamper/device-loss 故障门、Float32 WGSL core、有限 grid 材质、显式 GPU 分页/LRU、resident/page-table OOM 恢复和 Main Volume 属性重开已完成;继续执行自动缺页重绘、联合恢复、GLB/USD loss、大 bundle 和 desktop/Chromium golden,未完成项保持阻断。
- N-015-E2:100k/1M WASM/GPU 内存、Worker restart 和 Chromium OPFS quota;Chromium 64 KiB 真实 quota、失败后旧 revision 保持、Worker restart 恢复已通过。后续浏览器验收 仅以 Chromium 为基线,不配置 Firefox/WebKit。
停止条件
summary-only不得进入READY。- legacy 控制折线不得标记为 evaluated/tessellated curve。
- Metaball sphere proxy 不得用于导出或保存为求值曲面。
- Volume/VDB 不得生成占位几何;协议 fixture 不得作为真实 decoder/renderer 证据。
- 浏览器构建不得通过开启
WITH_OPENVDB绕过 desktop/server 转换边界。 - 自动缺页重绘、联合恢复、完整故障门和发布 golden 未齐前,VDB 与 N-015 保持
BLOCKED。 - Metaball sphere proxy 不得进入 GLB;GLB 只能消费 depsgraph evaluated mesh。
- 任意新增 Main authoring 命令在 save/reopen 与 undo/redo 完成前不得开放 UI。
验收命令
source tools/web/emscripten-env.sh
cmake --build build_web_blender6 --target web_engine -- -j8
bash tools/web/install-web-engine-assets.sh
build_blender_5.2.0/bin/blender -b --factory-startup \
--python tools/web/generate-nonmesh-fixture.py -- tests/files/web/nonmesh_scene.blend
npm --prefix web run typecheck
npm --prefix web run lint
npm --prefix web run test:nonmesh-roundtrip
npm --prefix web run test:nonmesh-desktop-golden
npm --prefix web run test:nonmesh-glb-blender-roundtrip
npm --prefix web run test:nonmesh-usd-serialization
BLENDER_BIN=/path/to/usd-enabled/blender \
npm --prefix web run test:nonmesh-usd-blender-roundtrip
npm --prefix web run test:nonmesh-binary
npm --prefix web run test:nonmesh-interaction
npm --prefix web run test:vdb
npm --prefix web run test:vdb-availability
npm --prefix web run test:vdb-native
npm --prefix web run test:vdb-server
npm --prefix web run test:vdb-opfs
npm --prefix web run test:vdb-webgpu
npm --prefix web run test:vdb-viewport
npm --prefix web run test:vdb-faults
WEB_TEST_PORT=5349 npm --prefix web run test:e2e -- -g "real OPFS quota|reports quota exhaustion"
WEB_TEST_PORT=5201 npm --prefix web run test:e2e -- -g "N-015|non-mesh"