3

In order to tweak material colors on my 3D photo-montages, I would like to quickly superimpose a 3D scene render on top of a jpeg image in the compositor. However, since I use a filmic look for the render, I need to find a way to keep the jpeg image in sRGB while the 3D render uses Filmic.

Note: the jpeg is not always a regular photo. It can be a fused one from bracketed exposure, and the fusing technique may vary. So I know Filmic colors will not always match the processed photo but I feel like working my way from Filmic is easier than from sRGB to get good-looking results, at least for a quick and easy and somewhat artistic compositing process.

ChameleonScales
  • 2,510
  • 13
  • 33

1 Answers1

3

If you load an image into Blender's compositor and set it's colorspace correctly (it's sRGB most of the time, unless you know it to be different) Blender attempts to convert it to linear colorspace. Then you are supposed to do compositing in linear colorspace and Blender's color management maps that to whatever device you have set and whatever way you want to do this(so probably in this case with filmic color transform).

So you are not supposed to do anything to that jpeg photo if it's in sRGB colorspace. It will be converted to linear - same way as your render comes out in linear colorspace - and then together with it mapped to display device ( for example sRGB if it's set like this enter image description here) using filmic color transform. It will not look the same as the original photo because the idea behind filmic is to compress higher dynamic range into what you can see using your display device.

If you mix sRGB photo with content that is compressed to the same sRGB using filmic color transform, the photo and your content will have different dynamic range.

Your case

You have a photo in some colorspace. It is most likely sRGB or AdobeRGB - whatever settings were set in the camera. You could check the file's metadata to find out. In any case it is wrong to set the colorspace to Filmic Log in the image node because it is not Filmic Log. You should set the colorspace to the actual colorspace the photo file has so that Blender can interpret the colors correctly when attempting to convert it to linear colorspace that happens automatically in the compositor.

Filmic color transform is not something that usually happens inside a digital camera, so it is natural that if you use Filmic color in Blender you should not expect the photo to look identical to what comes out of camera when it is composited inside Blender with Filmic.

I would suggest the following workflow:

  1. Make sure the colorspace in the photo is sRGB, or one of supported colorspaces before you import it to Blender: enter image description here These color spaces only make sense if you convert raw photo to them, preferably in higher bit depths than 8 bits per channel. If you have 8 bit jpeg image, it does not have much information to work with so sRGB is the colorspace to use and it does not make sense to convert it to anything else. It's not ideal but what you gonna do?.. In any case the setting must match the actual color space that the photo is in.

  2. Import the photo to Blender's Compositor. Do nothing to it(or set the actual colorspace that the file is in). It will be set to sRGB by default and Blender will convert it to linear colorspace for compositing automatically on it's own without any action needed from you.

  3. Do the compositing, adjust your render to match the colors in the photo, adjust overall colors any way that works for you with color management set to filmic so that you get nice colors and tones with high dynamic range compressed to visible range, highlights desaturated and all the good stuff that Filmic offers.

  4. Save your result.

It is going to be different than your original photo, because you use Filmic, that is not used in your camera when taking the photo. If you do not like that, do not use Filmic color transform.

Martynas Žiemys
  • 24,274
  • 2
  • 34
  • 77