1
$\begingroup$

I am facing the following problem:

imported left

The imported image from the explorer, a 16bit PNG file, is not showing up in the correct colorspace (I think) in the compositor

It's a PNG, so it has sRGB colorspace, I don't understand what is wrong with this simple manipulation.

Here is a simple step to reproduce this: Do a render in PNG16bit, import it in the compositor, compare renderlayer with imported result

$\endgroup$
5
  • 2
    $\begingroup$ Blender will always assume that the encoded data is linear in 16 bit or higher imagery. Check how Blender has set the colour transform, and change it to the appropriate transform. $\endgroup$
    – troy_s
    Commented Mar 21, 2019 at 14:18
  • $\begingroup$ how to change the transform ? to hat transform should i set it to ? $\endgroup$
    – Fox
    Commented Mar 21, 2019 at 15:17
  • $\begingroup$ Please add more information: How was the 16bit png created? What color space are you using in the Color Management section of blender? What other nodes are you using in the compositor? If the image is indeed sRGB and you are using filimc or other color tranforms it will look wrong. $\endgroup$
    – user1853
    Commented Mar 21, 2019 at 16:05
  • $\begingroup$ here is a simple step to reproduce this: do a render in PNG16bit, import it in the compositor, compare renderlayer with imported result is it because of the gamma/contrast/exposure tweaking in colomanagement in the propreties panel is creating a loop ? and the fact that it set to filmic and not Default colormanagement ? $\endgroup$
    – Fox
    Commented Mar 21, 2019 at 18:58
  • $\begingroup$ The Image / UV editor has a properties setting. Change it to sRGB or linear or however it is encoded. $\endgroup$
    – troy_s
    Commented Mar 22, 2019 at 22:41

2 Answers 2

1
$\begingroup$

Short Answer

  • An image meant to be viewed in a particular color space will look wrong when displayed in other color spaces.

Long Answer

When you export a PNG using filmic blender and any of the looks in the color management section, you are creating a file that, when read in sRGB color space, will look correct (for example if you were to open it in photoshop, or other app that presumes sRGB values, it would be correct). In other words your image has been not only transformed to fit within the constraints of display referred values, that go from 0 to 1, but it has been modified by curves to make those images look fine on an sRGB display.

So those PNG no longer contain the same values of your original rendered image (created in scene referred, linear), but an interpretation of those values (display referred values, to be viewed in a monitor).

If you bring it back to blender but keep the color management as filmic the values will be displayed incorrectly as they are no longer using the wide range of values that filmic is expecting. Filmic blender needs a wider dynamic range that goes way beyond 0 to 1. And is expecting those values in a linear scale. So for you images encoded as RGB to look correct, you need to set the color management to "default" or sRGB.

enter image description here

An even longer answer

Let's talk about what happens under the hood when you set color space as input for the image (in the image viewer or the image nodes).

If you specify a Color Space as input Blender will use the inverse color transform to turn the information back to a linear scale. For example: an image in sRGB is encoded using a power value (gamma) of 2.2. Blender will apply a power of .4545 to "unbend" the information back to linear values.

enter image description here

Why does it matter having linear data?

Operations regarding color manipulation and image mixing are better done using a linear scale, the math is not only simpler, but accurate and that is how light behaves in nature.

But didn't I just converted my image from sRGB to linear, why can't I use it now with filmic blender?

The image "linearized" from sRGB is in the wrong scale. It still in a scale from 0 to 1. In other words the inverse transform operation will create an image in "Display Linear" values.

As explained earlier, Filmic Blender uses a much larger set of values. For example: White is no longer at a value of 1, but somewhere at 16.19.

enter image description here enter image description here

(By the way, if you haven't done so, now is a good time to read: Render with a wider dynamic range in cycles to produce photorealistic looking images for an in depth explanation of how filmic blender works.)


If your goal is to manipulate images using filmic after you save them you have two options:

  • Keep the information linear, in a format that allows values much larger than 1. The EXR format was designed to do that. When you save as EXR you are effectively bypassing the transformations on the Color Management section, you are keeping the integrity of all the scene referred data. Think of those files as perfect udistorted copies of the original render layer information and passes.

    When you bring those files back to blender, blender will understand that they are in a linear format. From there you can do whatever manipulation and compositing you want. The result you can save then in a display referred format using the filmic color transforms for the final output.

  • If you "must" use PNG or TIFF, use the original Filmic blender from https://github.com/sobotka/filmic-blender set the View transform to "Filmic Log Encoding Base" and the look to "none" before saving. Images will then be log encoded. Log encoding fits a much larger set of values than the regular sRGB transform within the limits of a display referred format. When you bring log encoded images back to blender and choose filmic log to interpret them in blender, an inverse log operation will be used de-log the image and turn it back to linear values, but this time they will be in a scale that can be correctly interpreted by the filmic blender color management settings. In other words you will be getting back your original scene referred values.

$\endgroup$
1
1
$\begingroup$

Blender does not support ICC profiles - this can be a problem if the image has any ICC profile that is not sRGB.

If you have a calibrated/profiled monitor, since Blender does not support ICC profiles color would also be sent to the monitor as sRGB instead of the monitor's profile so it would differ from software displaying images correctly taking monitors profile into account.

If your color management settings are set to filmic or have any looks, the image will be changed according to that.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .