Alpha上叠节点

../../../_images/compositing_node-types_CompositorNodeAlphaOver.png

Alpha上叠节点。

The Alpha Over node is used to layer images on top of one another. Where the foreground image pixels have an alpha greater than 0, it will be overlaid over the background image.

输入

系数

控制前景图像的透明程度。小于 1 的参数将使前景图像变得更加透明。

图像

背景 图像输入端。

图像

前景 图像的输入。

属性

转换预乘

将前景图像转为预乘alpha格式。

Alpha上叠 节点旨在配合 预乘 alpha 颜色格式使用。当您知道图像具有直通型 alpha 颜色值时,请使用 转换预乘 执行正确的上叠操作。结果仍是预乘 alpha。

Alpha通道

预乘

Premul 滑块允许在使用 预乘非预乘 alpha 之间进行混合。

设置为 1 时,前景颜色值将乘以 alpha,即预乘。这相当于启用 转换预乘 选项。设置为 0 时,颜色值不会更改。

如果 [预乘] 不是零,则 转换预乘 将被忽略。

Note

这是一个旧版选项。

输出

图像

标准化图像输出。

范例

Overlay

在下图的节点树层次中,颜色渐变 节点被用于给黑白漩涡图像添加alpha通道。Alpha 上叠 节点被用于将其叠加在另一个图像之上。

../../../_images/compositing_types_converter_color-ramp_create-alpha-mask.png

使用Alpha上叠节点合成图像。

Fade In

In the next example, the Factor is used to make a “Fade In” effect. This effect can be animated by adding a Time node to feed the Factor socket as shown below. Over the course of 30 frames, the Alpha Over node outputs a image that starts with the pure background image, and the title slowly appearing.

../../../_images/compositing_types_color_alpha-over_example.png

使用alpha上叠的动画淡出效果。

请注意 转换预乘 复选框被启用,因为前景使用具有 直通型 alpha 的 PNG 图像。