New Primaries module

I suppose it could be somewhat useful in conjunction with filmic, yes. Haven’t experimented myself, though. I think it’s worth trying.

I would say the RGB ratio + norm mechanic used in filmic is vastly different from the ”per channel curve” mechanic and the ”dance” might give quite different results than when used with sigmoid.

The reason I didn’t implement the ”custom primaries” feature within filmic is that I didn’t see it as useful with the mechanic that filmic uses. With per-channel, you get to control the hue shifts with the primary positions. Filmic, on the other hand, is kind of all-in for 100% hue (as in chromaticity angle) preservation that can’t be turned off for the recent versions of the algorithm. Therefore I didn’t see it as a good fit for the module.

3 Likes

But wasn’t the video just demonstrating the “dance” with filmic… so I don’t really get the question from @vbs at least I took it to mean that when using filmic and perhaps sigmoid before the update that it would be easy to break an image if you try to increase the purity before the tone mapping… and that is what was demonstrated in the video… so I thought the question was a bit redundant no??

I will re watch it but at 3:13 mark sigmoid is shown. My understanding is that the dance is applicable for either (sigmoid or filmic) but sigmoid has an improvement that makes the duplication not needed (if I am understanding correctly). As per @flannelhead filmic works in a different way.

Yep I agree but the video clearly demonstrates in the initial example that the second instance is created and moved above filmic, ie the “dance” so I just wondered why you were asking and the post from @flannelhead was just noting that with the new addition to sigmoid that it could handle the purity issue… so that is why I was confused how that was prompting your question… It will likely behave a little differently with say v5 vs the current filmic that does its gamut magic…

1 Like

My take on trying to summarize the last few posts (just trying to learn here, so please correct me if wrong or not using the proper terminology):

  • Petrikas is showing how RGB Primaries can be used to fix color “distortion” in highlights (a.k.a. over saturated highlights). Using a first instance of RGB Primaries before the display transform module (either filmic or sigmoid), he reduces the purity and then uses a second instance of RGB Primary after the display transform module (again either filmic or sigmoid) and increase the purity to restore the colors of the areas that are not highlights.
  • Flannelhead explains that with the new sigmoid primary enhancement, this two instances of RGB Primary (before and after sigmoid) won’t be needed since this could be done directly in sigmoid.

So for this particular use case (over saturated highlights), we can either use Petrikas approach with two instances of RGB primaries and filmic or flannelhead upgraded sigmoid module.

8 Likes

If not ”custom primaries”, might it be useful to use the “RGB Primaries module” along with "filmic?

If so, would Primaries follow filmic in the pipe order?

@stuntflyer That’s pretty much the video link shared above… Using it before if reducing purity and a second instance after if you need to bring some back. Or maybe before for a color correction and after more for a look or style…

@priort That’s what I was looking for. Thanks!

For completeness if you haven’t seen the alter ego… here it is…

1 Like

A potentially useful use case would be reducing the purity of the incoming signal before filmic. Then after filmic, optionally restore purity where needed (for example selectively with color balance rgb or such). I haven’t tested, though, and there’s no “warranty” for this kind of a process. Sorry about that, but I don’t use filmic at all nowadays.

As said, I see the most benefit from adjusting the primaries when used in conjunction with a per-channel curves process such as is implemented in sigmoid.

Further, the “custom primaries” section in sigmoid is nowhere similar to (a single instance of) the RGB primaries module. The process in sigmoid is more profound as it implements these steps:

  1. Ensure all incoming values are within the working gamut footprint
  2. Apply a 3x3 matrix specified by the parameters to “inset” the incoming data (reduce purity) and optionally rotate the primaries
  3. Apply per-channel curves to the data from step 2
  4. Apply the inverse of the matrix in step 2 to regain purity in the “middle range” values and restore the rotated primaries to their original places

The per-channel process pushes bright lights toward white in a way that usually looks very good, but only if the values are not at the edge of the working gamut footprint to begin with. This is why the “inset” is applied - to ensure that even those nasty blue LED lights (or whatever you may encounter) are rendered such as to give a sense of “brightness”. Without this, they would be left as flat, posterized blotches.

You may know that the values in the per-channel process converge toward the secondary colors - cyan, magenta and yellow - in the high end. You can see this in the color sweep demonstration here. The rotation controls in the “custom primaries” section allow to control which cyan, magenta and yellow they are. It is very important that the inverse matrix is applied in step 4 so that the overall image appearance is not affected by this.

As you can see, this relies heavily on the per-channel process to give the benefits of a better-looking result. As such, this process is not readily applicable to what filmic does internally.

5 Likes

IMV, it’s a shame that DT appears to be skewing users toward using sigmoid as most of the time, other than the occasional quick and dirty edit, I personally find it pretty inferior to filmic.

How is DT doing that?

Adding functions only to sigmoid.

Would (color balance rgb or such) need to be placed above filmic in the pipe in this scenario?

He stated elsewhere that he didn’t feel these sort of controls didn’t make any sense in filmic, especially the newer versions because of the way filmic handles color preservation.

The new primaries module is very similar to what’s in sigmoid, but doesn’t tie into any tonemapper.

I don’t think dt is pushing you towards anything. You’re free to do whatever you’d like still.

8 Likes

While I see your point, I don’t see that adding functions to one option is taking anything away from the other - after all, filmic has been under development much longer than sigmoid - if anything, sigmoid is only catching up! :smiley:

Darktable has always had more than one way of doing things - the user is expected to use the option they prefer, not jump to the newest thing just because it’s new. Just my 2c…

5 Likes

I understand what people are saying, yet incentives matter. You don’t have to buy the candy that supermarkets put next to the checkout, but there’s a reason that they put it there. Hopefully I’m wrong in thinking that my favoured tone mapper will wane from neglect

1 Like

Hello,
That’s your point of view. Personally, I’ve never been convinced by filmic versions 6 and 7.
Apart from the results obtained with Sigmoid, which are very subjective, I much prefer the philosophy of this module. Just read the cordial exchanges on github between the various developers. https://github.com/darktable-org/darktable/pull/15104

Personally, I only use Sigmoid, and with the latest version I’ve re-edited photos I’d never been satisfied with, with excellent results.
For all this, many thanks to @flannelhead, @jandren and all the developers.
Greetings from Brussels,
Christian

3 Likes

Yes, that is my POV. Congrats

May I ask what you would add to it and also noting that one of the major criticisms of filmic is that it does too much and there are too many options so I actually wonder if adding more would really be of any benefit… its a global tone mapper to set up the image…what more can we ask of it… just wondering…

2 Likes