No items found.

Tutorial: Nuke vs. After Effects for Compositing

Joey Korenman

Compositing using Nuke.

Have you ever tried doing some serious compositing with After Effects? Like taking a bunch of 3D passes and combining them to get the result you want, or doing some really selective color-correction and effects to get the final image to look amazing? Don't get us wrong, you CAN do it. But it can be PAINFUL. After Effects has so many quirks, so many gotchas, that just doing a simple lightwrap can take 3 effects and a precomp.

We love After Effects. It's an awesome piece of software that lets you create almost anything you can dream of...

But if you want to really dial in the look of your composites, if you want TOTAL control over your image, then a node-based compositor can give you that control, and that's where Nuke comes in.

There are plenty of things After Effects does better than Nuke, but compositing ain’t one of them. No big deal. Ideally, you learn both, and your tool belt groweth!Check out the Resources tab for more info on how to get a copy of Nuke for yourself.



Tutorial Full Transcript Below 👇:

Joey Korenman (00:17):

What's up guys, Joey here at school of motion.com. And in this video, we are going to talk about one of my favorite topics, which is nuke. And what I'm going to try and do is show you the difference between a layer based composite or like after effects and a node based compositor, like nuke one isn't necessarily better than the other. They're just different tools. And depending on what task you're doing, one might be a little bit easier to use. And I know a lot of you guys out there have probably never used nuke and you may really just kind of be scared of it. And so I want to show you how it works and why it's so cool and why can actually be useful to a motion graphics artists and not just a visual effects artists. So let's hop in and get started. So we're going to start in after effects since I'm sure that's what most of you are more comfortable with.

Joey Korenman (00:59):

And what I have here is a pretty typical 3d composite setup where I've rendered out multiple passes from cinema 4d. I've rendered them as a multipass EXR file. So I have one set of files here, one image sequence, and I've pulled that in and I've used the built-in extractor effect to pull out each pass from the EXR files. So I've got my lighting passes, like my diffuse pass, and I'll just solo them one at a time. So you can see what they look like. This is the diffuse lighting pass. This is the specular pass. This is the ambient pass reflection, global illumination. And now I get into my shadow passes. So I've actually got a shadow pass and I've got an ambient occlusion pass. And then up here, I haven't turned off. I've got an object buffer for the sky, the floor and the spikes.

Joey Korenman (01:53):

So all of these are feeding from the same set of image sequences here, and I'm using this effect. It's in the 3d channel group extractor to pull each of those channels out one at a time. And I've set, I've already set up my, uh, my compositing. So, you know, diffuse is generally the channel I start with. That's my base. And then I'll add all of the lighting channels on top of it. Now I don't want to get too much into the actual compositing part of this, but it is very important to know that I'm in 32 bit mode and I'm actually compositing in a linear workspace. Uh, and the reason that I'm doing that is because EXR files out of cinema 4d are 32 bit. So I have tons and tons of color information, and that's wonderful. Um, so you can see here that this is my compositing setup and, you know, if I just pull all of my passes in and I set this up and I now look at it, all I'm seeing is a list of passes and I'm seeing layers, right?

Joey Korenman (02:51):

Just these bars that go across. And if I really want to look at all of my passes and try to understand what I have to work with to, to help myself figure out how to composite these things, the only way to do it is to solo them one at a time. All right? And that's not really that intuitive of a way to composite. If you composite in after effects, you certainly get used to this, but let me show you a different way. So now we're going to hop into nuke. I'll show you what it looks like in nuke. So this is the nuke interface, and if you've never opened nuke, if you've never played with it, this is going to look a little bit alien to you. Um, it works very differently than after effects and I'll admit, I mean, it took me a while to get the hang of it.

Joey Korenman (03:32):

But once I did, it is so much nicer to composite 3d passes together and really control the way your image looks in nuke. So the first thing you're probably noticing is I've got all of my passes, kind of laid out here in front of me, like cards on a table, right? And I don't have to sort of, you know, guess what the reflection pass looks like. I can actually see a little thumbnail of it, but the way nuke is set up, you have instant access to any single one of these little thumbnails at any time. Now these are called nodes. Nuke is a node based compositor. And the, one of the great things about nodes is you can look at any note at any time in nuke. If you hit the one key, you can see this little viewer here, this little doubt dotted line is going to jump to whatever I select and then hit one.

Joey Korenman (04:23):

So I can very quickly step through all of my passes. Okay. Another really great thing about working this way is I can see here a visual representation of what the source material is. Okay. If I hop back into after effects for a second, you can see that, you know, I can switch to the source name and then I can see what the sources for all of these layers. But generally you're looking at the layer names and this doesn't tell you anything about what file this came from. And this gets even worse. If you start pre comping things in nuke, it's all just right in front of you. And I can see even really, really zoomed out like this. I can see this is the map for the object. This is clearly the ground. This is clearly the sky. So that's the first benefit. Nuke is going to let you see your render passes and see the relationship between render passes and the source material in a much, much easier way.

Joey Korenman (05:19):

Now let's start actually compositing this and doing some color correction. So you can see some of the other ways that a node based workflow is going to be a little bit easier in some cases. So let's say, first of all, the shadow pass is way too dark. So I'm just going to go into the opacity for the shadow pass. I'm going to turn it down a little bit. If you've never used multipass rendering before this should show you immediately the power of it. You have the control to just totally decide how much shadow you want or don't want in post. So let's say we want this much and I would really like to color correct those shadows. So they're not just black. So what I might do is, um, put a level's effect on there and go into the blue channel and let me solo the shadow pass for a minute.

Joey Korenman (06:03):

