This question already has an answer here:
I can't get "depth of field" to work as expected in version 2.68. Here are the steps I'm taking (from a brand new file):
- I clone the default cube a few times, and place all the cubes in a row.
- I go to the camera's settings, and select a cube on which to focus in the "Depth of Field" section.
- I switch to compositing mode and check the "use nodes" box.
- I add a "Defocus" node in between the "Render Layers" node and the "Composite" node.
- I also connect the "Z" output from the "Render Layers" node to the "Z" input of the "Defocus" node.
- I render. When the image finally goes through the compositing process, I can see the cubes, and blurring occurs, but the camera is NOT focused on the cube I selected in the camera settings.
I've tried this both in the Blender internal renderer and in Cycles. What am I doing wrong?