I am trying to use the depth values from a render. I created the appropriate graph that directly connects the render layers depth pin to an OpenEXR file output. The problem is that the depth values do not match the objects in the scene.
As a simple example, I have used the default scene with a cube at 0,0,0 and a camera placed at 0,-6,0 looking directly at the cube. The distance between the camera and the cube's closest plane is exactly 5.
When I load the EXR file as a matrix of floats, the value at the center is 5.45 instead of 5, both in the default render engine, and in cycles.
I don't know if any of the following information is relevant, but just in case: Image size 1280x720, focal length 35mm, sensor size: 32mm
I would appreciate any ideas of where this discrepancy comes from.