And I am going to push a little bit more blue into the blues, into the, uh, into that shadow pass. Okay. So this is great. You know, I like this and, and, you know, I may want to, I may want to play with even the black output so that I really get some blue in there. All right. And I can see it in context, which is great. Wonderful. Okay. So that's, I like that color correction for my shadows, because ambient occlusion is also generating sort of like a shadow. I'd like the same color correction on the ambient occlusion. Okay. Simple. I just copy and paste levels onto there. Now they have the same effect. Wonderful. Okay. Well, what if now, you know, 10 steps later, I decided, whoa, that's way too blue. Let's pull that back. Well, now I've got ambient occlusion that has an effect on it, and I've got the shadow pass that has an effect on it.

Joey Korenman (06:55):

What's worse is when you're looking at your timeline, you don't see those effects unless you have the layer selected. Or if you select all of your layers and you hit ease, you can see what effects are on there. So you don't get an instant read of what you've done to your comp. And on top of that, I've got two levels of facts that I would like to be identical, but they're not now of course you could make them identical by using an expression to tie the values of one to another. You could do that. Um, but that's going to require expressions and it's going to require some manual setup or a script or something like that. So now let's hop into nuke and I'll show you how this works now in nuke, the way you composite. One thing on top of another is by using a node called a merge node.

Joey Korenman (07:44):

This probably took my brain the longest amount of time to understand moving from after effects to nuke, there are no layers in nuke. It is a totally different way of working and you have to get used to seeing it the way the merge node works is, is whatever goes in. The, a input is merged on top of whatever's going into the B input. And so when you look at at new Gardasil projects, you'll generally see something like this. When there's a whole bunch of passes, there's sort of a, stair-stepping like this. And then once you get deeper into the compositing, you try and make everything go from top to bottom. That's generally the way it looks. And so if we just go from left to right, you can see I have my diffuse pass. And then I emerging the specular pass on top of it.

Joey Korenman (08:31):

All right. And then the reflection pass the ambient pass, global illumination. And then my shadow and my ambient occlusion over here, I've got my, uh, my mats ready to go. And so let's do the same thing. We just did. Here's the shadow pass. And I'd like to introduce some blue into the blacks. So in nuke, there's a bunch of different effects you can use. And everything in nuke even affects are called nodes over here. You've got a whole bunch of neat little tools and you can click on these and you can see all the different effects you have. What I like to do in nuke is just hit tab and type in the name of the effect I want. It's just a little faster. So here's a grade note. A grade note is very much like the levels of fact in after effects. So I took a grade note and I've inserted it underneath the shadow pass in between the shadow pass in this merge node here, because I did that.

Joey Korenman (09:24):

I can now color correct the shadow pass. And I need to make sure that I'm looking through the grade node, remember this, this dotted line, which is connected to this node here. This is a viewer node. This viewer node actually controls what I see right here. So I'm looking through the grade note and now I can use these controls over here. And what I can do is, um, I can grab this color wheel in the lift. Um, and first thing I need to do actually is brighten this a little bit and then I can grab the color wheel and I can start to pull it into the blues like this. And you can see it's getting a little bit more blue. I may want to actually boost, boost all of the colors a little bit and then just pull more blue out. There we go.

Joey Korenman (10:10):

That's getting a little bit washed out, right? Maybe something like that. Okay. So now we can look at the result of that in context, right? And maybe now that I, that I'm looking at it in context, maybe I want to, uh, I want to boost the levels a little bit of the blacks, and then I'll put a little blue in the gamma as well. There we go. And you can see the blue being added to that right now. Here's one really cool thing about working with nodes. I can instantly in like a second, see that there is a color correction being applied to my shadow pass. Now that may not seem like a big deal, but when you're really getting deep into a composite and you have tons and tons of color corrections and masks and all kinds of stuff, working with nodes, you can see every single thing you've done.

Joey Korenman (11:06):

So here's another cool thing. So first let me just adjust this a little bit more because I am kind of nit-picky and I don't like the way it's looking. I maybe don't want that much blue in there. Um, okay, great. So now let's say I want the same grade to be applied to my ambient occlusion. Well, nuke has a very nifty little feature where you can click on a node and you can control, click, edit, and say clone. And what it does is it creates another grade node with this visual link between the two nodes. And this is again, the big advantage of working this way. Whatever I do to either of these grade nodes will be applied to the clone. It doesn't matter which one I mess with. They will both do the thing. Okay. And what's great about that. Is that not only do, do I not have to set up anything with expressions, like you wouldn't after effects, but I can see that they are closed.

Joey Korenman (12:02):

I don't have to remember that they're cloned. I can actually just see it. So again, you get this visual representation. Okay. So that is another huge advantage of working in new, just being able to see the relationship between effects and things like that. So now we're going to hop back into after effects. So now let's talk about manipulating, you know, very specific parts of your image and after effects. So let's look at the shadow pass for a minute. You know, when I move the opacity up and down like this, what I'm noticing is I really like the dark shadow on the ground, but when the shadow on the ground is dark, the shadows get a little too dark on the object. So I'd really like the shadows in the object to maybe be about this dark, but then on the ground, I'd want them to be me be maybe that dark, like pretty dark. So what I need to do is selectively Brighton parts of the shadow pass, believe other parts on touched. So how the heck are you going to do this in after effects that there's not like a super quick and intuitive way to do that? Is there, um, so there's a bunch of ways you might approach this. Uh, the, you know, what I would probably do is duplicate the shadow pass and call one copy shadow floor and another copy shadow object.

Joey Korenman (13:24):

And then what I'm gonna do is take my, uh, my floor object buffer. And there's a few ways that could do this one way is I could just duplicate it, move it down here and set my shadow flora, a layer to use as its Luma matte that floor buffer. And so what that's going to do is it's going to just give me the shadow pass, where that floor is now, that's kind of a messy way of doing it because now anytime I want to split something off and just affect the floor, part of that pass, or the object part of that pass, I'm going to have to have a copy of this floor buffer layer. So there's another way to do it, which is a little bit cleaner. I'm just undoing a bunch of times. Uh, and that is to use the set mat effect.

