amazing defocus/dof node by eeshlo now in cvs!

so does that mean this feature is off the list?

I don’t think so. Ton did the commit himself.

thanks eeshlo- awesome work :slight_smile:
-an admirer

i have a question, in regards to the documentation. the illustration of the node does not have an entry for fStop, though it is referenced in the documentation:

fStop, this is the most important parameter to control the amount of focal blur. The default value 128 is assumed to be infinity, everything in perfect focus. Half the value will double the amount of blur. This is button is not available if ‘No zbuffer’ is enabled.

if it is that important should it not be included in the node? i am not being critical, i am just trying to get my head around it, before i start playing with it. many thanks to eeshlo for the hard work!

jim ww

No, it is not going to be removed. As harkyman said, Ton will make some changes so camera and other data is available to nodes, it is also going to be useful to other nodes.

If the Z input is not connected or if a single value type node such as a time node is connected, then the ‘No zbuffer’ button is always enabled. And without an actual zbuffer, fStop has no meaning, since the input now directly controls the blur radius, so I thought it would be best to hide it in that case.
But since the node cannot detect if you have an actual zbuffer connected, the button is still enabled after connecting a zbuffer, so you simply have to disable ‘No zbuffer’ and the ‘fStop’ button will then appear.

Eeshlo: thanks a lot, but yeah I think the ability to track an object as your focal point is rather an important method, but then perhaps we can use a pynode to do that for us?

macouno, I’m pretty sure you can use a normal ipo driver for that, maybe coupled with a constraint or two, or use a pydriver- I don’t see how a node would help since since the focal distance is part of the camera parameters not the node itself.


i never can use the fStop option. the moment i change the value or connect the render layer to the image input of Defocus, blender deactivates the fStop and activates the no zbuffer option. and i can not change it back. no matter what i click or which values i select.

any help? is this a bug?


hmm it works here- are you connecting the z output of the render ot the zbuffer input of the defocus node?

I have been messing with this defocus and its great! Thanks eeshlo.
In the past I have mentioned a lag in the materials preview when adjusting the various parmeters and I note now that much the same thing is beginning to mar nodes.
If you want to tweak complex spagetti, layers of spagetti etc it constantly recalculates and the adjustments drag out while you wait for each fiddle to be reassessed through the whole.
Could there not be a 'suspend recalc 'until I am ready button incorporated somewhere?
Previously I suggested that the input of the materials buttons could be buffered and if there are no more entries within x time then it updates…
Does anyone else share my experience with this?

Big Fan

i agree. I am also curious if it might be possible to have a border selection for the
compositor as well. this might speed up rendering/previewing as well.

mh i connect the render layer z output to the Defocus z input
and image to image. it doesn’t matter which setting i set nothing is getting
blurred at all. i set up the camera focus DoFDist to where i want to have the focus.


i only get it to work when i apply the render layer z to a map value and the result will go to the z input of
the deforcus node. than i need to find the right offset value for the map value and things get rolling.
however it is only possible to blur either the fore or the back ground but not both at the same time.

am i doing something wrong.

I have played with it short time but still did not find some rules and fine output :confused:

cekuhnen- that’s indeed wierd
image to image
z to z
(you have this already)
“No Zbuffer” deactivated
lower the fstop value (the default = noblur, lower values give increasing blur)
set the DofDist on the camera to something you want
am I missing something? that’s all I remember doing and it works perfectly. I like having DofDist in the camera not the node, since It’s much easier to do a rack focus when you can see where the focus is in the scene.
Hope that helps some.

here is what i have.

AFAIK, the “Use Nodes” button in the Node window header does exactly that (Tooltip = “…use nodes and execute them while editing”).


cekuhnen, i’m stumped. You could try if you haven’t already cranking down the fstop value to a verrrry low number to see if there is some “minimal” bluring or something. otherwise, post the blendfile to see if it is an issue with that build/OS/combo. It certainly looks from the screenie you did everything right. I didn’t play with clipstart and end- do they affect the blur too? or just the Dofdist?

where could i host a blend file?my server in germany is down.

This calculator works pretty well with feet translating to blender units.

  • Put a camera at 0,0,0

  • Put an object at 0,10,0

  • Set the camera lens to 50. DofDist to 10.00, and put some objects within or beyond the limits predicted by the calculator, and set the fStop to 10.00 for example, according to the calculator, objects between ~7 and ~15 feet from the camera will be in focus, and that’s exactly what happens in Blender ! :smiley:

If you want to look at some heavy math formulas, there a lot of them here :


I use, there is also a private site someone started up recently, mentioned here on B.A. (somewhere :slight_smile: ).

You’re running on Mac OS correct? … What build date? I’m on Win XP using a 12-23 build at the moment.