5
$\begingroup$

I'm trying to achieve DOF using Blender Internal 2.75a. Everything seems to work, except that the F-stop doesn't seem to do anything, nor in the Defocus node nor in the camera DOF settings. I just get a uniform blur, no focus plane. I followed tutorials and read some posts but couldn't find the correct solution. See the image for my settings. Note that I am focusing on the Eyes object. How to make it work?

Depth of Field F-stop

$\endgroup$
  • 2
    $\begingroup$ I don't think the defocus or vector blur nodes expect a normalized Z pass. What happens if you delete the normalize node? $\endgroup$ – gandalf3 Aug 21 '15 at 16:26
  • $\begingroup$ When I remove the normalize node it sort of inverts the effect. There is no blur, and I have to turn off use z-buffer and it gives the same blurred result as before. Uniform blur. And F-stop in the Defocus node is then greyed out. $\endgroup$ – Aardo Aug 21 '15 at 16:31
7
$\begingroup$

Plug the Z pass directly to the Z input on the Defocus Node.

enter image description here

Control the focus distance on the camera settings. Choose and Object to focus on or set a distance. Note that if you choose an object the camera will focus at the object's origin.)

enter image description here

Every time you change any of the camera settings RENDER THE IMAGE, otherwise the compositor will not update.

The Max blur setting controls the amount of blur in pixels. Larger numbers will yield more blur, but will also take longer to render.

The F-Stop controls the depth of field.

A smaller F-stop number will result in more critical focus, with in objects closer to the camera or further away form the focus point getting blurrier faster.

A larger F-stop number will result in sharper objects in front or away from the focus point.

enter image description here

Setting the focus point with an object:

enter image description here

EDIT:

All of this is designed to work on a "normal" scale. If your scene is Huge those parameters don't work as well. In your case your scene is so big that all objects are several hundred meters, but you've set your scene scale settings to 0.001. The objects will display nice but they are still large (at least when it comes to how depth of field works)... The camera is focusing so far that to have a meaningful blur the F-stop would need to be a very small number, around 0.1 or less (give it a try and see things defocus). The problem then becomes finding the correct focus point, nothing seems to be in focus anymore...

Solutions:

Scale all of the objects in the scene to 1000th of its size (Press A to select all and then S . 0 0 1) and reset the scale on the scene back to 1, and ta-da! The defocus node works like a dream.

enter image description here (you still have the issue that the origin of the eyes object is behind the objets so the camera doesn't quite focus on the eyes. I created an empty that is placed on the right eye).

$\endgroup$
  • $\begingroup$ Ok, I double checked all settings with your explanation. It makes perfect sense, but it simply doesn't work. Here is the blend file (i just left the eyes on which the camera focuses and the cubes.). <img src="http://blend-exchange.giantcowfilms.com/embedImage.png?bid=429" /> . Maybe someone can find the problem. I don't know how to proceed. $\endgroup$ – Aardo Aug 22 '15 at 7:19
  • $\begingroup$ The issue is with the scale you are working with. See edited answer. $\endgroup$ – cegaton Aug 22 '15 at 17:15
  • 1
    $\begingroup$ In general it's a good policy to work in real world scales... $\endgroup$ – cegaton Aug 22 '15 at 17:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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