Why is a 32 bit EXR clipped when saved?

  • 3
  • Problem
  • Updated 2 years ago
The OpenEXR format is supposed to support 32 bits of data per channel, which is practically infinite.

When I open a .hdr file with a particularly bright section, save this as an EXR file, and re-open it in Photoshop, the brightest part of the image is clipped.

Here's a screenshot of the image with the exposure reduced by 17 stops: http://i.imgur.com/I98febk.png
And this is the original .hdr file with the same 17 stop exposure reduction: http://i.imgur.com/gg77Bk6.png - you can see this is brighter and has a gradient to it, unlike the EXR which is darker and is a flat colour.

Why is the EXR file clipped? Are EXRs secretly saved only as 16 bit, even though the image mode is set to 32 bits? (http://i.imgur.com/XPuKZku.png)

Here is the original HDR file for you to test: https://hdrihaven.com/hdri.php?hdri=symmetrical_garden&dl=yes
Photo of Greg Zaal

Greg Zaal

  • 4 Posts
  • 1 Reply Like

Posted 2 years ago

  • 3
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 812 Reply Likes
The only limitations are the 16 bit float format used in EXR files, which do not have the full range of 32 bit floats.
Otherwise, there is no clipping going on.
Photo of herbert wegen

herbert wegen

  • 36 Posts
  • 26 Reply Likes
Why does Photoshop's EXR export not support full float values? The OpenEXR plugin does, as well as Blender and other applications.
http://www.fnordware.com/ProEXR/

Unfortunately, the native EXR export is rather unusable for high-end work.

And I have just noticed that even when I import a full float EXR file in Photoshop, and export this as a HDR file, the values are clipped.

Which means that Photoshop's EXR import will treat even full float EXR files as being half float ones, correct?

Conclusion: the native EXR import/export should be avoided at all times, unless one works with half float images only.

A bit of an unfortunate state of affairs, in my opinion. It makes Photoshop unsuitable for EXR related work. Unless an additional plugin is purchased.
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 812 Reply Likes
Because when the EXR format was created, it only supported 16 bit floats.
It has been extended since then, but we haven't had a chance to update the plugin to offer the newer options.
Photo of Greg Zaal

Greg Zaal

  • 4 Posts
  • 1 Reply Like
I see, thanks :)

Is there any chance you guys could work on it for the next version? As you can probably tell from herbert's passionate replies, full 32-bit float support for EXRs would mean a lot to us. The whole VFX industry makes heavy use of this format as a standard, and being able to edit it properly in a powerful tool like Photoshop would make a big difference.

I understand it'll take a considerable amount of development time, and this is a relatively niche field compared to the overall uses of Photoshop. Still, it is 2016 after all, memory and disk space are growing rapidly meaning more and more people choose to use such image formats in order to preserve detail and ultimately create better artwork.

Thanks for your consideration and help anyways :)

@herbert, no need to get upset about it, 32 bit tiffs seem to work correctly and can be used as an alternative. Krita supports 32 bit EXRs natively now, so if you absolutely do not want to use a different format, try a different program instead.
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 812 Reply Likes
I can't promise features. But the request has been heard.
Photo of herbert wegen

herbert wegen

  • 36 Posts
  • 26 Reply Likes
Yes, Krita is great. I use it for mu digital painting nowadays - much nicer than Photoshpo's painting tools. And for my work at home and as a freelancer I switched to other software, so it is not really an issue in my own situation. But it is a bit unfortunate (or fortunate?)  that I have to tell my students that EXR is not really usable in Photoshop, and they will have to rely on alternative software to make that conversion.

Chris, I apologize for my ranting yesterday. It is just that it is yet one more thing that reduces the viability of Photoshop in vfx pipelines, and that is sometimes frustrating. 

Sometimes I also feel that when certain features are implemented, they do not receive an update for a long, LONG time, and consequently Photoshop lags behind. The EXR import and export is a prime example. The web export being a second example: the improvements are nice, but it took such a long time for those to be implemented. And even now other (free) tools still do a better job in regards to optimization.

Perhaps Adobe can buy out the ProEXR plugin, and implement that as standard? ;-)
Photo of Greg Zaal

Greg Zaal

  • 4 Posts
  • 1 Reply Like
That doesn't answer my question really - why would the 32-bit data get saved as 16 bits, when EXR fully supports storing 32 bits?
Photo of herbert wegen

