So I have put these examples together that hopefully demonstrate the issue.
Some notes:
- These have been converted to 8-bit jpgs for this website, but they are still representative of the output.
- @claus you are correct in saying that the AgX view transform example does give a slight pinkish hue to the red, thanks for that input
- This red glowing sphere in a white room is representative of a worst case scenario for color management/color data storage.
First up, we have a representation of what an un-processed EXR file, half-float/16-bit image looks like. In this state, it looks unusable.
However, the color information is stored in the floating-point data, so a quick camera raw filter in Photoshop (auto settings, with HDR turned off) shows this:
We get a realistic interpretation of what the bright red light should be doing: A white core with a red bleed/halo, like a lightsaber or neon light.
Then we get 16-bit TIFFs as @claus has asked about:
Here we see an almost identical image to the un-processed EXR file. So what happens when we try to run the same camera raw filter? (exposure, contrast highlights, curves etc.):
So now we see that this image, which uses
16-bit integer data, cannot be saved, the color information just isn’t there to bring back the glowing sphere.
Just to really make sure, this is what happens when we crank up the exposure some more:
The integer data does not contain enough information like the floating-point data of the EXR can, even though they are technically both ‘16-bit’.
There is a lot of literature out there for integer vs floating-point data, but it essentially boils down to:
Integer: Whole numbers only, in this instance RGB values of 0 to 255
Floating point: Decimal places, in this instance values are stored as 0.00000 to 1.00000. A higher fidelity of detail in the data.
Something important to note is that, that I am quoting from this reference is in integer, exceeding values are clipped, 75% grey + 75% grey = white (255). Lowering the exposure won’t bring back any values over white. Integer formats cannot store values above white. (This is effectively what is happening in our examples above).
In floating point, exceeding values are not clipped 75% grey + 75% grey = white (1.5). Lowering the exposure can bring back all values over white.
PNGs exhibits the exact same behavior as TIFFs, as they also work on integer data:
AgX and Filmic and other view transforms give us a way of working that now seems unusual after learning all of this. I had previously not understood how AgX was giving me the desired behavior of the bright light, but could be saved as 8 or 16-bit integer image types without the loss of information. It is because Blender (or any 3D program using a view transform) is using the floating-point data before then applying a curve type (AgX in the example below) and then baking that appearance into the image when you save it:
Note the hue change Claus mentioned.
And I think that concludes it really, I hope that makes sense!