DOF. Simple explanation?

I’ve been hearing a lot in the finished projects of people using DOF to give images focus. First of all: What is DOF?
Also how do I use DOF to make things out of focus?

I’ve tried searching but no luck. If there are any tutorials on the subject could someone please point me in the right direction.
Sorry if this has been asked before.

DOF = Depth of field. Generally used to make subject in sharp focus and surrounding blurred. Commonly used in Yafray renders http://wiki.yafray.org/bin/view.pl/UserDoc/GauravGuide#The_Depth_of_Field

In real life “Depth of field” is the size of the area considered to be “in focus” in a picture… so if you could be 5m in front of the focus point or 5m behind it and still be in focus, then the depth of field is 10m.

In CG the term is usually used to refer to focal blur in general. There are a couple of ways to do it in blender:

  • ZBlur: a sequence plugin that fakes focal blur on the final image. Good and fast, but has some artefacts if there is a sharp edge between something that is in focus next to something that is very out of focus… also things that are behind transparent objects and things reflected in mirrors will not be blurred correctly. Still, its speed is a definate plus compared to any other method, and it is realistic enough if you avoid the things that cause these artefacts.
  • The Parent-the-camera-to-a-path-circle-method: involves making the camera spin around in a circle, always pointing (tracked to) an empty for the focus, doing one loop every frame. Then using motion blur to take several renders and average them out. Is more realistic than ZBlur, and works for reflections and transparancies correctly, but is much slower, and you need a lot more than blender’s max of 16 samples to get a decent looking result…

Have a look at my big post here to see why it’s all necessary…

See here for more details on how to do this.

another possibility: using yafray. yafray has DOF integrated. So all you need to do is turning on yafray, go to the camera settings. turn on “showlimits” and go to the DOF-tab which has all the setting you want. the focus point will be shown as a yellow cross in your 3d-window.

Is there a guide with some setting tests for DOF? I’ve thought of walking around with a camera to try to simulate accurate yafray DOF as to get rid of the minuture look.

i was doing the dof exercise in the manual…

added nurbs curve nothing

specifically is it put in front of the camera or …
what am i missing …any simple blends/

Don’t understand the question but there are some good basic steps on the Yafray guides. I think this might be a try and fail try again type feature.

has anyone done the dof exercise in the manual?

To really understand DOF you must take a camera (one where you can change the aperture) and take a perspective oriented image.

If you take pictures with apertures ranging from 1.8 (if you have a good lens)
you’ll see you have a very narrow field that has focus.
The field before and the field behind the focussed area will be more more and more blurry the farher it is.

If you take a picture with an aperture of say 16 you’ll have a huge field that has the focus. So a lot of sharpness.

you could say “Why? Why not make everything sharp?”

Well, the lens is built that way. You can only take a picture as long as there is light.
In bad lighting conditions a photographer will have to open up his lens almost completely to be able to take a picture at an acceptable speed.

With extensive light, the photographer will have to keep his lens almost closed so his pictures won’t be overexposed.

In a CG image you’ll want DOF effects to have a photorealistic image or to dramatically enhance the image.
P