Example 2: compositing using the keymix node – Apple Shake 4 User Manual
Page 418

418
Chapter 15
Image Processing Basics
Important:
Premultiplication plays a vital role in compositing, and Shake gives you
explicit control over premultiplying and unpremultiplying your images. For more
information, see “
About Premultiplication and Compositing
If the image is not premultiplied, it can be premultiplied in one of two ways:
m
Add a Color–MMult node before the Over node in the process tree.
m
Use the preMultiply toggle in the Over node’s parameters.
Example 2: Compositing Using the KeyMix Node
KeyMix, the second most important compositing node, mixes a foreground input image
and a background input image through a third, separate, input image—the mask. You
can select which channel of the third image works as the mask. You can also invert the
mask and control its intensity.
As mentioned previously, a successful Over composite requires an alpha channel for the
foreground and foreground RGB channels that are premultiplied by that alpha channel.
3D-rendered elements are almost always premultiplied. Scanned elements or other 2D-
generated plates require an added alpha channel (also called the matte or mask
channel) that is used to premultiply that image with the Color–MMult node.
To get the necessary alpha channel, you have several options:
•
Pull a key with a Shake keying node (or combination of nodes).
•
Pull a key in a different software package and read the images into Shake. Copy the
key into the alpha channel of the foreground image (with the Copy or SwitchMatte
node). Finally, apply an MMult, and then composite.
•
Draw a mask with an Image–RotoShape node.
•
Paint a mask with an Image–QuickPaint node.
•
All of the above, combining masks with the IAdd, Max, Inside, or Outside node.
Tree with Over node
Result