Bokeh_Blur v6.0

This location is for Registered Users Only.
Perhaps you need to login or register.
Contributor: Jason Bidwell
BokehBlur simulates realistic lens blurring.
12.0 or later
Linux, Mac, Windows
17 Jul 2020

BokehBlur V6.0

Completely redone for Nuke 12.  (Use v5.3 for older versions of Nuke.)

Simulates realistic lens blurring. It's especially useful when you need to simulate a very 'out-of-focus' background. Has ability to use a mask or ramp to simulate DOF. (Fixed issue qith mask input)

city sample web

All sliders have been normalized, so values live in a 1-10 size.  Bokeh size is still dependent on the size of the plate connected to the image input.

Updated GUI

bokehBlur gui v6

Cat-eye distortion
It’s not as accurate as others have done with blink-scripts, but this renders fairly quickly.  It will be slower on lager plates.

cateyeSample v06

Revised Anamorphic options to scale the bokeh shape, if needed, for matching to various lenses.

Mask Input, which can be used to simulate DOF.  
You can attach a ramp or feathered roto. to the mask input and enable the mask check-box.  You could even key the depth pass and use that as a mask.


Irregularity adds an organic look to the procedural iris shapes.  This option is bypassed when using custom kernels.

Custom kernels should be a square format.  BokehBlur creates a kernel based on the max RGBA.


Cateye distortion inspired by Wes Heo’s ’W_CatsEye’ gizmo and M.Eiche’s ‘iBlur’ gizmo.

Nukepedia button inspired by Luma’s ‘Fuse’ gizmo.

Please login in order to download these files.


+3 # Stephen T.Y. Wong 2011-05-13 04:12
Hey Jason, do you mind adding a description on how it works with z.depth?
It'd be great if it works like zblur.

+1 # Jason Bidwell 2014-11-07 23:05
I basically create a matte from the depth pass (inserted into the depth input) and you can adjust the DOF with the settings in the gizmo. I added a check-box to toggle 'View Matte Only' for adjusting the matte. I would use this for cutting out the FG from the effected BG. It doesn't make numerous z-slices like the zDefocus node does, but it renders very quickly.
+1 # Abraham Schneider 2011-05-20 04:23
Thanks for this gizmo. Problem is: it's not working as expected. Using it on one of my shots always results in an offset of the whole image. Think it has to do with the filter image being not centered inside the square image format. The tooltip of the Convolve mentions "The cropped area is what is used, the center of the filter is the center of the crop". Tried fixing it with a Transform and a Crop, which seems to work. Maybe you want to have a look at it.

+2 # Jason Bidwell 2011-05-24 16:16
I incorporated a Zslice node to allow for a DOF effect when using a Zdepth pass. Plug it into the Zmatte input.
+1 # Jason Bidwell 2011-05-24 16:21
@ Abraham, you may be seeing an offset because of the aberration slider. It just shifts the red and blue channel away from each other. Try setting it to zero. The convolve node is a nuke node and doesn't have effect on the translation of the image.
# Abraham Schneider 2011-05-25 02:52
@Jason: no, I'm talking about an offset of alot of pixels, not the aberration offset! I have a starfield here and if I use your gizmo, the stars are on completely different locations then without the gizmo. It's definitely a bug of the gizmo. Of course, convolve is a nuke node. But as the help text of it says, the filter center is the center of the crop image. So to not get an offset, the mask should be centered.
+1 # darren coombes 2011-05-30 01:01
yes, i'm getting the same offset effect too. The gizmo shifts the whole image up and to the right.
+4 # Jason Bidwell 2011-05-30 01:37
In the gizmo, I am using a constant, which is set the size of your global settings, as a backdrop for the convolve. Try adding a crop before the gizmo, which will properly set your image size/ bounding box to project size.

The gizmo works fine for me and I have used it in production. Feel free to open it up and make changes as needed.
+1 # John Rogalski 2011-08-25 10:00
I'm getting some "knobs don't exist" errors in 6.3v1 with this. namely:

Bokeh_Blur_jb.Added: no such knob
Bokeh_Blur_jb.simple: no such knob
Bokeh_Blur_jb.aberration: no such knob
Bokeh_Blur_jb.slider.: no such knob

The gizmo now just turns the image black and appears to not be functioning :/. any thoughts?
# Jason Bidwell 2011-08-26 17:30
I just tested it in Nuke 6.3v2 and seems to be working fine.

BTW, If you have "view matte" selected without a Zdepth pass connected, it will show a black screen. Also, if you tell the gizmo to set all knobs to default, the bokeh size slide goes into the negative integers, which also appears black. Grab the bokeh slider and slide until it shows an image again. Hope that helps.
-3 # Michael Ralla 2011-09-01 13:35

