I need to feed in an image processing software an image where the color of a pixel means the model's surface distance from the camera. 100% white would mean the closest distance, black - the furthest. Of course, I'd need to control this min and max distance to find the most appropriate values for every particular 3d model. If I could get those values in HDR range, that would be much better than just 256 levels.
I noticed there's an option to select Z-Buffer in the channels in render result view, but I am not sure I can get the color levels work as I need.
Please suggest the most appropriate method how to get access to the depth data.