Q100149:为什么“等级”节点中的混合亮度滑块不是线性混合

关注

概括

许多客户询问为什么 Grade 节点混合亮度滑块不是线性混合。
以下是Nuke中 Grade 节点中混合亮度滑块背后的数学原理的解释。

更多信息

Nuke的 Grade 节点中的 mix_luminance 计算是通过首先使用 ITU-R BT.709 中详细介绍的转换公式(其中包括非线性伽玛编码)将 RGB 值转换为数字化 YPbPr 来实现的。混合亮度通过 mix_luminance 获得,作为颜色校正和非颜色校正亮度值之间的线性比,然后我们最终转换回 RGB。

在本示例中,RGB 值为 (0.5, 0.5, 0.5),未颜色校正的亮度计算为 0.694,颜色校正的亮度计算为 0.524。则混合亮度为:

0.5 * 0.694 + (1 - 0.5) * 0.524 = 0.609。

然后将其转换回 RGB 值,得到大约 (0.362, 0.362, 0.362)。

示例脚本将 Grade 节点与两个常量的直接溶解进行比较,其中混合是根据 RGB 值而不是亮度进行的。这就是结果不同的原因,因为亮度转换是非线性的。

如果将此示例脚本粘贴到Nuke中,它将有助于说明值的差异。

set cut_paste_input [stack 0]
Constant {
inputs 0
channels rgb
color 0.25
name Constant3
selected true
xpos -37
ypos -54
}
Constant {
inputs 0
channels rgb
color 0.5
name Constant2
selected true
xpos -128
ypos -52
}
Dissolve {
inputs 2
channels rgb
which 0.5
name Dissolve1
selected true
xpos -87
ypos 55
}
Constant {
inputs 0
channels rgb
color {0.5 0.5 0.5 0}
name Constant1
selected true
xpos -291
ypos -53
}
Grade {
white 0.5
mix_luminance 0.5
name Grade1
selected true
xpos -291
ypos 26
}

    我们很遗憾听到

    请告诉我们