DOF Tutorial

First of all, before changing DOF-Settings in the Yafaray camera-menu or the AA-settings in the rendertab-menu,
create an empty-object and position it where the focal point of your scene should be.
I think this is the best way to control the focal-point.

Positioning the Empty-Object:

Then you go in the camera settings of the yafaray UI and write the name of the Empty Object in the 'Object'-field and press "calculate Distance". Now the focal point is calculated.
If you change the position of your Empty Object later, don't forget to calculate the Distance again.

After this, increase the Aperture size value. Values between 0-1 are ok. The higher the Aperture value is, the more DOF you get.
If you want to test the degree of Depth of field and the focalpoint, then you go in the AA-settings let the values how they are. This is the fastest way to preview the focal point and DOF.
Here are the settings for fast previewing:

This is the result of the above settings. Its grainy, but i think for previewing of the scene its ok.

The main factor of DOF-quality is the AA-samples factor. The higher the AA-samples are, the more crisp and smooth is your DOF. Another important factor is the AA-treshold value. Values about 0.020 are good for all purposes.
Here is the result:

If your aperture size is high (high grade of depth of field), then you need higher AA-samples. Very low aperture sizes (DOF for example 0.02) needs lower AA-samples (value 8 should be enough for all circumstances).
The factors AA-samples and AAsamples inc. can additionaly help.
It makes more sense to increase the AA-samples inc. instead of the AA-passes value.
More AA-passes results in longer rendertimes. I prefer not more than 4 AA-passes.
The AA-samples inc. does not affect more rendertime (not significantly).
An example:

Here are some test for the shape of blur disks.
The ring shape is the only shape which looks not good and authentic.

1. disc-shape:

2. hexagon-shape:

3. pentagon-shape:


4. ring-shape:

Here is the .blend-file for testing purposes:

Renders and render settings:

Thats all folks.

PS.: Thanx to all Developers for this great renderer!
And also thanx goes to Samo for his incredible Documetation effort.
I hope i could help.


Took a while, but George Wood

Took a while, but George Wood provided us with a new example scene.

Link doesn't work

I also would like to see the examples. Could you post an other link? It doesn't work any more.

Thanks a lot for this tutorial

3D Fenix - Blender + Yafaray Rendering -

good tutorial, link dead

Thanks for this, great work, but the link to the file is dead (more than 10 downloads on Rapidshare)...