How to setup DOF to blur near and far objects

Hello. My question is in the title. I want to achieve an effect where near enough and far enough objects are blurred, but everything else is sharp. From example on the picture, I want to blur two objects close to camera, leave the area with player sharp, and blur the cityscape. What settings should I tweak to achieve that? For now I can only either blur everything or blur only distant objects, which I can’t blur hard enough not to touch middle plane. So what should I do?

From my experience, DOF with the standard Camera doesn’t work well (I get the same problems you have).
First step: Replace your camera with a CineCamera. This will give you realistic controls of the camera. After replacing your camera, do these steps:

  • Move the camera back away from your character.
  • Increase the Details->“Current Camera Settings”->“Current Focal Length” until the scene is zoomed in enough. This is the same as “zooming in” with a real
    camera.
  • Go to Details->Current Camera Settings->Focus Settings, and change “Focus Method” to “Tracking” and “Actor to Track” to your character

The higher the Focal Length, the more DOF is applied. This is why you need to back the camera away from the scene to zoom in. (This is the exact behavior of professional cameras)

If you still have any problems, let me know

Hope this helps

3 Likes