Add new tests and functionality for image processing and geometry handling
- Introduced color_image.py for preparing standalone color images for tests. - Added hdr_image.py to create HDR textures for testing. - Implemented test_image_depth_panorama.py to evaluate panorama topology, UVs, and depth discontinuities. - Created test_shadeless.py to validate the opacity and HDR color endpoints of the Shadeless group. - Developed moge3_export.py for exporting dynamic MoGe-3 backbone and ONNX graphs. - Added material.py to inherit material slots onto generated geometry. - Built image_depth_panorama.py to construct a quad panorama with depth separation and sampling.
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
## ADDED Requirements
|
||||
|
||||
### Requirement: Image Empty panorama conversion entry
|
||||
|
||||
系统 SHALL 在 Image Empty 的 AnyImage 右键菜单展示 `Convert to Panorama`,调用 `anyimage.convert_to_panorama`。
|
||||
|
||||
#### Scenario: Select panorama conversion
|
||||
- **WHEN** 用户选中静态 2:1 Image Empty 并选择 Convert to Panorama
|
||||
- **THEN** 提交当前图片及 Alpha 的全景生成任务,使用 Preferences 中的模型、推理级别和分析尺寸
|
||||
|
||||
#### Scenario: Unsupported image
|
||||
- **WHEN** 输入是动画、视频或非 2:1 图片
|
||||
- **THEN** 提示输入限制并保留源对象
|
||||
|
||||
### Requirement: Consume current image alpha
|
||||
|
||||
转换 SHALL 直接使用当前源图及 Alpha。背景处理由用户通过现有 Remove Background 完成。
|
||||
|
||||
#### Scenario: Already removed background
|
||||
- **WHEN** 源 Empty 的天空已透明
|
||||
- **THEN** 当前 Alpha 进入全景任务,转换过程中只运行几何模型
|
||||
|
||||
### Requirement: Complete conversion transaction
|
||||
|
||||
系统 SHALL 在主线程加载结果、打包贴图并创建节点对象,成功后替换源 Empty,并提供完整撤销。
|
||||
|
||||
#### Scenario: Successful conversion
|
||||
- **WHEN** Job 返回有效产物
|
||||
- **THEN** 创建使用 O Image Panorama 的对象,继承源 Empty 世界变换并以其原点为拍摄中心,激活结果并支持撤销恢复源对象
|
||||
|
||||
#### Scenario: Cancelled or failed conversion
|
||||
- **WHEN** 任务失败、取消或响应时源对象已失效
|
||||
- **THEN** 清理本任务暂存及未使用数据块,不应用部分转换结果
|
||||
@@ -0,0 +1,33 @@
|
||||
## ADDED Requirements
|
||||
|
||||
### Requirement: Generate panoramic radial distance
|
||||
|
||||
Server SHALL 从当前 RGBA 全景生成 12 个重叠的 90 度透视视图,使用已知 FOV 恢复 MoGe2 几何并融合为横向周期的径向距离场。
|
||||
|
||||
#### Scenario: Continuous panorama
|
||||
- **WHEN** 输入包含跨越 U=0/1 的连续表面
|
||||
- **THEN** 两侧使用同一周期求解,产出有限正距离且无额外拼接断层
|
||||
|
||||
#### Scenario: Invalid views and cancellation
|
||||
- **WHEN** 部分视图全透明或模型无有效预测
|
||||
- **THEN** 利用其余有效观测完成融合,全局无有效几何时返回明确错误,并在视图与融合阶段响应取消
|
||||
|
||||
### Requirement: Export combined depth alpha
|
||||
|
||||
系统 SHALL 返回颜色文件、`depth.exr` 与 `depth.json`。深度 RGB 保存径向距离,Alpha 在导出时一次合成融合 Mask × 源 Alpha;元数据 SHALL 标明等距柱状投影、深度图尺寸和参考距离。
|
||||
|
||||
#### Scenario: Transparent background
|
||||
- **WHEN** 源图某区域 Alpha 为零
|
||||
- **THEN** 该区域深度 EXR Alpha 为零,颜色文件保留源 Alpha
|
||||
|
||||
#### Scenario: Fractional alpha
|
||||
- **WHEN** 有效模型 Mask 为 1 且源 Alpha 为 0.5
|
||||
- **THEN** 深度导出 Alpha 为 0.5,几何端直接消费该值
|
||||
|
||||
### Requirement: Use managed production runtime
|
||||
|
||||
全景生成 SHALL 使用现有模型会话、Preferences 配置和 Job 生命周期;Job 参数可序列化,Server 与 Blender 数据保持进程边界。
|
||||
|
||||
#### Scenario: Configured inference
|
||||
- **WHEN** 用户修改模型或推理分辨率级别后发起转换
|
||||
- **THEN** 新任务采用配置值,最终网格细分仍由独立 Subdivide 参数控制
|
||||
@@ -0,0 +1,41 @@
|
||||
## ADDED Requirements
|
||||
|
||||
### Requirement: Editable Quad Sphere surface
|
||||
|
||||
系统 SHALL 提供资产 `O Image Panorama`,使用全四边面 Quad Sphere,并提供 Subdivide、Depth Scale、Validity Threshold 和 Split Threshold。几何节点 SHALL 只有一个深度图片输入。
|
||||
|
||||
#### Scenario: Sphere and depth endpoints
|
||||
- **WHEN** 所有样本有效且 Split Threshold 为 0
|
||||
- **THEN** Subdivide=n 产生 6×4^n 个四边面,Depth Scale=0 为单位球,Depth Scale=1 为预测径向距离表面
|
||||
|
||||
#### Scenario: Validity culling
|
||||
- **WHEN** 深度 EXR Alpha 低于 Validity Threshold
|
||||
- **THEN** 按 Depth Plane 的点域布尔字段与面域删除方式剔除对应区域
|
||||
|
||||
### Requirement: Depth Plane split semantics
|
||||
|
||||
全景 SHALL 复用 Depth Plane 的相邻面深度差判断、内边分裂、面角深度重定位和条带面清理机制,并使用参考距离归一化的径向距离适配球面。
|
||||
|
||||
#### Scenario: Disabled splitting
|
||||
- **WHEN** Split Threshold 为 0
|
||||
- **THEN** 分裂与条带清理完全旁路,有效性剔除保持生效
|
||||
|
||||
#### Scenario: Foreground depth discontinuity
|
||||
- **WHEN** 相邻有效面的归一化距离跳变达到分裂条件
|
||||
- **THEN** 分离选中的内边,断层附近面角沿原球面射线使用所属面的距离,未选中顶点保持原始深度采样
|
||||
|
||||
#### Scenario: Threshold and scale consistency
|
||||
- **WHEN** 增大 Split Threshold 或对所有距离与参考距离同时乘以相同正比例
|
||||
- **THEN** 增大阈值不会减少被选中的断层边,等比例距离变化不会改变断层边选择
|
||||
|
||||
#### Scenario: Seam and strip cleanup
|
||||
- **WHEN** 深度断层跨越全景经度接缝或分裂产生孤立条带
|
||||
- **THEN** 经度接缝采用周期采样,面角 UV 保持正确,条带面按 Depth Plane 的同一拓扑快照规则清理
|
||||
|
||||
### Requirement: Packaged node assets
|
||||
|
||||
生产节点组及 Quad Sphere 子组 SHALL 包含在 `O_AnyImage.blend` 中,通过现有加载入口使用。
|
||||
|
||||
#### Scenario: Reopen converted object
|
||||
- **WHEN** 在新 Blender 进程重新打开转换后的文件
|
||||
- **THEN** 无需访问原型目录或外部参考库即可求值,贴图、细分、Depth Scale 和 Split Threshold 均正常工作
|
||||
Reference in New Issue
Block a user