Files
AnyImage/docs/remove-background.md
nan 988332548e Add tests for clipboard image functionality and mesh plane asset creation
- Implemented a comprehensive test suite for the clipboard image module, covering various functionalities including operator registration, context handling, and image processing.
- Created a new mesh plane asset with customizable parameters and integrated it into the geometry node system.
- Developed a validation script to ensure the correct behavior of the mesh plane asset, including input handling and output verification.
2026-08-22 09:49:00 +08:00

1.8 KiB
Raw Blame History

去除背景

Remove Background 使用 BEN2 为 Image Empty 生成透明前景,不创建网格。它适合在转换前检查抠图效果,或继续把结果当作普通 Image Empty 使用。

使用方法

  1. 选中 Image Empty。
  2. 在 3D View 中右键,选择 AnyImage > Remove Background。
  3. 等待状态栏提示任务完成。

AnyImage 会创建新的透明颜色图,并把当前 Empty 切换到新图。对象的 Transform、显示尺寸、Offset 和其他显示设置保持不变。

在转换时去除背景

Depth Plane 和 Surface 的转换对话框也提供 Remove Background:

  • Depth Plane 会使用透明 Alpha 区分前景和背景深度。
  • Surface 会在写出网格前删除背景三角面。
  • 深度估算仍使用未经抠图的原始 RGB,避免透明区域提前影响模型判断。

图片、视频和序列帧

普通图片会得到一张透明 PNG。视频或序列帧会得到透明图片序列,并从源 Empty 的 Start 位置开始播放。处理范围跟随 Image Frames 和 Offset。

!!! note 动画结果引用 Storage Root 中任务目录里的序列帧。不要在仍使用这些素材时删除对应的 Job 文件夹。

常见问题

Remove Background 是灰色的

确认 Environment 已安装,且 MoGe-2 ViT-S Normal 与 BEN2 Base 都显示 Ready。正式功能会等默认必需模型全部就绪后启用。

透明边缘需要调整

当前正式入口不提供 BEN2 refinement 参数。可以在结果材质中继续处理 Alpha,或在外部图像软件中修整生成的颜色图。

输入图片已有 Alpha 时,AnyImage 会先用该 Alpha 遮住 BEN2 推理输入中的透明 RGB,再将结果 Alpha 计算为“输入 Alpha × BEN2 Alpha”。因此 Image Box / Lasso 或外部工具创建的透明范围不会被去背景重新扩张;软边缘也会继续保留。