I’m not able to control where the focus falls… No matter which object I enter in the Camera settings, the output is the same. I’m not really surprised, since the node I’m using is the Z buffer image, where is the DOF buffer in Blender?
Using map values gives greater control IMO.
see here: http://wiki.blender.org/index.php/Doc:Tutorials/Composite_Nodes/Setups/Depth_Of_Field
or check here for defocus: http://www.blenderguru.com/creating-depth-of-field/
Thanks, sx-1. How boring… Why do they provide a DOF setting in the camera, and then have it do exactly nothing, no DOF map? I won’t enjoy playing with the noodles, this sort of illogicality winds me up!
In your node setup in your first post you havent set the Defocus node to use the z buffer (the tick box)
It seems I misunderstood the tooltip on that box. If I had ticked it, would the Z buffer then be the DOF buffer, i.e. accounting for where the focus is? I’ve since lost the test file I was using.
OK, I’ve now played with the nodes enough to have a good DOF setup.
But the original question remains unanswered: what’s the point of the Camera DOF Distance setting? As far as I can tell it does nothing. Whether you set the distance manually or enter the name of the object that should be in focus, no DOF depth map is produced, the Z pass in the render is always the same. Is this just how it is or am I missing something?
Actually, it does work. The mistake I was making was to use the Map Value node between the Z output and the Defocus node. This can produce very nice results, but it extinguishes the influence of the Dof Distance setting. The distance setting is preserved if you connect the Z output directly to the Z input, and have “Use Z Buffer” ticked. The irony is, to get good results you have to set the distance value to a foreground part of a foreground object, basically the same as I was achieving with the Map Value. Serves me right for trying to get perfection from a post effect…
Camera dof settings work fine, though the defocus node is a bit of a hack… it reads the active camera from the active scene that contains your compositing noodle… NOT anything from whatever render layers or stored layered exr’s for example…
So you may want your compositing noodle to be in the same scene as the camera you render from!
Either that or forget about dof til after you render out an exr sequence, set up a new scene referencing exr’s and animate the camera distance setting whilst staring at your noodle… completely in post (i quite like this approach! I get almost instant feedback)
Once you know it’s easy!