Files
AnyImage/docs/internals/outputs.md
nan 4c902ed7db feat(node_assets): add image plane geometry nodes and validation scripts
- Implemented `image_plane.py` to build the Image Plane Geometry Nodes group with customizable parameters for geometry, subdivide, and thickness.
- Created `image_plane_validation.py` to validate the functionality of the image plane, ensuring correct geometry generation and material assignment.
- Developed `material_layers.py` to construct shader node groups for image materials, including depth and normal handling.
- Authored `plane_layouts.py` to define node arrangements for image geometry assets.
- Introduced `shadeless.py` to create a shadeless shader node group that displays color without scene lighting while preserving shadows and reflections.
2026-09-08 23:24:27 +08:00

2.3 KiB
Raw Blame History

Job 产物

Server 把结果写入 Job 目录,返回以相对文件名为值的字典。Blender 主线程通过 JobResult 读取文件,再创建或更新 Image、Mesh、Material 和 Object。

Job 文件 消费方
remove-background image.0001.png 起 Image Empty 替换
upscale-image upscale.0001.png 起 2× Image Empty 替换
generate-depth-plane-geometry image.0001.*、depth.exr、depth.json、tangent-normal.png Plane 对象与材质
generate-cutout-artifacts 按请求提供深度、元数据和法线 Cutout 对象与材质

深度与法线协议

返回字段 文件 内容
depth depth.exr float32 RGB 保存相机空间 XYZ,Alpha 保存 Validity
depth_metadata depth.json image_size、3×3 intrinsics、reference_depth
tangent_normal tangent-normal.png 切线空间法线
object_normal object-normal.png Cutout 原生 XY / Z 坐标的对象空间法线
flowchart TD
    A[矩形源 RGBA] --> B[限尺寸并合成黑底模型输入]
    B --> C[MoGe-2 GeometryFrame]
    C --> D[原预测生成 Normal]
    C --> E{Cutout 深度?}
    E -- 是 --> F[按源 Alpha 延展轮廓深度]
    E -- 否 --> G[完整相机 Points]
    F --> G
    G --> H[depth.exr 与 depth.json]
    D --> I[Blender 加载并 Pack]
    H --> I

depth_texture.py 保存完整有限 Points;模型 Mask 转为 0/1 Validity。参考深度取有效、有限、正深度且满足源 Alpha 条件的样本中位数:整图使用 Alpha ≥ 0.1,Cutout 使用所选 Alpha Threshold 并要求 Alpha > 0。非法字段和空参考区域抛出错误。

common/depth.py 加载深度并配置 Non-Color、CHANNEL_PACKED 与 Pack。Relief 和 Depth Balloon 读取 B/Z,Camera 与 Depth Solid 读取 XYZ,共用同一 EXR。

Selection 与颜色

Cutout 提交几何 bounds 内的原始 RGBA。Blender 在创建网格时组合源 Alpha 和 SelectionMask;颜色图保留矩形源 RGBA,法线可见区域取源 Alpha。AI 分析尺寸与颜色分辨率分别处理。

Remove Background、Upscale、Frame、Mask、Rectify 通过 common/image.py 的编辑结果入口保留源 Image 名称和共享引用语义。Plane 与 Cutout 的材质贴图使用 Color、Depth、Normal 命名函数。