Nuke 7.0 - ZDefocus from The Foundry on Vimeo.
Nuke 7.0 - Bokeh in ZDefocus from The Foundry on Vimeo.
This is Steve Wright for The Foundry, with a tutorial on the ZDefocus node’s bokeh effects. In the previous ZDefocus node tutorial, we took a quick look at the bokeh settings. In this tutorial, we will dive in for a much closer look to see the amazing amount of control you have to dial in the look of a lens bokeh. I will be using this city lights picture that has this depth.Z channel already built in. To get my ZDefocus node, I will use my Tab and search. Because the image has a depth channel, I already get a default defocus.
We will be looking at all three of these filter types, starting with the disc filter. The first parameter, filter type, determines whether the bokeh is a hard circle or a soft fuzzy blob. So as you move towards 0, it becomes just a Gaussian curve, back to 1, a sharp disc. The aspect ratio will squeeze it vertically or stretch it horizontally, so you are covered whether you are working on anamorphic plates or you are working flat and going out anamorphic.
Next, the bladed filter type. This refers to the bladed iris. Again, we have the aspect ratio as before, and here is the number of blades settings. By default, we have five blades, but we can set it to any number we want. Now, the roundness is how straight the edges are. If I go 100% roundness, it becomes almost a circle, and if I go in the opposite direction, the shape becomes concave. We will put that back to default, which is just a bit of roundness. The rotation, of course, allows you to rotate the filter, so that you can get any orientation you like. The inner size and inner feather will show up better if I take the inner brightness down to something like this. See this dark center, that’s what we're talking about. So I can change the inner size to make it as small or large as I wish, and the inner feather is how soft it is. Here’s an interesting toggle right here: the catadioptric feature. Catadioptric lenses use a combination of both mirrors and lenses, which produce a unique bokeh with a hole in the center. You can also adjust the size of the hole by adjusting the catadioptric size.
Next up, the image filter type. Before I select that, I will show you the images I have. I have this star filter here, and the important thing about this is, there are two boxes to be aware of. The outer box out here is what we will call the format, and the inner box is the bounding box of the shape. Note the shape is off center from the format: it’s on the lower left-hand corner. You will see why this is important in a minute. So I am going to take the filter input of the ZDefocus node at hook it up to my star filter, then switch back to my ZDefocus node, and zoom in. Now we will switch the filter type to image and there you go. Of course, we can change the size of it by adjusting the size and maximum values. So why was I going on about the format or the bounding box for the shape? That’s for right here: filter bounds. If you say shape, you are telling it the shape is inside the bounding box. However, if you select format, it means you want the large outer box and you can see now that the star bokeh has shifted down lower left and has kind of a lens treatment.
The next thing I want to show you is very cool: chromatic aberration. Let me show you my Chromatic_Aberration node (not supplied with Nuke). I hooked up a little 3-channel filter here that allows me to offset the RGB values like so. These offset channels will cause an offset in the bokeh of the image, so let’s check it out. First, we will hook up the filter to our Chromatic_Aberration, and switch the Viewer back to the ZDefocus node, and we get an error message. The error message covers right here (use input channels) by default. It’s looking for the alpha channel to contain the filter input. That’s not what we have here; we have a 3-channel image. So we need to use this use input channels. This means use the same 3 channels in that filter input as we are in the image, which is RGB. So we turn that on, and much better. Let’s zoom in, and see what it looks like. So, you can see all my bokehs now have a chromatic aberration. Red in the upper left, blue in the lower right. If I open my Chromatic_Aberration node again, I can dial the Offset up and down to increase and decrease the amount of chromatic aberration. I will turn it off and toggle if for you so you can really see the effect. OK, I am done with that, so I will close it and go back to the ZDefocus node.
Next, let’s take a quick review of the gamma correction and bloom. Toggle the gamma correction on, and the bokeh gets a lot brighter. You have no control over this because it’s doing a gamma 2.2 change to the bokeh relative to the image. If you want to dial in your own control, use bloom. With the bloom feature turned on, these two parameters wake up. The bloom gain allows you to make it brighter or darker. As you lower the bloom threshold, darker and darker pixels get bloomed.
With these powerful new bokeh features, the ZDefocus node can match the most obscure lenses for visual effects shots, or if you are doing animation, you have complete flexibility to generate your own creative looks.