Filmic RGB vs in-camera Exposure Compensation

I agree with your argument but think the current behaviour is trying to second guess rather than just accepting my settings as is.

Perhaps its just me but when ettring I go manual and/or spot metering. Matrix + comp is a bit unreliable and better for more casual stuff. You can easily blow highlights so its better for “normal” exposure adjustments.

You can of course easily adjust exposure to you liking in post. No issue with that. Its just the logic of the default that seems odd.

1 Like

Agreed, the default behavior of compensating in-camera compensation has pretty much never helped me.

What I always need to do though is to add a lot of exposure (+1 or +2 stops) as the “raw black/white point” module still operates in the [0 - 1] range. Updating that module to align with the rest of the scene-referred workflow would be a neat way of standardizing away that need and be less confusing than having a default +N stops exposure module. Such a change would define a middle grey point instead of a white point to allow for larger than one intensity.
The default grey point would probably best be defined such that darktable middle grey = OOC jpeg middle grey as that would be the least confusing result. Anyone deliberately under or overexposing should expect those images to be under or overexposed in their RAW editor as well.
I think that would be possible to implement using the existing RAW image database, but the highlight reconstruction module would need a bit of rework as a result. Don’t know if it would cause any problems for the white balance or demosaic modules.

As for assuming everyone does ETTR. I’m at least not doing it as noise can be filtered but clipped highlights are lost. So I’m actually rather shooting ETTL :sweat_smile:

2 Likes

When I first stumbled across this thread I thought it’s only about automatic undoing of dialed-in exposure compensation. Only later I realized that the defaults in the scene-referred workflow do not simply undo the exposure compensation that was set in camera but at the same time adjust the black and white point accordingly inside the filmic module.

I am trying to improve my intuition for what is actually going on here.

This is almost the general rule that filmic applies to set the white and black point by default. That seems to be:

WhitePoint = 4 + 0.8 * ExpCompensation
BlackPoint = -8 + 0.5 * ExpCompensation

where ExpCompensation is the exposure compensation applied by the exposure module consisting of a constant 0.5 boost and the negative of the exposure compensation that was set in the camera.

Here are some effects of this

  • We are using an input range of about 12 EV which is comparable to the theoretical 11.7 EV of sRGB. So filmic is not doing HDR-tone-mapping by default.
  • What the camera thought ought be middle gray will be 0.5 EV brighter in filmic. (Why is there this offset?)
  • The filmic white and black points will be shifted towards the range of intensities that is properly exposed in the raw file.

I can see the wisdom of this rule for the window example of @kofa (or “ETTL”): since we underexposed the image deliberately, there must be some interesting detail in the highlights that we would like to preserve (the bright window). In order to properly tone map this image, we will want a white point that is relatively farther away from middle gray and this is equivalent to using low paper “hardness”.

However, the same default rule does not seem to make that much sense for ETTR (which is its main advertised use). There, it translates to using a hard “paper” that will help to discern detail in the shadows. However, already at +0.7 EV dialed in the camera, filmic’s default curve becomes non-monotonic (orange lower part) and thus anomalous.

  • What are some good general rules for setting the white and black point? In general, will one tend to stick with the 2:1 ratio of white point to black point as in the default, or perhaps more with a 1:1 ratio like in the auto filmic style of @anon41087856?
  • I know that filmic is not supposed to be automatic, but for sure it would be possible to create an auto mode for filmic that better matches expectations for a default usable result. Filmic would stilll allow the same artistic expression, but it would be easier to process huge batches of boring pictures.
1 Like

There’re no general rules since everybody is just asking for general rules and don’t try several settings and provide the results as a set of general rules.
For a plain well illuminated scene the defaults are quite useful… if not, you need to tweak black or white sliders depending on your expectations of the resulting image…
If you found a general rule, feel free to share …

Well, that depends on what you are looking at. Compared to the sensor, no, it’s not “HDR”. Compared to paper or screen (with a dynamic range of about 6-8 stops in most cases), 12 EV is already HDR, and you need tone mapping to get it back in your output range the way you want it

Ask the camera makers… That 0.5EV default offset was determined from what was seen in practice. The exact amount needed varies per camera brand (and model?), I usually need something in the range of 0.7-1EV.

As for general rules: why would you want them? What I find I need is an understanding how each setting influences the image. Once I have that, adapting the settings to each image becomes easy. And I usually find that the defaults make a good starting point (I thought I could do better for my images, but I went back to the “factory defaults” soon enough…). And I don’t expect default settings to be anything but a starting point.

Tbh, if I wanted a one-click solution, I’d have stayed with in-camera jpegs. After all, they only need the shutter click for processing :innocent:

1 Like

For the black point, the raw file metadata will include an the manufacturer’s recommended black subtraction value(s), which remove the sensor’s dark current bias. If you decide to depart from that, it’s a subjective decision IMHO. I will occasionally do it to drive shadows into the dark oblivion as a means to separate a dark background from a lighter subject.

