Filmic, when to use?

It is possible to use masking but it takes forever and multiple masks at various steps to get it right. I do it manually using G’MIC, which is insane I know. What I mean is that you have to catch all of the gradient reversals and halos for every brightening and contrast adjustment. I did that for some of the PlayRaws. They didn’t end up looking good but they were clean and without artifacts.

When I was cutting my digital teeth with a Nikon D50, I did some masks to drag dynamic range around; tedious, but it worked like the “dodge and burn” paradigm I so loved in the film darkroom. Moving to a D7000 reduced the need to do that so much, and moving to the Z6 has cut it considerably further. That camera also has a highlight-weighted matrix metering mode, which automatically decreases the exposure to preserve the highlights at the expense of pushing the rest of the image into darkness.

And this is why I’m currently experimenting with filmic; so I can expose images thusly and use filmic to drag the nether regions out of oblivion…

Once more, I think one should keep the display ICC tone transform out of the business here! The filmic module does not know anything about the display device, and trying to provide a display-ready image out of the filmic module is IMHO a design mistake. The module should work in linear RGB and forget about displays… I already discussed this with @anon41087856 at LGM2019.

Okay, I put the gamma part of the function in my tool, mainly to do the algorithm comparisons Hable describes, but it can be set to 1.0. I get it, really…

I think you’ve prompted the answer to my residual question, that being what to transform and embed in a JPEG headed to “the wild”, where folks may and may not be viewing color-managed. Accordingly, that should probably be sRGB/2.2gamma; color-managed know what to do with that, non-color-managed will already have an approximate gamut and tone baked in the image (and hopefully not wide-gamut HDR…)

I’ll be posting some of what I’m doing in rawproc next week, when I get back to a fully equipped computer.

To be precise, it should be sRGB gamut with sRGB TRC, that is, “standard sRGB”, embedded in the output image. Any color-managed application will interpret the RGB values correctly and will convert them to the display colorspace through the display ICC profile. If the user display is sRGB-like, the image will look more or less OK also for non-color-managed applications (the more or the less depending on how much the user display deviates from the sRGB standard).

2 Likes

Not the correct way, but I did this with two filmic instances, one for darks and one for highlights, with the help of a mask, plus tone curves and lowpass, to give a final boost.

DSC_8528_01.NEF.xmp (7.4 KB) (DT 2.7)

5 Likes

@gadolf looks pretty good!

1 Like

Thank you for your response.
I’m not able to load the xmp in my Darktable 2.6.2 windows version. Darktable displays an error message and stops working.
Could you explain how to recreate your result in an average-user-friendly way?

Sure (actually, user-friendly is the only way I’m capable to go :wink:)
The history stack:
image

The history stack doesn’t reflect the order in which I applied the modules. The actual order was as follows.

white balance (I think I spotted the back of the lady at right, but not 100% sure…)
image

image

The mask applied in the next step (filmic “darks”):

filmic “darks”:
image
image

filmic “highlights” (used the same mask as above, but inverted):
image
image
image

tone curve (same mask) -
image
image

tone curve (global) - This was to eliminate the redish tone. I certainly could have used other color mapping tools, like color balance, color correction:
image
image

lowpass:
image

3 Likes

In photoflow I would use only tonemapping and curves for a “neutral” starting point

DSC_8528tm.pfi (40.4 KB)

DSC_0856.pfi (32.0 KB)

1 Like

Thank you for an excellent explanation.

Apparently you are not using 2.6.2. Maybe this is the reason for the error when I tried to load your xmp-file.
I didn’t think of using filmic twice (with a mask) since I have been thinking of filmic as a tool to handle an image with big differences between highlights and shadows. When you separate the highlights and the shadows by a mask then you could perhaps use many other tools and get an even better result?
I will give it a try when I have a little more time…

DSC_8528.NEF.xmp (9.5 KB)

DSC_0856.NEF.xmp (9.6 KB)

Sure it is. I’m using the development version 2.7, which produces xmp files that 2.6 can’t read, but I guess this workflow will give the same results in 2.6.

That’s why I stated that my edit is not the correct way to do it :slightly_smiling_face:, which is crystal clear after @ggbutcher’s explanations. However, I must confess that with images such as these, I still haven’t found a way to handle them with a single filmic instance. The closer I can get to is something like @age’s edit (btw, very nice edit). But in this case, I’m not able to tame the highlights as precisely as I do with masks and double instances. In the end, I think what matters is if the result is pleasant or not, and if I have to suspend the rules a bit for that, why not?

Good point, haven’t thought about that… :thinking:

1 Like

that’s too many modules for one simple task. I think I should be able to improve that for dt 2.8.

