Files
AnyImage/docs/internals/operators/convert-to-plane.md
nan f5aff50b13 Refactor and clean up codebase by removing unused functions and reorganizing imports
- Removed unused model keys and functions from properties.py.
- Deleted projection.py as its functions were no longer needed.
- Cleaned up model_catalog.py by removing unused model directory function.
- Updated imports in various test files to reflect new module structure.
- Removed deprecated test cases related to image editing tools.
- Added new tests for ONNX runtime provider selection logic.
2026-09-09 10:31:56 +08:00

24 lines
1.5 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.
# Plane 转换
`operators/convert_to_plane/operators.py` 提供 `ConvertToPlane`、`ConvertToDepthPlane` 与 `GenerateDepthPlane`。对象和材质导入位于 `object.py`,基础矩形网格位于 `image_plane.py`。
```mermaid
flowchart TD
A[Image Empty] --> B{转换类型}
B -- Plane --> C[复制 Color 与动画设置]
C --> D[中心原点四边形与 O Image Plane]
B -- Depth Plane --> E[检查静态图与 AI 就绪状态]
E --> F[generate-depth-plane-geometry]
F --> G[Color、depth.exr、depth.json、Tangent Normal]
G --> H[加载并 Pack 数据]
H --> I[O Image Depth Plane 与材质]
D --> J[替换源 Empty 并保留世界位置]
I --> J
```
普通 Plane 支持图片、视频和序列,材质保留 Image User 帧设置。基础四边形以局部中心为原点,对象矩阵补偿原 Image Empty 显示范围;节点组生成细分与厚度,材质位于 Mesh 第 0 个槽。
Depth Plane 从 Preferences 取得 MoGe-2 模型、分辨率级别与 AI 输入上限,一次推理生成相机 XYZ 深度和切线法线。`create_depth_plane_from_result()` 创建颜色材质与深度修改器,并在失败时清理未使用的数据块。
`O Image Depth Plane` 提供默认 Relief 和 Camera:Relief 读取深度 Z 形成固定底面的地形;Camera 使用相机 XYZ 投影并沿平滑法线形成壳。两个模式各自保存 Thickness。完整接口见[节点资产](../node-assets.md),文件协议见[Job 产物](../outputs.md)。