So whatever the type of render you are into (default, equirectangular, VR, ect...) you can check in the advanced options to render the Z Depth Map of the scene as a separate file
A Z Depth Map is a grayscale image where the closets object is white and the furthest object is black, this allows for some cool cinematic tricks in post production (tilt-shift, desaturate far away objecs, ect...)
See Wikipedia:https://en.wikipedia.org/wiki/Depth_map
Just leaving this here for future reference: http://forum.lwjgl.org/index.php?topic=1542.0
Here's the album: http://imgur.com/a/3c9I7
It's been a while since the last time i did this, and i forgot that C4D needs you to manually specify the distance at which the scene ends from the camera
Also you can see that the depth map has a white background, ideally that would be trasparent
So i don't really know how this works on video animation (i primarily do still renders) as the farthest (pure white) object moves constantly in the scene