Node Z-Combine

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

Node Z-Combine.

Le Node Z-Combine combine deux images en se basant sur leurs maps de profondeur Z. Il recouvre les images en utilisant les valeurs Z fournies pour détecter quelles parties d’une image sont devant l’autre.

Entrées

Image

l’image d’arrière-plan.

Z

La profondeur Z de l’image d’arrière-plan.

Image

l’image d’avant-plan.

Z

La profondeur Z de l’image d’avant-plan.

Propriétés

Use Alpha

The chosen Image pixel alpha channel is also carried over. If a pixel is partially or totally transparent, the result of the Z Combine will also be partially transparent; in which case the background image will show through the foreground (chosen) pixel.

Anti-Alias Z

Applique l”:term:`Anti-Aliasing pour éviter les artefacts aux bords tranchants ou aux zones avec un haut contraste.

Sorties

Image

Si les deux valeurs Z sont égales, il utilisera l’image d’avant-plan. Sinon la valeur Z la plus petite décide du pixel d’image à utiliser. Voir Z-buffer.

Z

The combined Z depth, which allows to thread multiple Z-combines together.

Exemples

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

Choix des pixels les plus proches.

Dans l’exemple ci-dessus, la sortie du rendu depuis deux scènes sont mélangées en utilisant le Node Z-Offset, un depuis une sphère de taille 1.30, et l’autre un cube de taille 1.00. La sphère et sont placées à la même place. Le cube est est , de sorte que le coin au centre est plus proche de la caméra que la surface de la sphère ; ainsi Z-Offset choisit d’utiliser les pixels du cube. Mais la sphère est légèrement plus grande (une taille de 1.30 contre 1.00), ainsi elle ne rentre pas totalement dans le cube. À un certain p oint, comme les côtés du cube de la caméra, les côtés de la sphère sont plus proches. Quand cela se produit, Z-Offset utilise les pixels de la sphère pour former l’image finale.

Ce node peut être utilisé pour combiner un avant-plan avec un arrière-plan. Walt Disney a inventé l’utilisation de mattes multi-plans, où trois ou quatre mattes partielles sont peints sur du verre et placés à gauche et à droite à des positions Z différentes ; des déplacements minimaux de caméra vers la droite crée l’illusion de profondeur comme Bambi se déplace à travers la forêt.

Note

Valid Input

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 it does not have UV coordinates.

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

Mix and match images.

The Z Combine can be used to merge two images as well, using the Z values put out by two render layers. Using the Z values from the sphere and cube scenes above, but threading different images, yields the example to the right.

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

Z Combine in action.

In this node setup a render scene is mixed with a flat image. In the side view of the scene, the purple cube is 10 units away from the camera, and the gray 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 table.

Note

Invisible Man Effect

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.