Depth of Field FX problem

sorry, but i m just having no idea about how to make an FX of lens blur - the things look clear near the focus point but blurry when away from it - just like the camera lenses do. could anyone hint me a little bit?

First read up about the composite nodes system on the wiki
The defocs node can give you that depth of field look


I can send you a demo file if you want.
send me a PM.

Z is your friend

Here’s a video I just made for you that shows you how to do it

sweet and simple tut. thanks

thx a lot.

those Blender resources are nearly a blank sheet here in China.

i read about the method of making the DoF FX in blender, it is not really simulating the camera lens, but render things from different layers and combine the results together.

but why cant we move the camera left n right, up n down a little bit, and keep the focus point in the center of the camera view. then we could put all results together just like in the MBLUR FX. the final result will be an image with clearly visiblility near focus point and blurry FX further or nearer because of the movement of the camera.


That is how we used to render DOF in Blender (create a small circular path for the camera, have the camera follow the entire path once per frame, track the camera to an empty to set the in-focus distance, use MBlur to render between the frames). However, this method is slow and a pain to set up. Faking it with compositing is much faster and produces smoother results. The price for this is the creation of artifacts under some conditions.

rawpigeon is on the same page as I.

You can use an empty object to set the depth of field (focus point) so that when you move the camera, the focus point stays the same. Then you can use motion blur to make the out of focus stuff blur out. But this method is super slow. That’s why rawpigeon suggested trying to find ways to fake it.

i got an idea while doing the exam of politics(n. a thing that is linked to CCP sometimes):
create a glass lens in the blender world, then a blank white screen which receives the light going thru the lens. then just aim the camera to the screen and press RENDER. with a good renderer i think it wont be too hard to generate an image with DOF Fx.

im just trying to make it work like a real camera, which is pretty useful when generating still images with complex scene, that no one would like to divide it into separate layers.


That won’t work. Blender traces rays backwards from the camera, off surfaces, to light sources, not forwards from light sources, off surfaces to the camera.

Blender doesn’t work like a real camera and it is impossible to force it to do so. You might want to look into rendering with an unbiased renderer (e.g. LuxRender), which are designed to simulate the behaviour of light much more realistically.