herbert wegen

  • 36 Posts
  • 26 Reply Likes
It is Photoshop's native EXR import and export module that is at fault here: it just does not support full 32bit float values. Even when you import a full 32bit float value EXR file in Photoshop, it will automatically convert that file to a half-float 16bpc value one.

This does not happen with the HDR import/export.

It is a limitation of the EXR import/export. That is why you will have to purchase that ProEXR plugin to work with full float EXR files in Photoshop, or resort to other tools, such as Blender.
Photo of Greg Zaal

Greg Zaal

  • 4 Posts
  • 1 Reply Like
I already pay for Photoshop, and I expect it to be a functional program that can handle 32-bit images as advertised. The idea of purchasing an additional $250 plugin just to gain this ability is ridiculous.
Photo of Steve Sprengel

Steve Sprengel, Champion

  • 2611 Posts
  • 333 Reply Likes
I agree.  I wonder if Photoshop's lack of support is due to the 16-bit half format values directly supported in GPUs natively.
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 812 Reply Likes
Or because the OpenEXR format was originally defined to only store 16 bit float....
Photo of herbert wegen

herbert wegen

  • 36 Posts
  • 26 Reply Likes
Or because your team decided to prioritize other features, and avoid implementing the newer EXR libraries in the past five years...
Photo of Steve Sprengel

Steve Sprengel, Champion

  • 2611 Posts
  • 333 Reply Likes

Chris are you saying PS doesn't support 32-bit OpenEXR files, only the 16-bit "half" format?  See here under Features:  http://www.openexr.com/about.html

Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 812 Reply Likes
Yes. OpenEXR was created with only 16 bit float support. Other depths were added later, but it takes a lot of time to update the EXR libraries, much less add and test new options for the libraries.
Photo of herbert wegen

herbert wegen

  • 36 Posts
  • 26 Reply Likes
Around the 20th of October 2012 OpenEXR support was requested by users of Photoline (myself included). On November 13 the first beta with EXR import and export was released. This included multi-layer support.

It was implemented in Photoline by a team of two developers within less than a month's time. And they had time to work on other features and bug squashing as well.

An alpha plugin to support EXR half float single layer import and export was introduced in Photoshop CS5 sometime during 2010, I believe.

If a team of 2 developers (of which only 1 implemented the EXR library) can implement the newer libraries within three weeks in a competing product, and still work on other features and improvements as well, then I kinda fail to understand your statement.

You had five years to continue to improve the EXR support in Photoshop in small digestible steps.  Just full float support could have been added. It is shocking to realize that EXR import clips the full float information. Export is bad enough, but seeing that merely importing does that to your data (without ANY warning)... well, that is BAD.

It is your responsibility to your users to at least provide a warning message that states that full float EXR images will be clipped to half float.

The "it takes a lot of time" argument sort of falls a bit flat on its face, in my opinion. Everything takes time and effort.

Let's just say your team had different priorities on the list to work on, and they probably still do.

There is a problem in Photoline with full float EXR files and the color picker. I wonder how long it will take them to fix this. Probably by next week, or so, based on previous experience.

How long will it take for your team to fix the EXR import and export? No need for layers, or any of that "exotic" stuff. A few months? A year? Five years?

In the meantime I will just tell my students that they should avoid Photoshop for any EXR related work. As I already do with 16bpc image high range critical work.

I apologize if I come across as overly critical - I merely feel your team dropped the ball on this one. Here's hoping this will be resolved before the end of this year. It "takes a lot of time" after all.
(Edited)
Photo of herbert wegen

herbert wegen

  • 36 Posts
  • 26 Reply Likes
So, 19 hours later, and one of the two Photoline developers has already responded with a fix for one problem, and is looking into fixing and improving a couple of other issues related to EXR import.

 
Photo of herbert wegen

herbert wegen

  • 36 Posts
  • 26 Reply Likes
Well, what do you know: the issues with EXR import in Photoline are fixed. It took the Photoline devs (two of them, and one worked on these issues) 4 days to fix them (and they were also  squashing other bugs). The latest beta is already available to license holders.

Of course, EXR import in Photoline already supportef multi-layered full float files to begin with. Still, 4 days. 4!

I wish the Photoshop dev team could be as accommodating and lightning fast. ;-)