Compositing wouldn't be compositing if figures could not be removed from their original backgrounds to be placed onto brand new backgrounds. This requires that the background be selected in some way. This selection may be done manually with the Roto or RotoPaint node or it may be done with keying tools that make the selection based on the color information of the background.
Keying is the art of extracting from an image an alpha. This alpha is used in the layered compositing of that image over a new background. An alpha used in this way become a matte. This matte is always acquired from the color information of the image.
Nuke's keying nodes are amongst the most complex of all its nodes. In this course, the only keyer that we will be covering in any detail is the Primatte keyer.
Simple keying nodes
Very simple mattes can be made by basic color operations, such as: moving the green channel to the alpha using a Shuffle and then using a ColorLookup to push the grays into hard whites or blacks. Nuke also has a couple of simple matte nodes that are little more than wrapped-up versions of such color operations. They are, nonetheless, very useful.
Complex keying nodes
Nuke has some very high-end keying nodes that use approaches far more complex than the simple channel operations of Difference and Keyer. All of them are good... their big difference is in the interface and workflows that they offer to the user.
Primatte is the only high-end keyer that is course will be supporting. Details are here
IBK stands for Image Based Keyer. The IBKGizmo works completely differently to Nuke's other high end keyers. Instead of using as its keying reference a single color value, it uses a clean plate which it makes in on-the-fly using an auxiliary node called the IBKColor. From this plate it might reference one color for one area of the image and another color for another end of the image. The advantage of this is that it is very tolerant of uneven lighting. This is particular useful for shoots that include the floor area.
This has the reputation of being slightly better than the following keyers at fine details like hair and also semi-transparent items like thin cloth. It is also slightly newer. One advantage of this keyer is that it has inputs for junk maska and holdout masks.
Ultimatte is the only Keyer to have ever won an Oscar. It is very sophisticated and even has separate controls for cast shadows.
Tips on green screen use:
Some examples of keying workflows are in the:
Various keying tips:
It is often required that the output from two or more keyers need combining. Heres how: