1
$\begingroup$

I am rendering few scenes in blender and saving them in openexr image format. I read the exr images using python opencv2, and print out the minimum and maximum pixel values. It is a bit strange that the maximum pixel value of the images are extremely low, some of them are even less than 10.0. Is it really poossible or am I doing something wrong while rendering? Any help would be really appreciated.

My code is pretty straight forward:

import cv2
image1 = cv2.imread("path to my exr file/hdr_image.exr", cv2.IMREAD_ANYCOLOR | cv2.IMREAD_ANYDEPTH)
print (image1.max())
print (image1.min())

kangkan

$\endgroup$
  • $\begingroup$ Check that you are reading rgb values and not z-depth. A good hdri will have values around the sun of several thousand, the other 95% of the image will be in the 0.0 to 1.0 range. A default blender scene render will have most rgb values in the 0-1 range. With the image in blenders uv editor, right click on the image to see rgb values. $\endgroup$ – sambler Oct 5 '17 at 6:24
  • $\begingroup$ I am aware that I am reading RGB values but if I want to know about the dynamic range of a particular .exr file then am I suppose to read the z depth? Can you please tell me when you mentioned "valuesaround the sun of several thousand", how can I see these values? Are these RGB values or you are talking about the z depth? $\endgroup$ – Kangkan Bharadwaj Oct 6 '17 at 10:54
  • $\begingroup$ If you look at the rgb values of a hdri that has a sun in it, around the sun they will be very high, most other areas will be in the 0-1 range. Here is an example showing the rgb values around the sun. I mentioned z-depth as a rendered z-depth pass in the exr file will definitely have values larger than 1, the z-depth pass contains the distance from the camera. If you aren't getting values under 1.0 then I would expect you to be looking at the z-depth. Open the image in blender's image editor and click to see the rgb values. $\endgroup$ – sambler Oct 7 '17 at 19:33
  • $\begingroup$ "most other areas will be in the 0-1 range." Absolutely false. 1.0 means nothing in a scene referred image, and instead are a series of values along a spectrum that depends on scene contexts. Determining dynamic range is more or less simple math based on minimum and maximum values, the formula for which is elsewhere on this site. $\endgroup$ – troy_s May 12 '18 at 21:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.