From the course: VFX Keying: Master Course

How to apply light wrap to your comp - Nuke Tutorial

From the course: VFX Keying: Master Course

How to apply light wrap to your comp

- [Steve] This chapter is about what comes after the comp, all those little things, and some not so little, that you can do for your comps that will improve their photorealism. We'll start by looking at lightwrap, where we simulate light from the background plate wrapping around the edges of the keyed foreground object. Nuke has a lightwrap node of course, but it'll be more informative to roll our own lightwrap first to see how it works, then we'll check out the lightwrap node, which adds more adjustments. Let's start by rolling our own here. We start with a background plate and we give it a big old blur. I mean, this is a big blur. The idea is we want to knock out any detail in the background because we just want the light. If you leave it sharp, you'll actually see the details on your character, and it'll look just like a semi transparent edge. So the next thing we do is clear the core where our character is gonna go. And we do that here, we'll just take our alpha channel that we create here, give it a blur, and use that as a mask on this grade node to clear the foreground simply by taking the gain down to zero. Now you can adjust the thickness of this edge with this blur adjustment right here. So after we've cleared the core, next we zero out the backing. Now this is the workflow for a premultiplied foreground. We'll talk about unpremultiplied in just a minute. To do this we simply take our original key, not the blurry one, but our sharp key, and use that as a mask in this grade node here, bringing the gain down to zero. And that clears everything out here. This grade node here is simply an aesthetic adjustment. And then we add it to the background with a plus operation. You can see it now right on top of the character. Then we comp the finished lightwrapped character over the background plate. Now, of course, if you wanna increase or decrease the intensity, of course, we do that right here. If you want to increase how much it wraps over the character, you increase this blur operation here. Now let's talk about that premultiplied unpremultiplied workflow. So if you are working with an unpremultiplied, or a not premultiplied, in other words have an alpha channel, but the foreground has not been multiplied yet. In that case, you do not do the zero backing, you leave that out. Then this gets summed with the unpremultiplied foreground. Then the finished lightwrap foreground is then premultiplied, and then that's what goes over the background. Now that we've seen how to build our own lightwrap effect, it'll make Nuke's lightwrap node much easier to follow. So we'll clear the property bin, hook our viewer up to the lightwrap node, double click to open it up, and at first you'll see no change because the intensity is set to zero. So if we dial up the intensity, we bring on the lightwrap. The diffuse increases how deeply it penetrates, it's analogous to this blur operation here. And from a workflow standpoint, you dial these two things back and forth until you get the right look for your shot. You also have an option to generate just the wrap only, And this option will disable the luminance calculation so you get full brightness no matter the brightness of the background or the character. And then this adds a glow to it. And, of course, you can have all three if you want. We'll turn them all off. Now the foreground blur, missed one, ha. Now the foreground blur also does something similar to what we did over here. As I increase this, you can see that it increases the penetration of the lightwrap around the character. Put that back. The background blur is how blurry the background plate is, that is analogous to this blur over here. You can see that if I push in here, I'm going to take the diffuse down, you can see that the sky is wrapping here and you get a nice sharp edge where the sky meets these hills, so we're getting a very dark lightwrap over here. But if I dial up the background blur parameter, it spreads it out further and further over the character. Saturation simply allows you to decrease or increase the saturation, yikes. And luma tolerance restricts how much luminance before it will actually lay the lightwrap over your character. You get to choose your merge operation, but plus is the usual default. And then use the constant light allows you to, yikes, add a constant color which you can then dial up here, very attractive. I don't know why you'd wanna do that, but there you go. One of the key issues with lightwrap is to not overdo it, okay, you just want just a presence, you just want to feel the lightwrap, you don't really wanna see it. Lightwrap is just one of the techniques for making the foreground object appear to be in the same light space as the background plate. The other major thing you can do here is proper color correction which we covered in chapter seven, color correcting. Next up we'll see how to compensate for the artificially sharp edges of a keyed composite by applying edge blending.

Contents