For the white point, first-off there’s a good read on how to establish decent white points per-camera in the RawTherapee’s camconst.json file, where RT stores all the white points it knows for various cameras:
https://github.com/Beep6581/RawTherapee/blob/dev/rtengine/camconst.json#L113
In my processing with rawproc, my hack software, I use a different approach, only dependent on the data presented: white point = max value of the R, G, and B channel max values. This accommodates a couple of things: 1) 12-bit and 14-bit raw camera data doesn’t fill the 16-bit unsigned integer[1] data containers sometimes used internally, so that has to be scaled out, and 2) a point where the camera though was “white” needs to be anchored for subsequent processing. This approach sets up the data for subsequent highlight recovery using the RT algorithm[2], but I try to avoid that by not driving high-key into oblivion in my exposures.

For what it’s worth… [3]


[1] Actually in rawproc I use floating point representation, 0.0-1.0, but I preserve the relative magnitude when converting the camera-suppliedhttps://discuss.pixls.us/t/filmic-rgb-vs-in-camera-exposure-compensation/19825/43 integers, so the so-called “16-bit scaling” still applies. Ignore all this for your particular consideration… :laughing:

[2] Thanks, @carvac and @heckflosse! Works like a treat, even without parameters…

[3] When one is including footnotes, one has written too much… :crazy_face:

1 Like

It is not difficult to set up filmic to produce a result similar to the old base curve.
You can download dpreview studio scene sample images raw and jpg and tune exposure and filmic to replicate closely the greyscale.
For my Sony A6400, for example, this requires exposure +1.20 EV and the following in filmic

immagine

This will give you a decent starting point, similar to camera jpgs, but of corse only works as-is for well lit, non-backlighted images, for example studio work.
For HDR or backlit images you will have necessarily to tweak exposure and filmic more.

2 Likes

Which part of the image did you take for a reference for middle grey (exposure)?
How did you set up the black and white points in filmic? Just by personal impression or by selecting a certain area of the image?

You can set the middle grey from the greyscale in the color checker, the fourth patch is L=50.
White and black levels can be auto, as the image contains specular highlights and (almost) pure black.
That is you starting point, then you can try to tune to visually match greyscales to the jpeg, use the snapshot functionality in DT.

1 Like

Great idea! I created a curve that replicates the rendition of the dpreview test shot by the JPEG engine of my camera quite accurately. However, when I apply this as a style to images taken outdoors, I see a significant difference.

Are the tone curves that the JPEG engines of typical cameras apply actually independent of the captured image? I mean, of course, when shooting in plain PASM modes without specific scene modes or “gradation auto” settings.

Can it just be that you have a much larger dynamic range in your outdoors images? And what you you adjust in that system to fit the image to the fimic curve?

I’d expect the tone curves applied in camera to be fixed. Cameras don’t have all that much processing power to spend on image analysis at that stage, compared to laptops and desktops. However, the camera can play with the levels before applying the tone curves (equivalent to applying “levels” and/or “exposure” prior to “basecurve”)

The “base curve” approach, that has been used for quite a number of years, was based on exactly the procedure you describec: compare a raw with its OOC jpeg, and fit a curve. It did mean that you had to adapt the dynamicl range of your actual image to what worked with the basecurve (levels, exposure module with masking, etc.).

With filmic it’s more the other way around: you adapt your “tone curve” (filmic) to the dynamic range of your image. I find that much easier and faster in practice, even without presets or styles.

Note that I’m only talking about basic “technical” adjustments here, i.e. making sure that the information you have in your raw gets in your final image, without introducing (extra) clipping. So no complicated tone curves or zone system at this stage.

Camera apply all sort of tricks to optimize the dynamic range, even in PASM modes. Sony for example has the DRO (Dynamic Range Optimization) feaure, other brands name it differently. You can try disable that and see if result is closer.
But anyway in outdoor scenes mode DR is needed, so you will have to tweak filmic along with exposure.
My method is to get a starting point with filmic similar to old base curve, not matching camera jpeg in all conditions

Based on the rt automatic curve my Pentax and Ricoh cameras do look different from exposure to exposure. This is without highlight or shadow protection.

Thinking about it, this makes a lot of sense. If cameras were to expose “correctly” that would mean that what the camera thinks is middle gray would have to be registered by the sensor as 18% of the sensor white point.

But this would mean

  • no margin to implement a tone mapping curve that transitions gently into white,
  • no margin for lowering exposure bias in post-processing (applying -1 EV in post would shift the white point to just 1.44 over middle gray).

For the case of my camera (Olympus E-M5 III), if I want that darktable’s middle gray matches OOC JPEG middle gray, I need to set exposure bias in darktable to 1.5. (I consider pixels that OOC have a value of about 120, i.e. field 6 of the Kodak gray scale of the dpreview scenes.)