Joey Korenman (14:08):

Okay. So if I say shadow floor, and I only want the part of the, the past, that's touching the floor, I can go up to effect channel set mat. And I want to take my mat from the layer called floor buffer. And I don't want use the off channel. I want to use the luminance channel and it's not working now. Why is it not working? Great question. The reason is because of the order of operations that you have to deal with and fight against an after-effects this floor, buffer layer has an effect on it. The extractor effect, which pulls out the floor object buffer. So the problem is if I put the set effect on the shadow floor layer, and it's looking at the floor buffer layer, it's actually looking at this layer before this effect gets applied. If that makes sense. So what it's actually seeing is this it's not seeing here, I'll show you.

Joey Korenman (15:06):

It's actually seeing this as the layer. It's not seeing this because in order to see this, it has to take into account the effect, which it doesn't do because of the order of operations. I know it's confusing, right? So one way around that is to pre comp your object buffers. Okay. And make sure you move all the attributes to a new comp and we'll call this floor buffer pre comp. And now I can use this as a, um, in my set, matter of fact, okay, now it should work fine. So that's the work around, you can pre comp your, your object buffer, and now it works. But now of course, your object buffer is buried inside of a pre-camp, which means if you need to replace this render with another version of your render and you don't want to just totally overwrite this one. Well, and I have to remember that there's a copy in this pre-camp and it really just starts to get confusing.

Joey Korenman (16:02):

So now that we have that, I would do the same thing for this object, buffer the, uh, the spikes. So I'd pre comp, this we'll call this pre comp spikes buffer pre-camp. And then I would put the set mat effect on this version of the shadow pass. And then we'll set this to spikes, buffer, and instead of alpha channel, we'll say, luminance, there we go. So now I have two shadow passes, and now I can take my object buffer. I can take the shadow from the object, and I can just fade that out a little bit. Okay. So now you have control over both parts of your shadow pass. There are other ways to do this, um, but this way is a little bit cleaner because now you only have two layers to mess with. And I want you to just notice how little information you are given about your composite from after effects.

Joey Korenman (16:59):

Right now, we have a pretty complex little set up here. We have a floor buffer pre-camp inside of which is our floor buffer. And then we have a shadow pass, which is getting its initial image from this extractor effect, pulling the shadow, pass out of the EXR file. Then we're using the set mat effect to pull the mat from a different layer. And you don't get any feedback that that's happening. You just have to remember that it's happening. And the worst part is if you have to work on someone else's after effects project. So now we'll hop into nuke and I'll show you how this works, and you're going to laugh at how much simpler it is. Let me show you how simple this is to do a nuke. So what I'm going to do is use a grade node, and I'm going to put it right here, and I'm actually going to rename this grade note. So I can start to keep track of what each of these grade nodes are doing. So this grade node, I'm going to come up here and I'm going to rename it grade. Let's say lighten.

Joey Korenman (17:57):

Okay. And what I want to do is just use the controls to lighten. I'm sorry, I'm not looking through the notes. See, this is another thing about nuke I haven't really gotten into yet, which is that you can look through, you can look at any point on your composite, so you can look at before and effect in the middle of an effect all the way down here. So I want to look at this node so I can see what I'm doing, and I'm going to adjust the lift, right? And you can see that that is brightening, this area here, right? I can also adjust the gamma. Um, there's a lot of, there's a little bit more finer control with color correction in the new color correction tools than there are in the aftereffects color correction tools. Um, and I always get them confused. Um, but you can sort of mess around with them and see what they do, but the, uh, the gamma and the lift are going to give us the most effect here.

Joey Korenman (18:52):

Okay. So I only want to lighten this part. I don't want to lighten the floor. So what would be great is if I could just tell this effect, use this mat to only affect that area? Well, a lot of nodes in nuke have a little arrow coming out the side here. And if you pull that out, it says mask. So all I have to do is take this arrow and connect it to this. And now it's that simple. I can control just that part of the image. There you go. Piece of cake. Um, now, you know, I'm pretty anal when I'm doing, when I'm using nuke. And I don't like when lions kind of crisscross over things like this. So, um, if you hold down the command button, it'll bring up a little.in the middle of each of your, these are called pipes in, in node. So you can grab this little dot and then you can create a little elbow so that it can nicely kind of go like this. And you can see that's what I've done here too. One of the amazing benefits of doing this is a that now let's say, and actually in reality, I had two versions of this render. This is the second version. Let me bring in the first version really quick. And, uh, and I'll show you. And I called it bizarre render. So there it is.

Joey Korenman (20:07):

So here's version one, here's version two. I can just do this. And the entire comp is updated with this image sequence, right? It could not be simpler. So now if I want, if I want to test out different versions of my render with this comp setup, that's all you do. So that's, that's one of the benefits of using these little elbows too. Cool. All right. So now we can look down here. This is the very end of our comp right? The last merge node. That is where our comp is sort of ending at the moment. So if I look through that, I'm going to see everything. And so now looking through there in context, I can of course, grade the shadow on the object. All right. And you can see it's not affecting the ground. It's just affecting the object and it literally took two seconds to do that.

Joey Korenman (20:55):

Okay. Uh, so let's hop back into after effects and I'll show you a couple other things. Now, I'm not going to do a full comp in after effects because that would take too long. But I do want to show you some of the things I typically do when I'm composite and stuff like this. So a good example would be if I wanted to get a nice glow on this object without having a glow on the sky and on the ground. All right. So what I, one of the techniques that I like to do a lot to achieve a glow is to just take a copy of the object, blur it and add it on top of the original object. And that that's how you get a glow and then you can color correct that to kind of get more or less glow. So if I wanted to do that, then what I need to do is actually pre comp my whole scene.

Joey Korenman (21:43):

