|
From: | Bob Friesenhahn |
Subject: | Re: [Openexr-devel] loosing massive amount of information using openexr |
Date: | Thu, 27 Dec 2012 16:03:53 -0600 (CST) |
User-agent: | Alpine 2.01 (GSO 1266 2009-07-14) |
On Thu, 27 Dec 2012, Morten Mikkelsen wrote:
I am trying to use open exr for export/import of height maps. I am exporting maps which have hundreds of thousands of unique height values. I have tried exporting to openexr in several different existing applications such as: xnormal, photoshop, blender and using DevIl (image library). In all cases I end up with no more than a small handful of unique height values. Roughly 8000. If on the other hand I export to 16 bit png then I get roughly 65000. If I export as .raw I of course get all my hundreds of thousands of values. I have tried all the compression options for openexr. Lossy ones as well as non lossy ones. None of them are giving me more than roughly 8k unique heights. I don't know which version of openexr these tools would be using though it clearly wouldn't be the most recent version. That being said the fact that all 4 are showing me same behavior is leading me to suspect it's a problem with openexr lib or perhaps a former versions of openexr. Is this a known problem with openexr?
This is likely a problem with using 'half' floats (http://en.wikipedia.org/wiki/Half-precision_floating-point_format). Half is intended for HDR values with high dynamic range, but only about 10-bits of precision for each exponent value. 10-bits of precision is common for professional video formats, and for digital intermediates (e.g. 10-bit DPX).
If the range of your data is relatively small but it uses many adjacent values, then there will be significant loss. There is likely an advantage to scaling up your height maps so that they use more of the Half range.
Using plain integer or 24/32 bit floats would be a better solution for you.
Bob -- Bob Friesenhahn address@hidden, http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
[Prev in Thread] | Current Thread | [Next in Thread] |