#The Over operation of a cg object using a mask
The Over operation of a cg object using a mask
Make sure the cg render has a transparent background.
[Sorry the labeling is switched, right is Internal and left is cycles.]
The render preview will show a checkered background, indicating transparency.
The mask (created in the image editor) can also by viewed, by connecting its output to a viewer node in the compositor.
For the easiest over operation, our mask is the "wrong way around". This means, we'll have to invert it. Add a [Color >] Invert node after the mask.
###Method to be used with any number of masks.
Method to be used with any number of masks.
If you want to use multiple mask nodes, you are not going to be able to use the above node setup.
For that, unpremultiply image, alter the alpha (subtraction, max, cojoint-over, etc), premultiply it. This method is far more superior but also much more complex. Read up on premultiplication!
Premultiplication related: Popcorn question, Green screen question, Alpha nodes assumes alpha (so smart, wow), when to convert to premultiplied, Worst answer ever