Okay. So I sort of get the comp where I think I want it. And then I'm going to pre comp, I need to pre comp the entire thing. Remember, I can't just pre comp the parts that are turned on because this shadow layer and this shadow layer, they're referencing object buffers that are up here, even though those are turned off. So I need to select everything and pre comp it. And then I'll say comp pre comp, all right. I could probably come up with a better name than that, but it'll work for now. So I've got comp pre comp, I'm going to go into my compre comp and I'm going to pull out this spikes object buffer. So let me copy that. And now I'm going to bring it back to here and paste it. So what I want to do is make a copy of my entire composited piece and I'll call this glow.

Joey Korenman (22:33):

And then I want to use this object buffer as a Luma matte, right? So now I've got my scene and then I've got just those things, right? And so now what I could do is I could solo those and I could use levels to really crush those blacks and try and only pull out the brightest parts of that image. And then I'm going to use a fast blur to blur it. And we are so here's, here's a pretty awesome thing about after effects that it always gets me. So what's going on here is I'm blurring this layer, but it's being maded by a layer that's not blurred. Okay. So that means that I'm blurring the color inside of, of my, my render pass, but the alpha channel is not blurred. So what I actually need to do is delete that fast blur, and I'm, I'm gonna, I'm gonna command X and cut that levels.

Joey Korenman (23:39):

I'm going to first, pre-camp these two things together, right? And this is a theme after effects. A lot of times you have to pre-com things in order to get them to work, right? It's now paste that level's effect back on there. And now I can use the fast blur and it will blur correctly. That's what I wanted. And then I can set this to add mode and you can see, I get this nice glow, very nice, and I can control the opacity of it and all that stuff. Wonderful. Right. That's exactly what I wanted. Except now I want to adjust that color adjustment that I did on my shadow pass. Well, shoot, that's buried inside this pre-camp and, and so, you know, there are ways you can work on this comp while looking at this one, right? I could lock this viewer and then come over here and then come to my shadow passes and, and then adjust the levels.

Joey Korenman (24:34):

And then once I let go, it's going to update, but you could see how many levels of abstraction have to happen to do something like this and after effects. So now we're going to nuke and I'll show you how it would work in nuke. Now, the first time I figured this out, when I was using nuke, it blew my mind because it is really, this is in my mind, the biggest difference between nuke and after effects. Okay. In after effects, you have to really understand how the program interprets things based on footage and pre comping things in nuke. You can pretty much ignore that. Okay. The way new quirks is every single level of a comp and by level, what I mean is this is a level, this is a level, this is a level, this is a level all the way to the end.

Joey Korenman (25:18):

Even the final step here, this is a level and every level of new comp is essentially pre comped already. So what that means is this, okay, I want this render right with all my passes comped together, the way I like I want to now take just the object out of that, blur it and add it back on top of itself to get a nice glow, just like we did an after effects. So what I need to do is first use this mat here to get a version of this that doesn't have the sky in the ground. So in nuke, there's a, you know, there's a node called copy and it's, it's kind of tough to explain what it does without getting a lot more technical with the way new quirks nuke is very good at letting you take any channel red, green, blue, alpha, and there's even more channels you can combine with different passes and you can make different things.

Joey Korenman (26:11):

And so what I'm going to do is I want to combine this right here. I want this to be the alpha channel for my final render here. Okay. So what I'm going to do is I'm gonna use this copy node, which does that for me. And the way the copy node works is it takes by default, the RGB channels from the B input, and then on the, a input, it takes the alpha channel. Okay. So I'm going to take this a and putting, I'm going to pipe it to this little guy here, which remembers our object mat. Right? And now if I look through this, it doesn't look like anything's different. Okay. But if I hit a button, it's going to show me the alpha channel for this node, which is now this, if I go back one level and I look here, the alpha channel is kind of weird.

Joey Korenman (26:55):

It's not actually the correct alpha channel for anything. So this copy note gives me the correct alpha channel. And then in nuke, if you want to use that alpha channel to knock out the background and only keep the foreground, you have to pre multiply it. I have a whole video series about this called pre multiplication demystified on school of motion.com. Check it out. It'll explain this a lot better. So now I have this and I have this. And what I can then do is maybe put a great effect on this, right? And we can push the black point up, pull the white point down. So we're getting some really nice highlights. And then I'm going to add a blur node, right. And you can also see me, you know, coming from after effects. It was really kind of an eye opener to see how quickly you can sort of like preview things in nuke.

Joey Korenman (27:51):

Everything works very quickly. So here's my blur. Okay. So now we've got this and we've got this and we want to have this go on top of this. So what I'm going to do is add a merge node. And now what I'm going to do is I'm going to say the B, right? Because a goes over B. So B's the bottom, that's the bottom. This is the top. Okay. And so before I'll show you what this looks right. It's not right yet, because I need to tell this merge node to add those pixels on top, instead of just placing them on top. So I'm going to set the operation two plus. And so now we're going to get that nice glow. So I want you to try and understand what's going on here. Imagine in after effects this entire column, this entire set of nodes up here that is creating this result has to be pre comped and then combined with an alpha channel in another pre-camp.

Joey Korenman (28:48):

And then finally put together in a third pre-camp. Whereas in nuke, you can literally just split off different pieces of your comp. You can just add a branch that goes out this way. So this result goes here and it also goes here, and this copy of the result has this happened to it. And then it's added on top here. Okay. And every single merge node, by the way, in nuke, it has a mix setting, which is basically opacity. So I can turn that glow up or down and get it exactly where I want. And the beauty is that if I want to then mess with, for example, the amount of shadows that are on the object, I can see, even with my screen zoomed way out that this grade light node, that's the one I want to use, because again, you can see the mask going right into it, and I'm looking at the result of my comp, but then I can easily adjust the color correction.

Joey Korenman (29:42):

