# Why changing camera's far clip does not seem to clip the distance for depth map rendings?

I am rendering depth maps and store the results in OpenEXR format. To make sure things work as expected I loaded one of the renderings into Python using the OpenEXR Python bindings as follow:

import OpenEXR, Imath, array

exrFile = OpenEXR.InputFile('depth.exr')
FLOAT = Imath.PixelType(Imath.PixelType.FLOAT)
(R,G,B) = [array.array('f', exrFile.channel(Chan, FLOAT)).tolist() for Chan in ("R", "G", "B") ] # R, G and B hold the same values
print (max(R), min(R)) # will print something like (10000000000.0, 0.9885767698287964)


Before rendering, I set the camera's clip end value to 2. What I noticed is that the clipping the camera distance does not change the large value in the rendering results. In other words, I will always have 10000000000.0 as the biggest number in the rendering result. I wonder, why doesn't the camera clipping seem to work here? Is there a way that I can clip the maximum depth distance?

I need this because when I need to be able to visualize the result. However, when I divide the numbers by the maximum distance everything is almost close to 0 and I cannot see anything on the screen. One solution that might work is to set the largest number to a much smaller value but this does not solve the problem fundamentally. So any solution would be appreciated.

• To visualize the result there is a map range node in the compositor. – aliasguru Apr 1 '18 at 10:19
• @aliasguru I am running Blender in the background and need to visualize the results outside of it. So I need to store the results into a PNG file or something. – Amir Apr 1 '18 at 13:24