Depth of Field Effects using Depth Maps

Rendering depth of field effects can be very expensive in terms of render time. To get decent Depth of Field (DOF) results, you will need to set your antialiasing (AA) samples to at least 64 and to get very good results you will need to set the AA samples to 256.

While the rendered DOF results can be very good, if you have a copy of Photoshop, you can quickly and easily accomplish DOF effects, and with even better results, by using a Depth Map in conjunction with Photoshop's Lens Blur filter.  In  the below images the grayscale image is the depth map output as rendered using the Depth Map setup provided with the delivered Luxology setups. The lightest areas are close to the camera and the objects farther from the camera are darker, this information can be used to determine how far each pixel is from the focal plane.

Lobby final color   

                                     Lobby Rendered                                                                                      Depth Map

 

In MicroStation you will still need to set the camera's target point at the point of focus. In the example shown above the target is centered on the first lamp in the image. Using Luxology you render a depth map image and a final color image.

Open the two images in Photoshop and use the Select > Color Range option and pick the one of the white pixels, you can set the fuzziness to between 30 and 100 and get perfect lens blurs. After the selection, you need to create an Alpha Channel mask, this will be used with the lens blur to dial in the effect. Once you have the Alpha channel select the final color image and paste it onto the depth map image, the choose Filter > Blur > Lens Blur from Photoshop menu. You will be presented with a dialog where you can preview and adjust your image to get just the right amount of DOF effect.

                           

To make this easier to follow I have recorded a movie to show the steps, it is really very easy.

Enjoy

JF