And again, look how quickly it updates for you. It's very fast. Okay. So maybe with that glow, I decide, I want the shadows a little bit darker again, and this, and the result of this is now piped all the way through the comp into our glow and merged on top of itself. And that is so much easier. Once you get the hang of looking at this, I can see what's happening here without having to open up a fax and click on layers and solo things. You can just see it. Uh, another cool thing about nuke is that when you do things like this, you can literally step through your comps. Step-by-step very easily. So I can say, this is the beginning, and then this, then this, then this, then this, then this, then this, you know, and you can step through and see all of the things you've done.

Joey Korenman (30:28):

Okay. So, uh, now what I want to do is just work on this comp a little bit more so you guys can see, you know, just really how, how you can really fine tune things in nuke in a way that's, that's not, it's possible in after effects. It's just a lot more painful. All right. So let's, let's say, okay, now we just want to start doing an overall color, correct. On this. Right. So what I'm gonna do is I'm just going to add, instead of a grade note, I'll add a color, correct node. Okay. Color, correct. Node is sort of like a grade node. Um, it, it just gives you a lot more kind of fine detail that you can, you can mess with. So it breaks the shadows mid-tones and highlights up into sort of their own effects. And so if I had just the gain on the midtones, you can see that brightens just the brightest parts of my image.

Joey Korenman (31:15):

Okay. The, the highlights actually, um, they're very, they're very, very, very finicky. So I usually use the midtones. So let's say that I like what this is doing to the floor. I don't really like what it's doing to the, um, to the object, but I do like what it's doing to the floor. So, you know, in after effects, you'd have to jump through a whole bunch of hoops to have that only affect the floor. Whereas here, all I have to do is come up here. Yep. There's the floor mask, right. So I can just take this arrow, the one that's coming out of the side of the node and pull it up here and connect it to the floor. And there you go, then I'll hold command so I can make a nice little elbow like this. So it's nice and neat. Okay. And then I can just quickly rename this color, correct floor.

Joey Korenman (32:02):

Okay, cool. And then there it is. It only affects the floor and you can even get a little bit crazier if you wanted to. If I said, okay, I only want it to affect the floor, but I kinda also only want it to affect the floor in more of the center of the frame and not the edges of the frame. So now what I could do is I could, I'm going to use another effect called a roto node. And what a Rodo note is, is it just lets you draw shapes. You can think of it like a mask in nuke. Alright. So I'm going to double-click on that. And I'm just going to draw a mask around the part of the floor that I would like to be brighter. Okay. And what I'm gonna do is I'm going to insert this right here. Right. And then I'm gonna look through it.

Joey Korenman (32:49):

So here's, what's happening. This pipe is bringing in the floormate as an alpha channel. Okay. And my roto node is also creating an alpha channel. So, so if I just look through the, the normal RGB channels of this node, and I know I'm getting a little more complicated and technical and maybe some of you after effects guys are lost right now. Um, but I have to actually look through the alpha channel by hitting a, to see what this roto node is doing by default. And by default, what it's doing is it's creating a white shape wherever I put it. And so what I'd actually like it to do is create a black shape. So I'm going to go to, um, I'm going to go to shape and I'm going to change the color to zero, and then I'm gonna hit invert. So all it's doing is it's creating a black shape to cover up pieces of the off channel.

Joey Korenman (33:38):

I don't want. So now I switched back to my RGB and look through this. You can see now this color correction is only hitting where the floor exists and where this mask is. And masks and nuke are also really pretty nice to work with. If you hold command, you can just feather them very quickly just by grabbing the points. You can do this in after effects to, uh, you have to use the mask feather tool, which is not nearly as nice to use. Um, and you can also see how smooth and quick the mask tool works and new. So I'm going to select all of these and just scale this down a little bit. And so I'm just kind of getting, getting now I'm getting this nice. It's almost like there's a, like a flashlight on the camera lens and it's giving that like a little bit of an extra specular hit there.

Joey Korenman (34:25):

Right. Um, let me, let me change a couple settings in new care, make this a little easier to look at. Cool. All right. So now we have done a very specific color correction on a very specific part of the image. And again, it only took this one pipe coming out of this mat and then I put a roto node in front of it to knock out an alpha channel, and then we get this piece of cake. Um, so now let's talk about some other cool things that you can do in new that you can't really do an after effects very easily. Um, there is actually a new feature in after effects that will let you use masks to control where an effect happens. Okay. And that's very similar to what's going on here, piping in, um, you know, piping in this roto node into the mask input of our color, correct here, but in after effects, you can't very easily pipe in, you know, mats like this that come from cinema four D so let's say we wanted to make a vignette here.

Joey Korenman (35:24):

Okay. It was one of my favorite things to do, not just in motion graphics, but in life. So I'm going to make a grade node and we're going to connect it up and I'm just going to rename this grade Vicky, and then I'm going to make another Rodo note. So I'm just going to hit tab type in roto. And I'm just going to grab the ellipse tool here and just draw a quick ellipse like that. Okay. And so if I look through this roto node, by the way, this is one really cool thing about nuke is this roto node is not even connected to anything, but you can still see the controls for it. And that's one of the great things. Nuke makes it really easy to look at absolutely anything but control something else very easily. So what I'm going to do is I'm going to now grab the mask input here and I'm gonna connect it to this.

Joey Korenman (36:14):

And if I look at the Rodo and I look at the alpha channel, there's my alpha channel, and I'm actually going to want the inverse of that. Cause I want to only hit the edges of my, of my, um, comp. So I can just go to my, um, go to my shape tab up here, by the way, I haven't mentioned it, but this is where all of the sort of properties and settings for any node pop up. So that's why when I double click the roto node shows up here and I can hit invert, right? I can go here and I can add it in yet just by darkening, the image like this. Now of course, it's a very hard vignette right now. I'm gonna hit the Oki, turn that overlay off for a minute. This is a very hard edge. So I could do the same thing I did here.

