Skip to main content
added 6 characters in body
Source Link
Amir
  • 3.1k
  • 3
  • 31
  • 56

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

fileexrFile = OpenEXR.InputFile('depth.exr')
FLOAT = Imath.PixelType(Imath.PixelType.FLOAT)
(R,G,B) = [array.array('f', fileexrFile.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.

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

file = OpenEXR.InputFile('depth.exr')
FLOAT = Imath.PixelType(Imath.PixelType.FLOAT)
(R,G,B) = [array.array('f', file.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.

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.

edited tags; edited title
Link
Amir
  • 3.1k
  • 3
  • 31
  • 56

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

edited title
Link
Amir
  • 3.1k
  • 3
  • 31
  • 56

Why changing cameracamera's far clip distance does not clip the distance for depth map rendings?

Source Link
Amir
  • 3.1k
  • 3
  • 31
  • 56
Loading