Hi everyone!
I need to transform a 32bit PFM (HDR) file, reading pixel by pixel, into a usual LDR format and later write into PPM and BMP files. Can someone please give me an equation to solve this or a sinppet. is it enough to tonemap?
Hi everyone!
I need to transform a 32bit PFM (HDR) file, reading pixel by pixel, into a usual LDR format and later write into PPM and BMP files. Can someone please give me an equation to solve this or a sinppet. is it enough to tonemap?
You probably need to consider Exposure & Tonemapping.
i.e. what if the HDR image has values all greater than 10000?
Also since this is a lossy operation, the choice of tonemapper will have impact on the LDR/SDR result.
Geometric mean computed using the sum of log luminances is a common way of finding an exposure.
Then applying a common tone-map operator like Reinhard, Hable's Filmic curve, or even one of the new standard ACES ODT transforms can be done. They all have different results.
I would reference MJP's post on the topic.
https://mynameismjp.wordpress.com/2010/04/30/a-closer-look-at-tone-mapping/