Cryptomatte 默认使用了 Asset,Object 以及 Material 三种 ID,但实际生产中,往往可能需要自定义些其它类型 ID,Cryptomatte 也支持使用自定义属性来区分 ID。
创建 cryptomatte 节点
创建一个 Arnold shader network,在其中创建 AOV Output 以及 cryptomatte 节点,在 cryptomatte 的 user 中,添加自定的 AOV 名称以及 ID 属性名称:

给物体添加 string 类型属性
使用 Attribute Wrangle,在 primitives 上添加字符串属性,属性名称就来自于之前 cryptomatte 定义的 data 的名称。

在渲染输出中添加对应 AOV
在 Arnold output 设置中,在 AOV Shader 接入之前创建的 aov 节点,并创建 AOV 输出,选择之前定义的 AOV 名称选项。
