利用者:Bob holcomb/Doc:2.6/Manual/Composite Nodes/Types/Matte

提供: wiki
< 利用者:Bob holcomb
2018年6月29日 (金) 05:48時点におけるYamyam (トーク | 投稿記録)による版 (1版 をインポートしました)
(差分) ← 古い版 | 最新版 (差分) | 新しい版 → (差分)
移動先: 案内検索

Composite Matte Nodes

These nodes give you the essential tools for working with blue-screen or green-screen footage, where live action is shot in front of a blue or green backdrop for replacement by a matte painting or virtual background.

In general, hook up these nodes to a viewer, set your UV/Image Editor to show the viewer node, and play with the sliders in real-time using a sample image from the footage, to get the settings right. In some cases, small adjustments can eliminate artifacts or foreground image degredation. For example, taking out too much green can result in foreground actors looking 'flat' or blueish/purplish.

You can and should chain these nodes together, refining your color correction in successive refinements, using each node's strengths to operate on the previous node's output. There is no "one stop shopping" or one "does-it-all" node; they work best in combination.

Usually, green screen is shot in a stage with consistent lighting from shot to shot, so the same settings will work across multiple shots of raw footage. Footage shot outside under varying lighting conditions (and wind blowing the background) will complicate matters and mandate lower falloff values.

Difference Key Node

Difference Key node

The difference key node takes the difference between a clean plate and another plate and determines at a per-pixel level if the two pixels are different within an RGB color space (with an adjustable tolerance and falloff). This node works really well if your clean plate and keying plate are lined up perfectly, such as when using a tripod to shoot the image or using a motion control camera.

You may need to reduce the resolution and blur the inputs in order to generate a matte from this node if the pixels don't line up perfectly. Doing this would create a matte with rough edges, that would then need to be refined by a matte with better edges.

There are two inputs to this node.

  • The first is an input Image that is to be keyed.
  • The second is an input Image that is the clean plate representing the background. It can also be input as an RGB value or selected using the color picker by clicking on the Key Color box to bring up the color dialog, then clicking on the eye dropper tool and selecting a color.

You can adjust the Tolerance for what the node considers a match between the clean plate and the keying plate. The tolerance affects how close a pixel needs to be to the background pixel to be considered an absolute match.

When the Falloff value is high, pixels that are close to the Key Color are more transparent than pixels that are not as close to the Key Color (but still considered close enough to be keyed). When the Falloff value is low, it does not matter how close the pixel color (Image) is to the Key Color, it is transparent.

The outputs of this node are the Image with an alpha channel adjusted for the keyed selection and a black and white Matte (i.e the alpha mask).

Distance Key Node

Distance Key node

The distance key node determines a pixels alpha value based on the 3 dimensional distance between the image pixel color and the key color in a 3D RGB color space. This key works well when trying to single out a specific color in a background (not necessarily green). It is also possible to work with YCbCr color space (chroma color space) but only the Cb and Cr channels are taken into consideration for determining the distance between the foreground and background pixels.

You can adjust the Tolerance for what the node considers a match between the key color and the foreground pixel. The tolerance affects how close a pixel needs to be to the background pixel to be considered an absolute match.

When the Falloff value is high, pixels that are close to the Key Color are more transparent than pixels that are not as close to the Key Color (but still considered close enough to be keyed). When the Falloff value is low, it does not matter how close the pixel color (Image) is to the Key Color, it is transparent.

There are two inputs to this node, the Image that is to be keyed and the Key Color that is to be keyed.

The outputs of this node are the Image with an alpha channel adjusted for the keyed selection and a black and white Matte (i.e the alpha mask).

Channel Key Node

Channel Key node

This is the (most well known) simple green minus red (or the max of the red/blue) channel keying. The node can work in other color spaces and allows for any channel to be used to limit the other channels, butit has very limited uses outside of the RGB color space. It does allow for arbitrary channels to be used (e.g. red minus max of green/blue) to determine a pixels alpha value.

There is one input to this node, the Image that is to be keyed.

Control this node using:

  • Color Space buttons selects what color space the channels will represent.
  • Channel buttons selects the channel to use to determine the matte.
  • High value selector determines the lowest values that are considered foreground. (which is supposed to be - relatively - height values: from this value to 1.0).
  • Low value selector determines the highest values that are considered to be background objects. (which is supposed to be - relatively - low values: from 0.0 to this value).

