I'm rendering blender's z-buffer to an image using render layers under compositing in cycles, but I'm noticing unexpected results.
Here is an example of a typical z-buffer render (not from blender). A flat plane will appear as a vertical gradient:
Here is blender's render of its z-buffer. A similar flat plane appears as a radial gradient:
I'm not quite sure what logic blender is using to represent depth. Is there a way to make blender's z-buffer behave more typically, where each pixel of the buffer represents the shortest distance from the camera viewing plane (the plane defined by the camera's normal)? If not, is there a way to get blender to render a scene like that without using the z-buffer?
EDIT: Here's a .blend file that demonstrates the z-buffer's strange behaviour. Hit render and it should show a radial gradiant on a flat plane.