Cryptomatte节点

../../../_images/compositing_node-types_CompositorNodeCryptomatte.png

Cryptomatte 节点

The Cryptomatte node uses the Cryptomatte standard to efficiently create mattes for compositing. Cycles outputs the required render passes, which can then be used in the Compositor or another Compositor with Cryptomatte support to create masks for specified objects.

与材质和对象索引通道不同,要隔离的对象在合成过程中被选中,遮罩将具有抗锯齿特性,并考虑运动模糊和透明度等效果。

输入

图像

标准图像输入

Crypto 通道

每个crypto层都将获得其自己的渲染通道;个渲染通道都必须连接到这些crypto层的输入之一。默认情况下,只有4个图层,请参阅 添加/移除 层 以添加更多图层。

参数

添加/移除

通过从 选取 输出中选取颜色,从蒙版中添加/移除对象或材质。

蒙版ID

要包含在蒙版中的对象和材质的 crypto ID 列表。例如,这可用于通过删除文本来删除所有蒙版,或用于从其他软件复制和粘贴 crypto ID。

输出

图像

输入图像的一个彩色输出结果,仅选定的图层应用了蒙版。

蒙版

选定 crypto 层的一个黑白 alpha 遮罩。

选取

Cryptomatte 通道的彩色表示形式,可与查看器节点一起使用,以选择哪些 crypto 通道用于创建蒙版图像。

用法

  1. 启用通道面板中的 Cryptomatte 对象渲染通道,并渲染。
  2. 在合成节点中,创建一个 Cryptomatte 节点,并将渲染图层匹配图像和 Cryptomatte 通道和它链接。
  3. 将查看器节点附加到 Cryptomatte 节点的拾取输出。
  4. 使用 Cryptomatte 添加/移除按钮来在选取查看器系节点中取样对象。
  5. 使用 Cryptomatte 节点的蒙版输出来获取alpha遮罩。

添加/移除 层

默认情况下,只有4个crypto层可作为 Cryptomatte 节点的输入。您可以通过 侧栏 ‣ 条目 ‣ 属性 ‣ 添加/移除Crypto层 来添加或移除图层。这些操作符将从渲染通道输入的的底部添加/移除图层。

示例

在下面的示例中,您可以看到右侧的通道输出。在左侧,您可以看到几个通过 Cryptomatte 节点选择的对象。请注意左侧立方体有一个球形的切口,即为Cryptomatte节点未选择的球。

../../../_images/compositing_types_matte_cryptomatte_example.png