In the same matter, I'd also give "Bokeh" a go: It is pretty fast, sort-of hassle-free and rather inexpensive...a nd looks great.

Cheers, m.
# yacoob essack 2011-09-07 07:31
same shifting poblem here...
# Jason Bidwell 2011-09-26 23:01
@ Abraham, yacob and darren, version 3.6 should correct the shifting issue.
# Jason Bidwell 2011-09-27 19:37
Fixed a couple additional bugs, please use version 3.7.
# Jakob Weiss 2011-11-01 13:46
hey jason. if i connect a zpass image to the zdeph input of the bokeh node, it doesn't change anything at all. if i activate the "view matte" button the rgb values are 0 all over the image. if i move the sliders of the "depth of field controlls" it changes nothing. in some cases i got in to work but only if i didn't turn "DOF on/off"- button on (didn't really understand that) and only for a short time. i have nuke 6.3 v4. 64bit installed on windows 7. perhaps you got a idea. your defocus looks really awesome.
thanks and greetings from germany
-1 # Jason Bidwell 2011-11-06 15:33
@ Jakob, I fixed a couple things, including the DOF displaying black when nothing attached. (see version 4.0)
Glad you like it.
- JB
+1 # Rahul Venugopal 2011-11-16 06:49
Great plugin, thanks!
# chris menz 2011-11-21 17:23
the gizmo seems to have the alpha.G_matte and rga.alpha layer problem included (see the mailing list discussion on redguard). probably a good idea to remove those lines.
# Jason Bidwell 2011-11-21 19:19
@ Chris I removed the GMatte string from the gizmo. Sorry about that, not sure how it got in there.
+1 # Jason Bidwell 2011-11-21 19:20
To all, please use version 4.1
+2 # satheesh R 2011-12-06 10:23
Great one Thanks Jason Bidwell :sad:
# Jason Bidwell 2012-04-17 10:40
Glad you found it useful.
+1 # Dima Marov 2012-04-19 02:20
Very nice result. Using during education to look how I want to see my Convolve shapes and grading result.
-1 # Tomas Roca 2012-05-10 11:18
Hi Jason, I just used it and i think It is very ood. Thanks
# Viet Nguyen 2012-06-11 14:14

I tried your v4.3 on Nuke 6.2v4 and I get these messages:
Warning: circles.createN ewTrack: no such knob
circles.{-1} "-1 (none) -1" "1000 New Track Layer 1000": no such knob
Warning: octagon.createN ewTrack: no such knob
octagon.{-1} "-1 (none) -1" "1000 New Track Layer 1000": no such knob
Warning: heptagon.create NewTrack: no such knob
heptagon.{-1} "-1 (none) -1" "1000 New Track Layer 1000": no such knob
Warning: hexagon.createN ewTrack: no such knob
hexagon.{-1} "-1 (none) -1" "1000 New Track Layer 1000": no such knob
Warning: pentagon.create NewTrack: no such knob
pentagon.{-1} "-1 (none) -1" "1000 New Track Layer 1000": no such knob
# Jason Bidwell 2012-06-11 18:19
Viet, I may have exported my Gizmo incorrectly, so I have posted a new version which will hopefully fix your problem. - JB
# phil ede 2012-07-20 00:29
this is a very useful tool, but when I try to copy / paste it, or to open my nuke file again, it says : "BokehBlur1.Iri s: no such knob
BokehBlur1.Hexagonal: no such knob
BokehBlur1.specSwitch: no such knob
BokehBlur1.true: no such knob
BokehBlur1.chromAbr: no such knob
BokehBlur1.true: no such knob
BokehBlur1.CAbr: no such knob
BokehBlur1.Offset: no such knob
BokehBlur1.twinkle: no such knob
BokehBlur1.true: no such knob
BokehBlur1.Twinkle_Size: no such knob
BokehBlur1.150: no such knob
BokehBlur1.ZblurAmount: no such knob
BokehBlur.Iris: no such knob
BokehBlur.Octagonal: no such knob
BokehBlur.specSwitch: no such knob
BokehBlur.true: no such knob
BokehBlur.chromAbr: no such knob
BokehBlur.true: no such knob
BokehBlur.CAbr: no such knob
BokehBlur.Offset: no such knob
BokehBlur.twinkle: no such knob
BokehBlur.true: no such knob
BokehBlur.Twinkle_Size: no such knob
BokehBlur.150: no such knob
BokehBlur.Zblur: no such knob
BokehBlur.true: no such knob
BokehBlur.ZblurAmount: no such knob"

and it gets rid of all settings and the settings panel is not acessable anymore.
I´m using Nuke 6.3v4

+1 # phil ede 2012-07-20 02:31
fixed it... forgot to copy it in the .nuke home directory... :P
# Jason Bidwell 2016-09-27 15:34
You can also change it to a .nk file, then open the script in a text editor, then change the word "Gizmo" to "Group" You can then use this on the farm without having to install it as a gizmo...
# Jeff Butler 2016-09-27 14:43
I know this is a very old thread, but I don't have access to Frischluft or pgBokeh at my current office. This gizmo is great except it doesn't seem to apply the defocus to the alpha channel and I can't seem to figure out how to apply it to that channel. I'm trying to use this on cg passes rather than an entire plate. Is that possible with this?
-1 # Jason Bidwell 2016-09-27 15:32
I intended the mask to be driven by the zdepth, although I need to rework how it makes z-slices. Right now it's basically a luminance key based on the zdepth. I will try to make this more robust when I get some time to work on it again.

For now, you could use a Keymix.

Hope this helps.
+1 # Jeff Butler 2016-09-28 22:20
Thanks. If you ever do update this I'll be sure to download. Nice work.
# parth Chotalia 2017-03-20 05:51
Jason I m using nuke 9 Windows. I downloaded your gizmo in which folder should I put it to work
# Christopher Simmons 2017-04-18 04:10
Very cool Jason!
# Manuel Feria 2018-11-22 00:41
Thanks Jason. That's very cool.
# Kevin Konitsch 2019-07-08 14:26
Hey Jason is there anyway you can make a version that does not crop the image after it goes through the node? Or make an option that keeps bounding box on?
# isaac katabarwa 2020-03-02 08:59
Hey Jason, thanks for this great plugin, please is there an instructional video on how to use this tool?, sorry i can't figure out how to use it with my zdepth pass
# Barry Wang 2020-06-29 02:46
It's a really amazing tool! But I got a little problem with Bokeh_Size, it might be a bug, if I go this paramater to 0, and everything is go pure black, maybe you wanna go and have a look~ thanks for the tool!
# Jason Bidwell 2020-07-17 00:16
Isses addressed:

I have fixed the bokeh size=0 problem to not display black.

Bounding box is preserved, but very large bounding box will cause slowness and possible crash, especially using the Cat-eye option.

Zdepth input has been removed in favor of a mask input. When you enable it it looks for an alpha and will use zslices to simulate real DOF.

If you take the depth pass and shuffle it to the alpha channel, you could grade it to work as a depth pass. Also using two BokehBlur nodes together can create the FG and BG out of focus look.

I have also made sure the alpha gets process along with the RGB.

# paco garcia 2020-07-20 11:38
Hi Jason.
When i try to open 6.0, Nuke 12.0v4 write this:

BokehBlur.ReformatToInput9.filter: Bad value for filter : impulse
BokehBlur.Reformat13.filter: Bad value for filter : impulse
BokehBlur.Reformat17.filter: Bad value for filter : impulse
BokehBlur.Reformat19.filter: Bad value for filter : impulse
BokehBlur.ReformatToInput5.filter: Bad value for filter : impulse
BokehBlur.ReformatToInput.filter: Bad value for filter : impulse
BokehBlur.ReformatToInput6.filter: Bad value for filter : impulse
BokehBlur.ReformatToInput8.filter: Bad value for filter : impulse
BokehBlur.ReformatToInput1.filter: Bad value for filter : impulse
BokehBlur.ReformatToInput2.filter: Bad value for filter : impulse
BokehBlur.ReformatToInput3.filter: Bad value for filter : impulse
BokehBlur.ReformatToInput11.filter: Bad value for filter : impulse
BokehBlur.ReformatToInput12.filter: Bad value for filter : impulse
BokehBlur.ReformatToInput13.filter: Bad value for filter : impulse
while executing
"scriptReadFile $f"
invoked from within
"if [file isdirectory $f] {
# load all images in this directory
set ff [filename_list -compress $f]
foreach t $ff {
set fulln..."
(procedure "drop" line 14)
invoked from within
"drop $drop_text"

What i can about this?
The others older versions don´t open.
# Jason Bidwell 2020-07-20 17:06
BUG ID 431603 - UI: Some filter names, such as cubic and impulse, changed case causing legacy scripts to display errors.

I was using 12.1v2 so maybe Foundry decided to change names of things in latest version. I will look into it when I can.
# paco garcia 2020-07-21 08:19
Ops!, ok

You have no rights to post comments

We have 3292 guests and 38 members online