Joey Korenman (36:59):

If we look at this roto node, you can see that I manually feathered it the way I wanted, but there's another way too, because this mask input, it's not taking a shape the way after effects, masks work, right? They are shapes. This mask input is actually taking the alpha channel. So whatever, whatever the result is, right. Again, remember I said, every node, every step of your composite in nuke is already pre comped. So I don't have to think of this roto node as a shape. It is, it is actually kicking out an image. So I can manipulate that image to change what this mask is doing. So what I could do is I could add a blur node after this Rodo right? So it goes from a roto node into the blur node, into the mask input for my grade. So now if I blur this, it's going to blur the mask, right.

Joey Korenman (37:55):

And it's going to create a perfect little vignette for me. And it don't, you know, the slider goes up to a hundred, but you can actually crank that if you want to. Right. And then here's another great thing, uh, about, I'm assuming other node based composites do this too, but nuke makes it really easy. If I want to just quickly turn this vignette on and off, I can hit D right. You can see very quickly before and after, and you can step through it. I can say, okay, here's where we started. And then we have the glow and then we color corrected the floor. And then we added a vignette. So you could see we're getting, we're starting to get really fine tuned here. All right. So here's another thing that you can do in after effects, but it's kind of a pain. Um, and actually, why don't I first hop into after effects and show you this?

Joey Korenman (38:39):

All right. So our after effects comp is not all comped and we're not, we haven't done as many things to it. Um, but what I want to do is I want to get some depth of field just at the bottom part of the image here. So this is a wide angle lens, uh, from cinema 4d. And so with wide angle lenses, especially when you're seeing stars and stuff that are essentially infinitely far away, um, you know, you're not going to get shallow depth of field, but if you're very close to the ground, you might get a little bit of depth of field at the, at the bottom. And it look really cool. So I'd like to do that. So what I'm going to do is I want to just selectively blur the bottom here. So let's think how could we do this in after effects when we, I mean, that's step one is you have to think about it because you've got all of these passes and you could do that step here, or you could go downstream and do it here and you have to kind of figure out like, okay, where does it make sense to do it?

Joey Korenman (39:39):

If I do it here, one of the issues that might pop up is that you've got a glow happening, right? And so your glow is going to be sort of this post effect that should happen just on top of your final image. So you probably don't want to do the glow and then the depth of field you want the depth of field to happen first, probably. So that means we have to do it in here, but we've got a million passes that we're dealing with. So, so how do we do it? All right. So I'll show you a trick that I like to use. So first thing I'm going to do is just create a shape like this, roughly, where I want the image to be blurred, and then I'm going to take that shape and I'm going to put a fast blur effect on it, and I'm just going to blur it.

Joey Korenman (40:27):

I'll move it down so that it's only kind of catching the bottom of the frame there. Okay. Um, and I'm going to make this white, then I'm going to pre-com this, and I'm going to call this depth of field gradients. All right. And I'll tell you why I have to pre-cum in a minute, then I'm going to add a solid layer. That's black. I'm gonna put that at the bottom. So this pre-com is just this gradient. Okay. And I don't need it to be turned on. It can be turned off. So then I'm gonna make a new solid setting, a new solid, and I'm going to call this depth of field and I'm gonna make it an adjustment layer.

Joey Korenman (41:10):

And I'm going to put the compound blur effect on there. You could also do camera lens blur, but compound blur will work pretty well for this. And it renders faster and compound blur takes a gradient, um, a black and white image and it blurs the pixels based on that gradient. Okay. So now I can tell it to use the depth of field gradient and don't blur it that much, just blurred a little bit. And one of the problems with compound blur is that it gives you these stupid edges here, which shouldn't really like. Um, but I'm not going to mess with that right now, but I want you to see that this works right. And there are ways that you can, you can get rid of these edges too. Um, but what I want to point out is that if I want to change where the depth of field is now, this effect is referencing a gradient that is pre comped, right?

Joey Korenman (42:00):

So if I want to change it, I have to come into here and then move my shape layer down and then come back here. And then if I want to see the result of the whole thing, I come here. And, and so again, you're in that situation where you have things that are pre comped affecting very greatly, the look of your comp, and you don't have instant access to them and you can't see how they all fit together. So now let's hop back into nuke. All right. So now we'll do the same thing in nuke. Um, so again, I want to do this before this glow happens. Okay. So I want this to happen right after this node. So what I'm going to do is just put an elbow here and I'm going to connect the glow to the elbow like this. And now I have some room here where I can do the depth of field.

Joey Korenman (42:44):

So what I'm gonna do is I'm going to make a roto node and I'm going to grab a rectangle and just make a shape like this. And again, if I look through the roto node, it's just making an alpha channel where that shape is. And so what I need to do to make this work in nuke, uh, this is something that it's a little bit more intermediate nuke, I guess. Um, but the way the nuke, um, node works that I want to use to do depth of field. This is called the a Z D focus node. All right. And this is what you would use with a depth pass. And I'm basically just making my own depth pass here. So I'm just going to put the Z D focus note in here, this node, it's looking for a depth channel. So I actually want to take this alpha channel I've created and turn it into a depth channel.

Joey Korenman (43:36):

All right. So the way I'm going to do that is by using the copy note again, and I'm just going to put this in here, right? And so by default, again, that copy node, it takes whatever comes into the, a input and it uses that alpha channel. I'm gonna change the settings on it, so that instead of copying the alpha channel into the alpha channel, I'm going to tell it to copy into the depth channel. And now if we look through the ZD focus note, it's all blurry. Um, and so I'm just going to change the math on this to direct, and you don't really need to, um, you know, I'm not, I don't want to make this about these ed focus note. I don't want to get too far into that. Um, but basically this is just going to let me use my black and white image here, um, as, as a depth pass and not have to worry about focus or anything like that.

Joey Korenman (44:24):