3 Likes

I still need to check how you do your curve interpolation though, because if you remove the display gamma, remapping the grey log from 67-75% to 18% makes the cubic spline fail big time. The benefit of the gamma, strictly from a numerical stability point of view, is the spline maps from 67-75% to 45-50%, so you avoid oscillations. I have put the maths down for a custom filmic spline, I still need to check if it behaves better.

I wouldn’t ascribe my explanations to “canon”; I’m just trying to show the fundamentals of the curve so one can understand how to intelligently misuse it to good effect… :smile:

Interior shots with such windows are just challenging. My current thinking is, if one wants to get it in one exposure, you ETTR for the window and yank the shadows out of the depths. Thing is, with most cameras you’ll get a noisy room doing that. So, you either 1) give in and shoot two exposures, one for each “scene”, and combine the two with HDR software, or 2) get a camera with a better dynamic range so that mitigating the low-end noise is a reasonable task. I’ve played with both alternatives now, #1 works really well but I’m really warming to #2 with the new camera.

Which brings me back to filmic, which I think is the tool in most implementations that gives the most control in pulling up the shadows in a highlight-weighted exposure. And, that’s my response to the thread title…

1 Like

Ah, home again, with all my little tools…

Here’s a screenshot of what i’ve been messing with in filmic:


I hope the .png renders well on your monitors…

First, this scene is not quite as challenging as @obe’s dining room image, but it doe separate into two distinct “scenes” for exposure consideration. I pulled the parameters pane out of the dock and resized it to show all of the tone tool. Starting from the top, the commands stack has:

  • all of the regular raw processing: camera colorspace assignment, blackpoint subtraction, as-shot whitebalance, and AHD demosaic;
  • the blackwhitepoint tool normalizes the data to put the raw data at the top and bottom of the display range;
  • the tone tool, which is a small “zoo” of tonemapping curves, has the filmic curve selected, which is the Duiker equation shown in a previous post,
  • and the “resize-sharpen” group is for file saving, but I keep it for this messing-around because the display profile transform is faster than with the full-sized image.

Note that the A,B,and D coefficients aren’t the Duiker defaults. Particularly, B is well-below, which is specifically controlling the curve segment applied to the lowest parts of the image. I can scroll through B values and watch the shadows go bright and dark, and the upper part of the image just stays nice and balanced - the “toe” at the bottom of the curve does this nicely. A and D were messed-with to deal with the upper part of the image under the curve shoulder; I don’t have a particular heuristic about them yet.

Really though, I’m pretty sure the piecewise filmic curve @Carmelo_DrRaw is implementing will be much easier to control, so keep his endeavor on your radar…

1 Like

Hi’ @ggbutcher

And your third option is of course to use a flash…

But anyway, you are bound to shoot some photos with a high dynamic range that need special treatment. So it is interesting to study, develop and optimise tools to do that.

I don’t understand all the maths but I see that there are different algoritmes to handle this problem. In the past I have used RT’s dynamic range compression tool which is superior to DT’s tone mapping, in my opinion. But filmic can produce even better results and from the discussion I understand that filmic will be improved further in 2.8. I’m looking forward to that.

In the meantime thank you for all your input, explanations and clarifications….

1 Like

Oh, gee, yes, thanks for completing the consideration. I’m actually in the middle of a “source selection” for a flash; new camera doesn’t have one, and most of my family snapshots occur in a tungsten-lit room with rather large windows…

I’m not really a math person either. What I’ve found, however, is that all of these tone mapping functions (well except for LUTs, maybe) express their performance in terms of a curve, and that curve is the basis for intuitively understanding what’s going on. If you understand the X → Y, goes into → comes outof dynamic of a transfer function depicted as a curve, you can easily start to understand the outcome of applying it to all the pixels of an image.

In my tone tool, seen in the screenshot above, I spent a couple of hours making the ability to plot the curve of the selected operator, and that has been quite instructive to my consideration of filmic. The “money-maker” in the filmic curve, that oh-so-little “toe” at the left end, is hard to depict in context of the full curve, but its little manipulations make a large difference in the transform of a linear scene.

Know the ways of the curve, and the effect of the maths becomes clear…

1 Like

Yes, that’s what I meant by not perfect :-). This was a quick and dirty edit. I did not spend a lot of time on tweaking the masks and added a quite liberal blur and feathering. Probably fixable with a lot tweaking of the masks. I also did not spend any time on noise. But the point here is that this is an HDR where you either fix the grey point of the interior or of the exterior, or both using some kind of masking. Using flimic for the whole scene will result in either a completely blown out exterior or a very dark interior.