Implement arrangement framework for node groups

- Introduced `frames.py` to manage field complex calculations and their arrangement within node groups.
- Added functionality to create and remove field frames based on node arrangements.
- Developed `passages.py` to find unobstructed paths for connections around calculation frames.
- Implemented `references.py` to route shared results on peripheral tracks, ensuring efficient distribution of outputs.
- Created `sections.py` to reserve space for field calculations adjacent to geometry consumers.
- Added `sources.py` to position shared calculation sources effectively beside their distribution channels.
- Enhanced outline smoothing with `outline_smoothing.py` to adapt camera depth along original outlines.
This commit is contained in:
2026-09-12 12:19:07 +08:00
parent dd32ccdc44
commit 5b2dc59f79
57 changed files with 2253 additions and 700 deletions

View File

@@ -2,12 +2,12 @@
### Requirement: Shared Boundary Smooth control
`O Image Depth Cutout`、`O Image Depth Plane`、`O Image Depth Panorama` SHALL 使用同一 `Boundary Smooth` 输入控制边界深度 Blur 和现有边界网格平滑的迭代数,默认值为 5,范围为 0–20,并保留该输入的既有标识。
`O Image Depth Cutout`、`O Image Depth Plane`、`O Image Depth Panorama` SHALL 保留 `Boundary Smooth` 输入,Depth Cutout 默认值为 2,另外两组为 5;Cutout 范围为 1–20,另外两组为 0–20。Depth Cutout 使用它控制每轮深度 Blur 的步数和现有边界网格平滑次数;另外两组使用它控制深度 Blur 与网格平滑次数。
#### Scenario: Positive iteration count
- **WHEN** 用户将任一组的 Boundary Smooth 设为 12
- **THEN** 深度 Blur 和现有边界网格平滑均使用 12 次迭代
- **AND** 修改器只提供现有 Boundary Smooth 控制项
- **THEN** 每批深度 Blur 和现有边界网格平滑均使用 12 次迭代
- **AND** Depth Cutout 的批次数由 Outline Depth Fix 控制
#### Scenario: Disabled smoothing
- **WHEN** Boundary Smooth 为 0
@@ -16,7 +16,7 @@
### Requirement: Topology-local scalar smoothing
系统 SHALL 在有效性剔除及 Split 后、投影前的网格 Point 域对深度标量执行 Weight 为 0.5 的 Blur,并在可处理边界及邻近两圈内应用结果。边界影响权重 SHALL 由边界字段的 2 次 Weight 为 1 的 Blur 与原边界字段取最大值后,排除保护点得到。
系统 SHALL 在有效性剔除及 Split 后、投影前的网格 Point 域对深度标量执行 Blur,并在可处理边界及邻近两圈内应用结果。Depth Plane 和 Panorama 的 Blur Weight 为 0.5;Depth Cutout 使用当前残差计算的自适应权重。边界影响范围 SHALL 由边界字段的 2 次 Weight 为 1 的 Blur 与原边界字段取最大值后,排除保护点得到。
#### Scenario: Isolated boundary spike
- **WHEN** 原本平缓的表面在一个可处理边界点具有深度尖刺并启用 Boundary Smooth
@@ -33,7 +33,18 @@
### Requirement: Cutout silhouette depth smoothing
Depth Cutout SHALL 将原 Alpha 轮廓和 Split 后的新边界纳入深度平滑,并保留现有后置网格平滑的原轮廓保护规则。
Depth Cutout SHALL 仅将原 Alpha 轮廓及内侧两圈纳入自适应深度平滑,保护 Split 切边及其与原轮廓的交点。后置网格平滑保持既有职责。对外轮廓术语 SHALL 统一使用 Outline,与 Fine Outline 一致。
#### Scenario: Adaptive batches
- **WHEN** Outline Depth Fix 大于 0 且 Boundary Smooth 大于 0
- **THEN** 每轮根据当前相机深度与 Weight 0.5 的一步 Blur 之差,乘 Uniform Scale 后除以置换前、Split 清理后所有网格边长的中位数
- **AND** Ratio 固定以 0.25–0.5 的 Smoothstep 映射到 0–1,并乘轮廓影响范围
- **AND** Weight 不再 Blur,批内固定使用 Boundary Smooth 次,每轮重新计算
- **AND** Outline Depth Fix 默认 16,范围 0–200;0 关闭轮廓深度处理
#### Scenario: Split boundary preservation
- **WHEN** Split 在原轮廓内形成新的切边
- **THEN** 深度平滑保持这些切边的相机采样不变,包括与原轮廓相交的切分点
#### Scenario: Fine Outline with zero thickness
- **WHEN** Fine Outline 的原轮廓存在异常深度,Thickness 为 0 且 Boundary Smooth 大于 0
@@ -88,3 +99,21 @@ Cutout 和 Depth Plane SHALL 在深度平滑阶段保持原相机射线,通过
- **WHEN** 执行节点资产构建并在独立 Blender 进程中重新加载保存资产
- **THEN** 资产与源码构建结果通过相同的行为验证
- **AND** 公共参数、节点连接和 Capture 禁用检查通过
### Requirement: Simplified Cutout shaping controls
Depth Cutout SHALL 固定前后法线平滑为 100 次,原联动宽范围滤波固定为 512 次;移除 Normal Smooth 输入。系统 SHALL 删除 Edge Round 输入及对应前表面位移、厚度补偿和圆化字段,保留 Split 基础收口。
#### Scenario: Reduced interface
- **WHEN** 新建 Depth Cutout
- **THEN** Outline Depth Fix 默认 16、Boundary Smooth 默认 2
- **AND** 输入中没有 Edge Round、Normal Smooth 或 Outline Smooth Iterations
### Requirement: Cutout Options order and inflation factor
Depth Cutout 的 Options SHALL 按 Cleanup Threshold、Smooth Weight、Reference Depth、Boundary Smooth、Outline Depth Fix、Front Inflation 排列。Front Inflation SHALL 为 0–1 Factor、默认 0;Boundary Smooth SHALL 为 1–20、默认 2。
#### Scenario: New Cutout defaults
- **WHEN** 新建 Depth Cutout
- **THEN** Front Inflation 为 0,Boundary Smooth 不能从界面设为小于 1
- **AND** Outline Depth Fix 保持默认 16