- Added a proposal for depth surface strip cleanup, detailing the rationale and changes to the depth plane and cutout nodes. - Created specifications for the new cleanup requirements, including scenarios for strip removal and boundary edge detection. - Developed tasks for implementing shared strip detection logic and integrating new interfaces for depth nodes. - Established a new CLI structure for organizing node groups and model commands, replacing old entry points with a more intuitive command structure. - Introduced a prototype for panorama surface generation, including requirements for distance reconstruction and geometry node surfaces. - Added comprehensive tests for depth strip cleanup functionality, ensuring correct behavior for various mesh topologies and edge cases.
52 lines
2.5 KiB
Markdown
52 lines
2.5 KiB
Markdown
# 节点资产
|
||
|
||
## 构建节点资产
|
||
|
||
生产节点组由 `uv run build-nodes` 构建到 `src/anyimage/assets/O_AnyImage.blend`
|
||
|
||
节点组文件在 `tools/nodes/groups`
|
||
|
||
节点组规则:
|
||
|
||
- Group Input 按区域重复放置,Named Attribute 等字段入口就近读取;隐藏所有未使用输出,避免从远处拉线
|
||
- 跨区域暂存值用 Store Named Attribute 写入 `o_*` 命名空间,按用途分配前缀并明确 FACE、CORNER、POINT 域和存取时机;末尾用一个 Wildcard 模式的 Remove Named Attribute 清理该前缀,例如 `o_depth_*`,保留用户属性和 UV
|
||
- Capture Attribute 适合局部字段固定;若属性连线跨越多个步骤,改为命名属性,让计算分支独立展开
|
||
- 保留节点默认 `name` 和标题,不用 `label` 覆盖,不用 String 节点注解。Frame 仅用于确有包裹语义的区域
|
||
- 全接线的简单数学运算可折叠;需要阅读的常数、运算域和模式保持可见
|
||
- 修改器 Geometry Nodes 的输入 socket 默认使用 `SINGLE`
|
||
- socket `subtype` 按业务语义设置:长度用 `DISTANCE`,`0–1` 比例用 `FACTOR`,`0–100` 用 `PERCENTAGE`;无对应范围语义时保留默认
|
||
- 接口或布局变更须验证 socket 顺序与结构、未使用输出隐藏及几何求值;纯布局变更比较运算、默认值和实际连接,确认功能不变
|
||
|
||
|
||
## 资产清单
|
||
|
||
| 节点组 | 构建模块 |
|
||
| --- | --- |
|
||
| `O Image Plane` | `image_plane.py` |
|
||
| `O Image Depth Plane` | `image_depth_plane.py` |
|
||
| `O Image Relief Plane` | `image_relief_plane.py` |
|
||
| `O Image Layer` | `image_layer.py` |
|
||
| `O Image Depth Layer` | `image_depth_layer.py` |
|
||
| `O Shadeless` | `shadeless.py` |
|
||
| `O Image Cutout` | `image_cutout.py` |
|
||
| `O Image Depth Cutout` | `image_depth_cutout.py` |
|
||
| `O Image Depth Balloon` | `image_depth_balloon.py` |
|
||
|
||
|
||
## 构建资产脚本
|
||
|
||
`tools/nodes/build.py` 按依赖顺序构建资产,调用 `arrangement/` 统一排列几何节点组后保存。`common/` 提供共用构建函数,`preview/` 导出交互预览。
|
||
|
||
保存后,`check.py` 在独立 Blender 进程中重新加载资产并做基本几何求值。接口、默认值和详细几何行为由 `tests/` 检查。
|
||
|
||
```bash
|
||
uv run build-nodes --blender "/path/to/blender"
|
||
uv run build-nodes --skip-tests
|
||
```
|
||
|
||
脚本按 `--blender`、环境变量 `BLENDER_BIN`、项目 `.env`、`PATH` 的顺序查找 Blender。无法自动找到时,在项目根目录的 `.env` 中配置:
|
||
|
||
```dotenv
|
||
BLENDER_BIN="/absolute/path/to/blender"
|
||
```
|