Nuke Basics: Merge


Hi, this tutorial is going to
be about the merge node and I wanna kinda dig a little bit
deeper into the merge node as someone sent me an email asking about the merge node and if I could maybe
explain it. There are a lot of dropdown menus inside the merge node and if you’re not
too comfortable with it or you know it could be a bit intimidating right off the start so the merge node basically it is most
basic inputs a overby so if I look over here and if I connect this this model I’d I did not make i download it of the
internet and I honestly forget whose where I got it from and so if you know just message me and I’ll
put a link in to to this person’s website that he had because the rush to all that
he can a was damn thing people down the road so
my apologies to this guy effort forget where I got this from but the
thank you for making that available and so if you look at the the merge node and you can see here you know is over be and a we have the over operation turned on and that’s the first thing we’re going
to take a look at a few go over here too operation you can see all these
different the ways have love mixing in and combining
things one over the other so big over here in to go to class sorry
if I said it two-minus I will give us very different looks and
indifferent operations so the first thing I want to do is just
look at but with this doesn’t know what this means in so if you look at this you
can see there’s quite a few and you know when I started compositing I didn’t really understand any other
stuff and so I would just try you know whatever anti-god the one that
I I thought look good and the default
operation is is over so a you can sorta see you know that we have this over here
this is giving us our result but I want to take a look at what over really means and once we figure out what
over really means ily it a lot easier for you to figure
out what these other ones will do the hover over top of the operation drop
down menu you’ll see you like a little she’d the new gives you a
call the tooltips for what all this does in fact if you go to the help I and you go to in putting controls you’ll see you’ll get a little bit more
of a description about what all those do but list I want to break it down into
sort have you know give us a a good base to to
start with so if you look at where it says over the it has a purse B&M brackets one minus a so I just write this down so that was capital a class be and in brackets and then one minus a and so let’s make
this real big so we can see it and I’m gonna make this a little bit smaller okay so a capital A means the image that’s coming down the paper down the a
paper in BG stands for the RGB information that’s coming in on the
b-side and then it is one minus and then a lower case a so you know I did very badly in math at school but I know that when you’re supposed to
figure out equations you do it stuff in the brackets first
and the other thing I know is that if
there’s brackets beside something the implied operation is multiply so if you go in
here and it can also be written this way
where we’re gonna take one minus a and then it gets
multiplied by be negative added to 2k so let’s start with this bit here for
so one minus lower case a so 1 in this case could just be a constant Sep 21 so there’s r1 and minus a is the offer from the a layer so here’s be a layer
over here I need to get the alpha so I was gonna
get a shuffle and I’m just going to grab the alpha from so I look at the shuffle it’s giving me
this says the offer a the image so I need one minus a so and then get emerge node and I was gonna set that two-minus angers me less so one minus a really what that means is its gonna give me the inverted alpha up the a layer okay so that’s what this
part of the equation means one minus a and it’s giving me this will then its gonna be multiplied by the image love the Beale Air so and companies over here because this is
kinda like with new tires and we’re gonna kinda do it on our own over here so if I take that beware I wanna
multiply it by this when I’ve done over here some gonna
get my merge node and going to attached over here and I’m gonna set
that apps and I mean to go to better
background there and I can assert that to multiply okay so that’s what this her now over
here so be multiplied by one minus a baker’s cyst burst so basically I’m
getting the beware and the bee layer a and to be image its has that cut-out where our heroes gonna be and then the last
bit is plus a so that’s gonna at the a layer on top
at this so I’m gonna get a another merge and was gonna go over here but I’m gonna make sure that this is set to
you plus and when I do that begets condor top ANSI can see we get the same result as
with did over here with the over so that’s what this all the stuff is and
you know like a complete very very smart compositor told me like 10
years ago that all compositing is like visual manner and when I heard
that it kinda freaked me out because I’m I’m not very good at math but really the
basis of all compositing is being able to break down these aqui
en game obviously you don’t have to do this
you don’t have to know this but if you know how this works became
prevent problems later on when you get into more advanced come
comping in you know when it gets more complicated so you know it’s good that have a good
understanding have what all the stuff means and if you
hover over top you can sorta see the equations in the way there they’re
written down I’m not gonna go through all of these
because to be honest there’s still a few in this list that I
don’t totally understand I you have an idea of what they do but
if you were to ask me what is exactly happening if I look at when the merge note is set to color burn I know that they’re kinda mixing things
together and I know the contrast likely I know that it’s a clear be is
affecting layer a but I don’t really know exactly how it’s
doing a a and I know the color dodges making it
brighter and it’s kind of like it’s adding it to the background but it not exactly because if I go here in hit plus its
gonna give me a different look then Color Dodge so I’m not 100 percent
sure exactly what this doesn’t impact
probably look it up but haven’t bothered because to be
honest I rarely really need this affecting
usually I can get something color corrected to make it look the way I wanted to but there are a
few I things in here that you should know
you should serve you have a good idea of what they do I
am you know of course there’s over is the
default operation and actually you may be in a situation
where let’s say you have some live action footage so let me just find some live action
footage was gonna pause the recording here for a sec okay so let’s say you know you’re playing a key on this
and for some reason you decide to use nukes default here and I was gonna get a bit more space
here and in the kheer units at this too a green screen and then which you know I’m going to you that’s
harsh with this so I have a an alpha here but
you’ll notice that this knowed it does not automatically
pre multiply a the offer by the RGB and you know this is something that
often the people especially people in the first yr compositing you
know the guy had a lot of trouble understanding the multiplication and all that stuff and then you know
maybe I should make a video on that but it’s just basically you know they
could taking the alpha and if a look at the value over
here in the offer that’s 0 so anything that
could multiply by zero goes to zero and filegate value over
here that value is 1 so anything you multiply by one is going to stay the
same and over here this is going to be like a
a fraction it’s like a decimal 2.32 so anything gets multiplied by .3 to
will be a smaller number at smaller means
it’s going to be darker so if I look at this in a do a pre malt then its multiplying the RGB by the some and the RGB by the offer case was modifying the color that we
have by the offer and yes I know it’s a horrible keep it that’s not we’re
focusing on now some people you know when I first
started new guy with a cookie I’m playing a key over here and gonna get my merge node and I just
picked this into it save this wonderful background and in a pay per cent over here and a
big world why is this all break now only if I look at the background the
background is this color and here’s my guy over here and when I look at it it’s
all braid and it looks like semi-transparent or for use XE a checkerboard and instead and I disconnect at their you can see
there were over the trick now instead have a great record where the guy would
want now to green checkerboard well I mean if we go through and we look
at how be over operation is working and you can see if you just do the same
thing that we did over here so I’m gonna go to shuffle and if you look at our equation know how
this stuff is being put together shuffle I’m just gonna go over here and grab the be alpha after the key so there is there and then I’m gonna get
a constant and I’ll give it your way and then I’ll create emerge ok said that merged two-minus okay so this and is doing his part here
and getting the invert the often it’s multiplied by the Beale Air to his maybe where and I’m going to you apps sorry I’m just completely
disorganized rear so to go over here and set this to multiply and now that’s popped out that hold it
over there now here’s the part where we run into problems so this is
all working fine but now that last step in for the last
up over here was were adding the RGB on top love our backgrounds or just goes in
like that and over here I’m trying to do the same
thing but I’m gonna take my green screen over here and then I’m
gonna go over here and I face at that two plastic you can see I
get it now the same thing that I had over here in
my over I go back and forth you can see that
it’s the same thing so that’s why I after the green screen it’s important to do a primo alt be over operation is expecting a pre modified image so if I look over
here at the over now that’s gonna work rate because
now it’s pre more thing it’s multiplying the offer by the RGB and so as a result it gets rid of all
the stuff over here and then gets merged together now you
don’t have to necessarily do that you could instead if I go to emerge node Angolan Civil over I could say Matt and then it those exact same thing and
the reason for that is because Matt I if you look it’ll actually multiply a little expect the a layer not to be pre multiplied annual
pre multiply it inside the merge node so you get
something like that and there’s not a thing they have seen
people do think that that I consider kind have odd the with merge nodes lichte your
user i guess im people do stuff like if we
wanted that someone wanted the road or something a be would get a roto and then they
would you know make their make their mask and
then they would get emerge node in the wood do it to
something and they would set it to something like in or maybe this has to be set to RGBA and probably flip it around your so I see people do things like this
where it’s like they wanted to keep that and so they would create a roto and then
they would merge in the woods at that merged to you in and effectiveness in officers
actually sizing of their and you know I to me whenever I see
stuff like that i mean maybe maybe people work that way in other
studios but I’ve always thought this to be a
very convoluted and confusing way working I would always but I’ve seen it and in some people may
be are very comfortable working that way but I mean if I had to do that I would
just create a roto and a ok you know replace the offer that’s their and then
afterwards drop down a primo alt and do it like
that I am but I mean whatever wherever people
are used to um so we’ve kind of strayed a bit from the original topic which is
the merge node and so hopefully I mean if you really
curious now you can go in and you can figure out what all these other operations do mean once
keep in mind are plus which just adds a-plus be minus which subtracts and me from be is also from which is just inverting
insensitive a-minus be its B-minus a whites called from I’m not really to
share I am and then you know in an hour can be hopeful in certain situations so if you have out or if you have in you
know conflict things around in and you’re just basically putting something
into the other inputs alpha and in those are honestly like the mean
ones are maximum and minimum so max will show the brightest doesn’t
really matter what’s on top or what’s underneath that and give you the same
result it’ll just give you I’m the bradys pixel and then minimum is the
upset world show you the darkest I and also when you turn Saunders alpha
masking so what that means is that this will only affect the area’s where there’s
again an offer so for example bagel here and pit look at this layer and it’s saying minimum that means its
gonna show the the darkest pixel a so obviously these are really dark
pixels over here these are 80 so when I go here
and I click on minimum a then this wall is gonna get totally
wiped out because of all the dark pixels that are in that area by turn on Alfa masking then what
happens instead is that minimum is still working but
it’s only happening on the area’s where there’s an alpha
channel sober look at his hand you can see that the dark pixels are showing
through their and if we look over here you can see
that this shadow this cash I know a cash-out
contact shadow is a is showing through okay but if you don’t have alpha masking
turned on then it’ll just applies it to the whole image
including areas that maybe you are that interested in having it work on
that maybe you only want to work on the area make on the lair where
there’s another channel so keep that in mind video color space
is something I I never really use but what it does is
it converts a before it merges these together where does all that map operations staff
it will convert it usually to sRGB and then it will do all that operation so sometimes a if you need things to match exactly
something that happened in Photoshop for example I believe sometimes me wanna turn on
video color space but most time you wouldn’t bother and
having to do that the next one down is set abound so I’m
gonna move on from this if you have other questions or if you
notice I said something completely wrong please pointed out think it would be very boring if I went
through each wannabes so anyways I’m gonna and then move on
from that that went down is set the bounding box so the bounding box is I think would
have nukes really great things there has a good with great
features and a lot a composite as I think don’t maybe take full advantage of
it when they should urban occurred so the
bounding box basically is it says where where went in new .cos
gonna process so down here this is the sizeof the comp that’s and that’s dictated by either your project settings or your the
size size if you’re be layer your be layered drives the size of your
comp so over here you know it is 1280 by 720 appear this is different though this
tells you the size of your bounding box and we can see other examples I just maybe make a roto you can see here that
the bounding box resizes New York get that number up here it’s actually over here and there in then this tell
you the cornet a pic the bottom left hand corner in this tells you the
coordinator at the top right hand corner and what this is gonna do with new .cos
new .cos only going to process the information
that’s inside the bounding box so all the stuff over here newt doesn’t
even process it and even worry about it okay so a let’s say over here you have set bounding box to
Union and where that’s really helpful is safe
for example let’s say a I had this guy may transform
the in a move that were here well what that means is that now that
has you see how the bounding box is totally
like expanded beyond the ejup the image and where this is helpful is that this information still
exists inside have new canoe castille processing at a and if I needed to like maybe later on
down the comp I need to brings information back so if
I move it over you can see that here is our guy hasn’t
been lost nothing has been clipped and you’ll
also see you’ll notice that nukes default
behavior is that any pixels that are along the edge get
reputed for infinity so that’s why the wall you can
sorta see the user stretch marks here in the wall that
those edge pixels that are being repeated vertically and
over here these are getting repeated horizontally if you don’t like that behavior you can
always just at a node called black outside and I know what’s going on over here
probably in I have no idea probably something bad with my EX our
file or something but a to look over here this is now creating you know something something is messed
up with this file but now with this is done basically is
the black outside know it all it does that adds 1 pixel black all around your
image and that is what would get repeated but
arafat really gets repeated I meet maybe it does or doesn’t I’m not
sure but because it’s black now if when they get moved around you
can see over here that doesn’t happen a paid go
to blackout sign in turn that off you can see it’s just gonna keep getting
repeated so a what we can do to go back to his merge note over here
now sometimes you want this information but sometimes in your comp the you don’t
need it like for example let’s say that you were
given a matte painting in the matte painting was really really big I and it was bigger than what your final
image was going to be we have all this extra information that
new .cos kinda carrying around that we don’t really need it’s what you
can do as you can see well I’m gonna set the bounding box to the BU layer and when I click on that you can see
that now that is taken the bounding box and it is resizing its
was just the sizeof lear be and now if that were to get transformed
you would see that now all the stuff is gonna get cut off
because the bounding box was set to lear be
mister to layer a you know leak now and then that means
that the bounding boxes just gonna clip over here what the a layer
was set to and then we get that repeating pixels
because these are up against the edge a frame over here okay an intersection is I’m have no idea
I’ve never used it so I’m assuming says you know between the two units are
cutting them off but I I was either use usually it either
be or it’s a to Union being a what you need now the reason why this compass or kinda slow is I’ve
actually rendered of many different layers this is a multi-channel you XR and if we look over here you can see
that you know I have like the direct diffuse from one late and then I
have the diffuse from another early and I
have the diffuse from in a really at Orica environment Lee and at the same thing for the indirect
lighting so I normally I think the way that most
people work in his car the way that I would
recommend it is that you shop all these out before you comin a so for example you
know if I have a shuffle and figure over here and I set the direct diffuse and if this is a confusing I think I’ve I’m pretty sure
that a tutorial on a render passes so hopefully you if if yeah from going too fast you can refer
to that and and I’ve da cidade a tutorial on the
shuffle nodes so normally the way that most people
work as they would shuffle this out and then they could just add these
together something new year and so that’s a plus
and copy that and pieces over here Annan’s over here and this one is set to class
and then you know you can write play around with the merge area who with the mix in it too should change the opacity remember that
makes only affects the the a layer so sir like and opacity
control that you you have command over so does the way that I would recommend
that you work just because the reason why I would recommend you
work this way it is very easy if you just click and you know you hit one you can see
what’s going on in these nodes very easily but there is another way you can work
inside have new so if I it emerged node and paper both of these in so the alien be aware both connected to
this guy and then I go over here to the merge
node in a savory here will I’m gonna take the instead have comping RGB with the RGB to give me the output over
here I’m gonna say take the direct diffuse late and put that over the direct diffuse from the other
lady an incident overrode said that two plus
two and two together so what I’m doing right now as I’m kinda
diving into the XR file and I’m specifying instead abusing the RGB which is what we see here actually
going inside or grabbing some other layers that I rendered often
the XR file so a and again I can play around the mix
too control you know how much is being at
this is affecting the other one and the output is being set to RGBA so
that means that I’m seeing the result my output if I wanted to let you go in
here and I could make a new set of channels I could say well that’s going
to be an unjust or this so I’m gonna say new and it’s going to
be output to you know terms guy lading and against him auto and I’ll
create red green blue and offers and click OK and and of course I can’t
have spaces inside this to click OK so now what’s happening is
I’m doing this and it’s being saved into a new set of
channels that I’m a cold temp guy elating in to go over here Mike for temp guy
lighting which is right here there I can see the result and i’m just
still senior GB because I haven’t really done anything to the RGB a I’ve just been copping this stuff
together a now I don’t really recommend that you use merge this way the main
reason is because it’s very difficult to tell
what’s going on just by looking at your comp it they do try to help because they did
does say that to see the operation you’re doing it says where this is being
saved out to it also gives you the clue that the RGB
an alpha are not being manipulated because if you
if you were to get processed they would turn big Lake for example if i connect to a blur
no to this right now nothing is being processed but
as soon as I change it you can see those become big dashes
there so when I look at this you can sorta see oh
yeah the you know it’s it’s difficult to tell
exactly what’s going on and if you look at it I can even see it because it’s
buried in some other layer you don’t actually go into the node in
and look and especially if you’re taking over a card from someone else this can be a huge pain in the ass too
try to figure out so I would the not recommend this I am other thing if I merge these two layers together you see something here from so we see you norm merging a the RGBA RGB from the beach channel we have the
output is also a also merge so with that does as you can also
include other a layers in this merge to be kinda brought along for the ride so I don’t have a good example of that
handy right now but that’s what it’s for its that you can include other passes or other layers to be affected by the operation the the net went down is about masking
actually before I continue a once you connect the a layer you’ll
notice that another little input gets visible in you see there’s 82
so if I grab that say this rodeo if I just make it colorful does give it select it and make a colorful then I could go over here and then I
could merge data now that is going to be merged and as well and then you can have a three
and you know be four you could have multiple multiple inputs into your merge nodes generally speaking
I don’t know what you know the really big companies
do but generally speaking I tend to avoid doing this having multiple inputs into emergency mode they could just
because I like keeping things simple so I just like to have the so that its you ever be like that um one
of the reasons why is that is the mix no it would affect
everything they call the a Lakers get affected by
that and has been times in the past where I’ve have not wanted that behavior um I just
generally prefer working like simple and so having multiple things going to
emerge Note II can sometime screw me up so I generally
if I wanted to do that I would make another merge node underneath it and connect you know on have this
beautiful conflict got um and this is the way that the way that
I work also attend have to be layered coming
down I’ve been horrible with that in this tutorial and in the EU layer
usually comes in from the side and I know some companies they work like CG
elements would come in on the side and live action elements would come in
from another side so that it’s more standardized the next thing is just damascus is the
just the usual mask controls that you find in any tool inside nuke so if I were to say connect to this mask over here and a
scurrilous then it’s only gonna emerge the area
that is inside this roto over here a in your controls for a inverting the
mask so that puts it around you have this one
here in jacked and what that will do is now you’ll have a new layer called mask and so this mask
will get brought along it shows up as read just because it gets
put in the first kinda color buffer just gets put in the our channel but
story about it but you can still like you can isolate it out and you can
still use it as a mask but deserve it takes that and it makes it as part of your flow
love nodes if you were to go down you could
use it again all you have to do is if I went to his
blur know now I could go in and I could select mask and then go here and it would blur along that rather than a doing something like this which a in your comp’s can get kinda
ugly if you have a lot of Dana lines going
all across things you me one just inject the mask at a
point and then just say use that mask and it does her to say I’m using a mask
over in here internally there’s not a mask being kinda connected
from and from another thing at and it will tell you
what channel you’re using for the mask so I think that’s about it I think that
everything regarding the regarding the merge node so I hope you found this useful I hope
you found this helpful I was you know I when I was your
planning out this tutorial I was thinking about actually just going through all the different
operations a in the merge tool to kinda figure out
all the stuff means but lives would have made a tutorial way
longer and I think a lot more boring if you have questions feel free to email
me or contact me in if I get enough maybe I would make a
tutorial just on this but I think most people are intelligent
nothing sir figure with the basics to you in and work from there so for that’s it I hope you found it
useful

Leave a Reply

Your email address will not be published. Required fields are marked *