It is possible to have a separation between the two values to allow for a gradient of transparency between foreground and background objects.

The outputs of this node are the Image with an alpha channel adjusted for the keyed selection and a black and white Matte (i.e the alpha mask).


Chroma Key Node

Chroma Key node

The Chroma Key node determines if a pixel is foreground or background (and thereby should be transparent) based on its chroma values. This is useful for compositing images that have been shot in front of a green or blue screen.

There are two inputs to this node, the Image that is to be keyed and the key color, usually selected using the color picker and the original image.

  • The angle controls how tolerant the keying color is. Larger angles allow for larger variation in the keying color to be considered background pixels.
  • The cutoff controls the level that is considered pure background. Higher cutoff levels means more pixels will be 100% transparent if they are within the angle tolerance.
  • The gain is applied to the pixels that are within the cutoff region. A gain of 0 will result in the cutoff value not having affect and there will be no semi-transparent pixels.

The outputs of this node are the Image with an alpha channel adjusted for the keyed selection and a black and white Matte (i.e the alpha mask).

Color Key

Color Key node

The color key node creates a matte based on a specified color of the input image. The sliders represent threshold values for Hue, Saturation, and Value. Higher values in this node's context mean a wider range of colors from the specified will be added to the matte.

Luminance Key Node

Luminance Key node

The Luminance Key node determines background objects from foreground objects by the difference in the luminance (brightness) levels. For example, this is useful when compositing stock footage of explosions (very bright) which are normally shot against a solid, dark background.

There is one input to this node, the Image that is to be keyed.

Control this node using:

  • The High value selector determines the lowest values that are considered foreground. (which is supposed to be - relatively - light: from this value to 1.0).
  • The Low value selector determines the hightes values that are considered to be background objects. (which is supposed to be - relatively - dark: from 0.0 to this value).

It is possible to have a separation between the two values to allow for a gradient of transparency between foreground and background objects.

The outputs of this node are the Image with an alpha channel adjusted for the keyed selection and a black and white Matte (i.e the alpha mask).

Example

Using Luma Key...with a twist

For this example, let's throw you a ringer. Here, the model was shot against a white background. Using the Luminance Key node, we get a matte out where the background is white, and the model is black; the opposite of what we want. If we wanted to use the matte, we have to switch the white and the black. How to do this? ColorRamp to the rescue - we set the left color White Alpha 1.0, and the right color to be Black Alpha 0.0. Thus, when the Colorramp gets in black, it spits out white, and vice versa. The reversed mask is shown; her white outline is useable as an alpha mask now.

Now to mix, we don't really need the AlphaOver node; we can just use the mask as our Factor input. In this kinda weird case, we can use the matte directly; we just switch the input nodes. As you can see, since the matte is white (1.0) where we don't want to use the model picture, we feed the background photo to the bottom socket (recall the mix node uses the top socket where the factor is 0.0, and the bottom socket where the factor is 1.0). Feeding our original photo into the top socket means it will be used where the Luminance Key node has spit out Black. Voila, our model is teleported from Atlanta to aboard a cruise ship docked in Miami.

Matting Techniques

Simple Example

Using the Difference Key Node

In the example to the right (click to expand), ....to be completed

Chaining Example

Chaining Difference Key Nodes

There is no single node that will create a perfect key. It will take several nodes chained together....to be completed

Garbage Matte

A garbage matte is not a node, but a technique where the foreground is outlined using a closed curve (bezier or nurbs). Only the area within the curve is processed using these matte nodes; everything else is garbage and thus discarded

Color Spill Node

Color Spill node

The Color Spill node reduces one of the RGB channels so that it is not greater than any of the others. This is common when compositing images that were shot in front of a green or blue screen. In some cases, if the foreground object is reflective, it will show the green or blue color; that color has "spilled" onto the foreground object. If there is light from the side or back, and the foreground actor is wearing white, it is possible to get "spill" green (or blue) light from the background onto the foreground objects, coloring them with a tinge of green or blue. To remove the green (or blue) light, you use this fancy node.

There is one input to this node, the Image to be processed.

The Enhance slider allows you to reduce the selected channel's input to the image greater than the color spill algorithm normally allows. This is useful for exceptionally high amounts of color spill.

The outputs of this node are the image with the corrected channels.