And this maximum amount here, this is controlling how much blur now you can see I've got a very hard edge. So what I need to do is blur this, right? And because of the way nuc works, if you remember this was the same way we made our vignette, uh, I can take this Rodo note and just put a blur node after it, and that is going to affect the depth of field, right? And so now I'm getting a nicer blend with the depth of field. If we look through this, but through the blur node, look at the off channel. I've now got a nice gradient. That's being copied into the depth channel. And then that's being run through a Z D focus node to create this kind of fake depth of field. Okay. Now here's, what's great about this. If I double click this, I can see where the depth of field is.

Joey Korenman (45:12):

Okay. And if I step through my animation and I need to make this animation a little bit longer, it can, because this is actually 144 frames, not 36. Let me just make sure all of this is set up right. Because it don't think it is. There we go. Okay. So if we step through towards the end here, right? I don't want the depth of field that high. Once we get closer to these crystals. So what I'm going to do is I'm going to just kind of go forward till about here, and then I'm going to, double-click my roto node. And I'm a select that shape, select all the points on it and just move it down a little bit. Okay. And then I'm going to step kind of in the middle here and move it up a little bit more, and you can see these blue little, um, you know, the blue highlights that's telling me where key frames are being set.

Joey Korenman (45:57):

Okay. And I can really quickly step through and just set key frames, making sure that my depth of field never gets too close to those crystals. And all of this is being done in context at any point. So if I want to see the final comp, right. I can just set my viewer to look through this last node. But if I want to just look at the ZD focus note, I can look at that. If I want to look at just the first part here, I can still see where my mask is. So again, nuke lets you see everything at any point in time. All right. And so now, you know, hopefully you guys are really starting to see the power of working this way. I'm going to show you a couple other things, um, that are just kind of nice. And you know, one of the cool things that, uh, you know, neglects you do is be incredibly specific with where effects are happening and where they are not happening.

Joey Korenman (46:53):

And you can go back and adjust these things very easily. So let's, let's take this, this glow for example, right? Let's say that, you know, okay. I like the glow, but I don't want it to glow on the right side. As much as the left side, I do want some glow but more on the left side than the right side. Okay. Again, an after effects is you you'd have to jump through all kinds of hoops to do that. Um, what we're going to do here is just add a grade node. Okay. And I'm going to add a roto node over here. I'm connected in, and then I'm just going to grab a rectangle and I'm going to cut this in half. Okay. Like that. And my overlays are off. So you can't see what it's doing. So let's do that again. Okay. And actually I'm going to select the other side of the image.

Joey Korenman (47:42):

Right. And I want to make sure that I'm actually selecting literally half of my image and I want to blur that. Right. So it's not this hard edge kind of effect. So let's just blur it to a hundred like that. And you know, this is what it's creating, I'm creating a gradient and then we'll look through our grade note here and I can now just dark in the right side of the image and let's look at this in context, right. The light is actually coming more from the left side. So it would make sense that it wouldn't glow as much on the right side. And so I can just turn it down a little bit. Okay. That's how easy it was to do that. I just made a new grade node, made my own little mask and controlled it. Right. And then let's say that we wanted to, you know, I don't know, we want to now color correct the sky a little bit because now looking at it, there's kind of some red in this blue.

Joey Korenman (48:34):

Uh, it's not exactly the color I want it to be. So I'd like to color correct the sky. Um, and so, you know, this is actually going to be pretty easy to do. Um, you know, you need to figure out where in your comp you want to do the color correction. I could do it at the end here, but I've already got glows and depth of field happening. So I probably want to color correct it before that. So what I'm gonna do is just grab all of these nodes and just scooch them down. I'm going to come in here and I'm going to add a, let me think here, I'm going to add a hue shift node. Okay. And what hue shift does, it's like a hue and saturation effect and after effects and it's going to let you change the hue. It's kind of nice.

Joey Korenman (49:16):

I kind of like the sky doing that. That's kind of nice that nice teal. Right. But I don't really want it to do that to the object just to the sky. Okay. So again, we, now you guys probably can guess how easy that's going to be. All I need to do is connect the mask input to the sky mat and it will only affect the sky. Okay. There you go. Um, another cool thing you can do, uh, in nuke very easily as add light wraps. This is another thing in after effects that you have to kind of set up in a weird way and pre comp and do a lot of things. If I wanted to add a light wrap, this is actually a light wrap node. Um, and the way it works is it's going to require that I have the alpha channel for my object.

Joey Korenman (49:59):

So if I wanted to have a little bit of a glow kind of on the edges of this, like this thing has a light wrap on it. Um, then what I would need to do is, uh, first create a, um, you know, create a, a node that contains just that object in it. Well, Hey, we already have that. Don't we right, right here coming out of this premolar node, we have exactly that. Interesting. Okay. So what I want to do is, um, I'm going to set my, a input for the light wrap to be that okay. And now the B input for the layer app is going to be whatever the background is. Okay. So the background for this could just be maybe the huge shifted sky. And if I look through that and I say, generate wrap only, and I turn the intensity up, there's my light rap.

Joey Korenman (50:47):

Right. It's that simple. And so then I could just put a merge node right here and just merge that light rapper right on top. And there you go. Right. And I can disable it and enable it to show you what it's doing. Right. And so you can see, I just sort of took pieces that already existed, added this light wrap node and merged it back on top of itself. And because everything's interconnected, I can see how it's all connected. Okay. Um, and I can adjust the light rap settings if I want, you know, if I want it to be less blurred, more intense. Um, and there's some other options here too. And then, because I have it kind of as its own layer, right.

Joey Korenman (51:33):

