View Full Version : Nuke zBlur focal plane problem

02 February 2011, 10:15 PM
Hello all,

This is my first post on here so please be gentle! I'm a student working with Maya 2011 and Nuke 6.0 on a very DOF heavy project and so I'm trying to use Nuke's zBlur to create some super shallow DOF. The problem is, that I can't seem to set up my focal plane properly.

In this simple test I want to have the second closest ball in focus, with both foreground and background thrown out of focus - macro style. When I tick 'Focal-Plane Setup' within the zBlur node, I can't seem to get red, green and blue showing all at once, which I assume is what I need to get the effect specified above.

I've used the zBlur section from dgovil's Rendering and Compositing guide for help so far -(

My images are .iffs rendered from maya, with a beauty pass and a zDepth pass.
I have shuffled my zDepth pass in Nuke, and set my zBlur math parameter to 'far=1'.

Any help here would be greatly appreciated! :)

Thanks in advance


02 February 2011, 05:20 AM
From the looks of your depth map, you should be using Far=0, shouldn't you? That is, the darker parts of the depth map are further from the camera.

Now, the way ZBlur works is it requires your Z to be a channel in your primary input. The way you have it put together won't work. Use a ShuffleCopy node to add the information from your depth map to a Zdepth channel of your beauty pass. On the ShuffleCopy, you'll put the beauty into input 2 and the depth to input 1. In the lower-right dropdown, select depth from the "other layers." Then you just need to select whatever channel from your Z pass into there.

One other problem I suspect you'll have is that you haven't included any depth information for the floor, so your shadows won't get any focus treatment. You can probably fake that with a Ramp, though.

02 February 2011, 01:51 PM
Thanks for the quick reply man!

Okay so I get what you mean; I need to copy over the info from the zDepth pass into the Z channel of my beauty pass. Then the zBlur node will work as it should do, instead of using a mask.

The shuffleCopy node is just baffling me at the moment though. I have a 1920x1200 screenshot here :

I'm unsure of which boxes to tick in the shuffleCopy node. My depth pass doesn't have a z channel itself, which may complicate things - it's all rgba.

Could you show me where to go from my screenie?

Thanks again


02 February 2011, 06:30 PM
I think this is what you want:

Shuffle copy is a little difficult to understand at first, but once you grok it, it totally makes sense. Hope this helps!

02 February 2011, 07:29 AM
You can just use a Copy node.

Plug your beauty into the B pipe and your depth pass into the A pipe. Then just use the first row of dropdowns to copy to depth.Z.

02 February 2011, 02:34 PM
Thanks for the help guys!

Finally got it haha, I think it was literally the layout of the shuffleCopy properties that was confusing me.

Thanks again :)


02 February 2011, 05:54 PM
You can just use a Copy node.

Hmmm… I never even saw the Copy node. I found ShuffleCopy first and never looked for another way to do it. That one's much simpler; thanks! And hotkeyed, even.

CGTalk Moderation
02 February 2011, 05:54 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.