- [Instructor] The essence of compositing is
of course, to merge images together to create a shot.
Well, Nuke has many tools for this.
The main tool is the Merge node.
Here we'll see how to set up a composite with a merge node,
select different merge operations, and manage the channels.
We'll start with an overview of the
basic set up of a merge node.
If you'll select a node, and then come up to the
merge tool tab and select a merge node,
by the way, notice the little m here
that tells you that there's a keyboard
shortcut m to get to a merge node.
So I'll select the merge node
and it hooks itself up to the A side of the merge node.
You connect the background to the B side
and the way you read this is by looking
at the operation printed on the node,
here it's the over operation by default.
So we say A over B
and the operation you see here
is selected in the merge node by this pop up here.
And of course by default it'll be the over operation.
Next, let's take a look at a few different merge operations.
I'll hook my viewer up through here,
and I have these two cards and as you can see
they both have alpha channels.
I'll open up the merge three node,
and now we can take a look at the
different operations we have and again,
by default, is the over operation
meaning the A image will be over the B image.
However, I could say I want the A image
under the B image. Boom.
Or, I want the A layer inside of the B layer.
So I get just the part of the A image
that's inside the B image.
Or, I could say I want the A image
that is outside of the B image.
So, you get to choose from a long list
of operations plus many of these operations
are Photoshop operations.
For example, we have a hard light,
screen, soft light, and others.
It's very handy to be able to use a real
Photoshop blending mode in your composites
so that your composites will look like
the art departments composite.
Now let's take a look at merging channels.
So I'm going to hook my viewer up to here
and remind you that the multi pass head
has several channels.
Masks, reflection, and specular.
So I'm going to open up the
merge one node and look at the A channels.
Again, by default, you're going to get the
RGBA over the RGBA on the B side.
But, since the A side has several layers,
I can do this pop up and say " I want to
see the reflection layer over the background."
and there you go.
Now something's wrong.
I don't seem to have an alpha channel.
No problem. The reflection layer itself
didn't have an alpha channel.
The alpha channel lives in the RGBA layer.
So, I'll just come over here and say,
" I want you to use the RGBA layers
alpha channel for my composite."
Now we also have these on, off
switches here for each channel.
If I turn off the green channel,
that means only composite the red and the blue
channels over the background.
I can turn off the blue channel
and now this says only composite the red
channel over the background.
I'll turn those both back on.
And you can do the same thing for the B input here.
Now I'd like to call your attention to a principle.
A very important principle in Nuke
that I call the B side paradigm.
We saw that the multi pass head
had several layers to it.
This background also has several layers.
So I can show you it has a gray background layer
and a mirror background layer.
I'll put that back to RGBA.
Again, if I look at the A side channels:
mask, reflection, specular, watch what happens
when I check the output of the merge node.
They're gone. So this is the rule,
in the merge node, all the layers from the A side
are destroyed. They're gone.
What passes through the merge node
are the layers that are on the B input.
And that's what I mean by the B side paradigm.
So all the channels coming down here
will be preserved and all the channels
coming over here will be lost.
With the exception of the alpha channel.
The merge node preserves the alpha channel
from the A input and brings it out for you
because very often you're going to want to do
something clever with the alpha
channel after the composite.
I'll put my viewer back to RGB.
Now the merge node has this mask input.
So we can mask off a merge operation
to only occur inside the white part of some mask.
Now I have this mask here.
So this is my mask input, I'll go back to my merge node.
So if I take the mask input connection and
hook it up to that mask, I'm only
going to get that part of the A side
composited over the B side.
Now in this case, my mask input is in the alpha channel.
But, should it be in another channel,
you'll have this pop up here that
you could choose a channel other than
the alpha channel as the mask input.
The merge node provides a long list of
operations to choose from for combining
your images including key Photoshop blending modes.