Because I have it as its own layer, I could also color correct it. Right. So I could add, I don't know, let's add a grade node and let's push the white point. So it's a little bit brighter and then let's go into the gamma and let's push let's push a little bit of that teal color into it, and then let's look at the total result. Right. And so I can select both of these nodes and hit D to C within, without, right. And it's pretty cool. It's a little bit bright. So I may want to come into my grade node and bring that white point up a little bit, just like that. Cool. All right. And so now I've got my light wrap and I didn't really have to do much work to get it. And now every, you know, the rest of this is just going to be sort of the finishing touches.

Joey Korenman (52:20):

Right. I might do an overall grade. Um, I might do some other things, actually. Let me show you. I have a, I have my example here opened, and if we go to the end, I'll just kind of step through the other things I did. Um, I did some extra color correction here and I added motion blur. There's a, there's a note in nuke. It works very much like real smart motion blur, and it can sort of read frames and add motion blur to them. I did some color correction. Here's our glow and then vignette. Um, oh, another thing I did, I wanted to show you guys was, you know, the vignette is, uh, let's see, the vignette is right here. Right. And another thing that might be cool is to have the vignette not only dark in the edges, but de-saturated the edges a little bit.

Joey Korenman (53:06):

So I could add a saturation node here and I could, de-saturate my image kind of look through it. Right. But of course I only want it to de saturate the edges. Well, guess what I already have here, this nice map that I've created. Right. So all I need to do is grab my mask input and connect it to this. And now it's only going to de saturate the edges. Right. And what's great about this too, is that if I decide, I want my vignette to be a different shape, I can change this. Right. And I need to go to the first frame. So I don't accidentally set a key frame. Let's say that I wanted that vignette to actually be a little bit, a little bit bigger, sort of around the edges. I could do that. Right. And it's going to update both the vignette grade and the saturation at the same time. Okay. And then what I, what I love to do in nuke too, is I like to play with color because it's really fun and easy to just kind of paint swatches of color into your scene. So we'll add that huge shift node.

Joey Korenman (54:15):

And also real quick, I want you guys just to notice that, you know, as I said, sort of in the beginning of this video, now, the cop is moving kind of in a straight line down this way. Right. And so this is kind of the way a nuke tree typically looks. So with my huge shift node, I can just rotate the color. I got to look through it or I won't see it. And I can just kind of find a nice color that was going to kind of play off of that teal color. Right. If I, if I hit D that's kind of the teal color and that's going to be the new color. And so what I'm gonna do is grab a roto node. And actually it might even be easier to just copy and paste these, right. They're already set up, got to be careful.

Joey Korenman (54:54):

If you copy and paste, while something is selected, it's going to connect them and you may not want them connected. Cool. So now I can grab this roto node and I need to tell the shape to not be inverted. And I'm just gonna move this kind of up here, kinda like that. And I can use, I can now just sort of shape this mask really easily to just give a nice wash of color over that part of the image. Right. Pretty simple. And I may want to blur it a little bit more so that it's a really nice soft kind of transition between those two colors. And then let's say I wanted to do the same thing down here. I could just copy and paste this whole setup, just like that. Right. And then look through this, you shift, take this roto node, grab the shape and scale it down, kind of upside down at like this, move it over here, maybe put it there.

Joey Korenman (55:58):

And then I want to be blur that a little bit less and I want a huge shift to differently. So let's crank the saturation up for a minute so we can really see what the colors doing to the floor. And let's just mess around with this. It might be neat to have kind of a warmer color, like something like that. Yeah. Kind of in there. Um, and you can play with the too, right. And you can, you can even use this kind of as a color correction tool. Um, and then now that I'm looking at that, I want it to blur a little bit more. Uh, one of the last things I did on the comp that I rendered for the preview at the beginning of this video was I put lens distortion on it. This is a wide angle lens and cinema 4d. So you're going to get some lens distortion.

Joey Korenman (56:43):

Right. Um, and there's a great lens, distortion note, a nuke. And then I also added a little bit of grain, which is a good idea to do with any 3d render. So it doesn't look so perfect. Um, there's a lot of presets here and I don't, you know, I typically don't want too much grain. Um, so I find a preset that doesn't have a ton of grain and then I'll usually knock it down by about half. There we go. Cool. And now we are pretty much done with the tutorial. What I hope you all got out of this is that when you're, when you're compositing, you know, in after facts, at least this happened to me. You can tend to limit yourself with how precise you are with your image. You might kind of self, you know, impose these limitations on yourself. Like, oh, I would love it.

Joey Korenman (57:33):

If I could have a glow that was only right here and a little bit less of a glow here, but an after effects, that's going to take so many steps and so many pre comps. And then once it's set up, it's going to be difficult to change difficult to, to remember in a month when you have to go back and revise something, whereas in a node based composite or not just nuke, but any node based compositor, you get a much better visual representation of your comp. It's a lot easier to see the relationship between things and to see what masks are doing and what alpha channels are doing. So I hope that, you know, by watching this, maybe you're a little bit more intrigued by nuke. Maybe you want to go download the demo and play around with it. Maybe you want to take a new class and try to understand it a little more, but I really hope that I demystified a little bit and showed you some of the pros of using nuke.

Joey Korenman (58:23):

Now it's not all, you know, sunshine, if you wanted to try and animate something in nuke, you can, but I wouldn't recommend it. It's not really designed to do motion graphics the way after effects is before compositing stuff like this is brilliant. So thank you guys so much. And, uh, that's all, I'll talk to you next time. Thank you guys so much. I hope you learned something and I hope maybe you're a little bit less afraid of nuke than before you started this video. Uh, and what I really want the takeaway to be is that nuke can just be another tool in your tool belt and one that's very, very good at compositing and giving you a ton of control over your final image. So thank you guys as always please join the mailing list. If you haven't please follow us on Facebook and Twitter, and I will see you next time.

Success! Check your email (including spam folder) for your download link. If you haven't yet confirmed your email with us, you'll need to do that one time.
Oops! Something went wrong while submitting the form.
No items found.
No items found.