I have done a set of renders with photon mapping and after that I have used pvalue to get the illuminance of every simulation and also pextrem to get the maximum illuminance. The code I used is this:
mkpmap -apg Global.gpm 50k -apc Caustic.cpm 50k -apo Port -t 5 Scene.oct
rpict -i -ap Global.gpm 75 -ap Caustic.cpm 75 -vf View.vf -x 2048 -y 2048 Scene.oct > Render.hdr
pvalue -o -h Render.hdr >> Value.txt
pextrem -o Render.hdr >> Maximum.txt
When I saw the result I found very strange that the maximum illuminance value got with pvalue is much more lower than the one got for the same image with pextrem (for example 400000 lux vs 900000 lux). Why does this happen?
Thank you in advance,
I apologize; my first reply was confused – I misread “pvalue” as “pcond” somehow, which is what I get for responding to someone first thing in the morning. (I deleted that reply.)
I am as puzzled by you at the difference. Can you share your “Render.hdr” file, somewhere? The pextrem program finds the maximum and minimum by looking at the exponent of each pixel, where pvalue is just putting out three columns for red, green, and blue, leaving you to find the maximum using “total -u” or similar means.
If you do use “total -u” on your pvalue output, it will give you 5 results, corresponding to the maximum x and y values (image dimensions), then separate maxima for red, green, and blue, which aren’t necessarily from the same pixel. This will not necessarily agree with pextrem, which chooses to report a single pixel as the maximum, even if it does report red green and blue for that pixel.
Thank you for your answer. I have revised the post-processing of the data and I have realized that it was my mistake and Radiance was working correctly. I am sorry for the inconvenience and thank you so much anyways.