These plugins will let you make the most use of a ZDepth pass that you often render out from a 3d application. It's a pass that stores the information about the distance from camera for each pixel - there is really a lot you can do with this data.

Two free plugins from the full EFX Render Elements Plugin Suite. These plugins are useful to help select object from an ID pass and remove artifacts from the resulting alpha channel. Check out the full suite for the rest of the toolbox.