Z通道合成节点

../../../_images/compositing_node-types_CompositorNodeZcombine.png

Z通道合成节点。

Z通道合成节点基于图像的Z通道信息将两个图像进行合并。通过检测发现哪个图像在上面,将其Z通道值进行覆盖叠加到另一幅图像的Z通道上。

输入

图像

背景图像。

Z通道

背景图像的Z深度通道。

图像

前景图像。

Z通道

前景图像的Z深度通道。

属性

使用 Alpha

“选定”图像像素的alpha通道被执行操作。如果像素的部分或整体是透明的,Z通道合成的结果也会呈现局部透明的效果;在这种情况下,背景图像将穿透前景(“选定”)图像像素显示出来。

Z通道抗锯齿

应用 抗锯齿 高对比度图像产生人为的锐利图像边界或范围。

输出

图像

如果两个Z深度通道是相同的,使用前景图像的Z深度通道值。关于如何决定两个Z深度通道被取舍和使用的详细信息,参见 Z缓冲

Z通道

Z通道合成节点允许多个同类节点相连接。

范例

../../../_images/compositing_types_color_z-combine_example-1.png

选取临近像素。

In the example above, the render output from two scenes are mixed using the Z Combine node, one from a sphere of size 1.3, and the other a cube of size 1.0. The sphere and square are located at the same place. The cube is tipped forward, so the corner in the center is closer to the camera than the sphere surface; so Z Combine chooses to use the cube’s pixels. But the sphere is slightly larger (a size of 1.3 versus 1.0), so it does not fit totally inside the cube. At some point, as the cube’s sides recede back away from the camera, the sphere’s sides are closer. When this happens, Z Combine uses the sphere’s pixels to form the resulting picture.

此节点可用一张背景遮罩图像合并一张前景图像中。华特迪士尼最早开发了多层遮罩技术,将三张或四张局部遮罩绘制在玻璃片上,放置在左侧和右侧并在Z景深位置保持距离;小型摄影机移动到右侧拍摄出小鹿斑比穿过森林的影像。

Note

合理输入值

Z Input Sockets do not accept fixed values; they must get a vector set (see Map Value node). Image Input Sockets will not accept a color since they do not have UV coordinates.

../../../_images/compositing_types_color_z-combine_example-2.png

混合并匹配图像。

The Z Combine can be used to merge two images as well. Using the Z values from the sphere and cube scenes above, but inputting different images, yields the example to the right.

../../../_images/compositing_types_color_z-combine_example-3.png

Z通道合并的执行。

In this node setup a render scene is mixed with a flat image. In the side view of the scene, the orange cube is 10 units away from the camera, and the blue ball is 20. The 3D cursor is about 15 units away from the camera. The image is Z-in at a location of 15, thus inserting it in between the cube and the ball. The resulting image appears to have the cube on the green image.

Note

隐身人特效

If a foreground image with a higher Alpha than the background, is then mixed in the Z Combine with a slightly magnified background, the outline of the transparent area will distort the background, enough to make it look like seeing a part of the background through an invisible yet Fresnel-lens object.