3
$\begingroup$

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):

  1. I clone the default cube a few times, and place all the cubes in a row.
  2. I go to the camera's settings, and select a cube on which to focus in the "Depth of Field" section.
  3. I switch to compositing mode and check the "use nodes" box.
  4. I add a "Defocus" node in between the "Render Layers" node and the "Composite" node.
  5. I also connect the "Z" output from the "Render Layers" node to the "Z" input of the "Defocus" node.
  6. 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?

$\endgroup$

marked as duplicate by iKlsR Jul 22 '13 at 12:59

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 2
    $\begingroup$ As described here, you also need to enable "Use Z-Buffer". $\endgroup$ – Aldrik Jul 21 '13 at 20:05
  • $\begingroup$ Adrik, I think your suggestion was the one that worked. Can you submit it as an answer? Thanks! $\endgroup$ – jrc03c Jul 21 '13 at 20:56
  • $\begingroup$ Since the answer there works and the issues are pretty much the same. It is now basically a duplicate of that question. $\endgroup$ – iKlsR Jul 22 '13 at 12:59
2
$\begingroup$

I do not know why, but it seems that using an object as a focal point only works when using an Empty.

enter image description here

Cycles:

(Note that cycles will render with DoF without the need for composite nodes.)

enter image description here

Setting Blades to 3 or more makes it possible to render with a non-circular aperture (this setting refers to the number of "blades" in the camera's aperture)

enter image description here

Blender Internal:

enter image description here

$\endgroup$
1
$\begingroup$

Note this answer is specifically relating to Blender Internal. However, the main concepts can be used in Cycles as well.

Setting up the defocus node can take a little bit of practice (and trial and error), but the main issue is the distance. I personally would recommend using fStop settings, because I think fStop makes more sense (you can use fStop if you check Use Z-Buffer).

Using the same setup as you mentioned in your question, change the fStop distance until it looks good (probably around 6).

fStop at 0.0: fstop 0

fStop at 4.0: fstop 4

fStop at 10.0: fstop at 10

You can also tweak the threshold of the blur and the maximum amount of blur allowed.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.