One factor to enhance realism in our images is to add depth of field, but sometimes, activating it on our process prolongs the render time. If depth of field is just to add enhancement then processing it in another way might be better rather than spending a lot of time to make it happen in our rendering. It is but to process it in photoshop.
1. First Step is to add Zdepth to our render elements, in 3d Max, press F10, go to render element and select ZDepth.
2. In Sketch Up,( in case you use Sketch Up in your rendering), press Option editor to brought up the render dialog box, Go to VFB Channel and select Zdepth on the list.
3. After Rendering, Go to the button selector ( upper left corner) to show the render pass you have included in the rendering... Save it to any format you wish. In my case i save it as tiff. In 3D Max, it will automatically show up ( in case of 3d Max Default Render Frame Buffer)
4. The same thing with the beauty pass ( or RGB pass)
5. So here is the save Raw Render Image (Beauty Pass)
6. And the Raw Render - Z depth pass image
7.Open both images in Photoshop.
8. For the Zdepth images, press control A to select the images then press control C to copy it
9. For the RGB pass image, go to Channel Palletes
10. Add new Channel
11. Name it ( in my case depth of field), then hit okay
12. Select the newly created Channel layer, then press control V to paste what you have copied on the zdepth pass. Press escape to unselect.
13. Then back to Layer again, Go to filter, select Blur then Lens Blur.
14. On Lens Blur dialog box, on source, select the name of your newly created channel layer, adjust slider of Blur Focal Distance. Select your preffered depth of field. In here i blurred the foreground
15. And in here i blurred the background
Hope it helps!!!