darktable-org / darktable

darktable is an open source photography workflow application and raw developer
https://www.darktable.org
GNU General Public License v3.0
9.91k stars 1.15k forks source link

FR: Add color channel tabs to tone equalizer #10551

Closed pedrorrodriguez closed 1 year ago

pedrorrodriguez commented 3 years ago

Hi! I was wondering if it would be possible to add color channel tabs to the TE. That way we would have the advanced tab for dodging and burning, and each of the RGB curves would control the luminance of each channel separately, so the TE could also be used to color grade our images. The interface could be the same as in the advanced tab, but the curve would control only one of the channels at a time.

This is already possible with several instances of TE changing each module's blending mode to the particular channel you want to affect, but it requires more steps, and if you want to use a guided filter mask for each of them you'd need 4 guided filters, which seems to be a waste of resources.

Why is this necessary, since we already have a very capable color grading tool in the color balance RGB module? The color balance RGB module adds colors to a certain range of our image. The TE used in this way can add colors, but also reduce them. It can also be a very surgical approach to color grading, and the TE interface (scrolling on the image) makes the process a breeze.

Some examples can be found in the blog post below: https://www.psdstack.com/photoshop-tutorials/basic/curves-color-grading/

Thanks!

PS. I just realized that the Tone Equalizer goes right before input color profile and color calibration, which perhaps is not the right place in the pipeline to be messing with colors. I'd still ask you to consider it, though, since the feature is extremely useful. Perhaps it can be manually moved to a more suitable place in the pipeline if this RGB side of Tone Equalizer is needed?

MStraeten commented 3 years ago

the darktable solution for your linked examples is already available: colorbalance rgb ;) try it, get used to it - it has a steep learning curve, but darktable isn't a tool for those looking for a shortcut or "one module to rule them all"

pedrorrodriguez commented 3 years ago

the darktable solution for your linked examples is already available: colorbalance rgb ;)

Thanks for your reply. Unfortunately no. As I mentioned above and as you can see in the blog post I included (which has a comparison between the results you can get using curves and color grading in lightroom), the colorbalance RGB is not a replacement for curves. If you want to, for example, remove red from the highlights, you can't do it in colorbalance RGB, but you can if you create a new instance of Tone EQ (with or without guided filter) and set the blend mode to the red channel.

try it, get used to it - it has a steep learning curve, but darktable isn't a tool for those looking for a shortcut or "one module to rule them all"

I have tried it, and learned how to use it. I like the module very much and I'm happy with the results I achieve. However it's a different tool from what I am describing.

pitbuster commented 3 years ago

I am pretty sure that you can use the global offset control (with a negative value) to do what the article says. In any case, you may also do per channel presets in tone equalizer (although you should move them above color calibration for channels to be well defined).

pedrorrodriguez commented 3 years ago

I am pretty sure that you can use the global offset control (with a negative value) to do what the article says. In any case, you may also do per channel presets in tone equalizer (although you should move them above color calibration for channels to be well defined).

According to the manual:

global offset

This is equivalent to the ASC CDL offset and falls back to adding a constant RGB value to all pixels, quite like the black offset in the exposure module. This control does not use masking.

So if I want to remove red from the highlights that wouldn't do, since global offset has an effect on the whole image, and color balance RGB can only add color in the 4 ways tab, not remove it, as far as I understand it.

There is no other tool in darktable scene-referred that can do this as far as I know.

This is from lightroom, but darktable produces similar results in Tone EQ (equivalent to curves) vs colorbalance RGB (equivalent to color grading):

imaxe

According to the article, teal was added to both shadows and highlights using each of the tools we are talking about.

imaxe

Also this, although, if you use guided filter masks you would get different results with tone EQ (preserve more local contrast when subtracting colors):

imaxe

I could add three more instances of tone EQ to achieve this, as I mentioned above but if I want to use the guided filter mask that means creating the same mask 4 times, which will be more taxing on anyone's computer than creating the mask once, and using the same mask for luminance, as well as each of the RGB channels.

If what I'm suggesting actually needs to go after color calibration in the pipeline, we would have a total of 2 instances, instead of 4.

pedrorrodriguez commented 3 years ago

Something like this could be the UI for what I propose: Tone EQ Blue

github-actions[bot] commented 2 years ago

This issue did not get any activity in the past 60 days and will be closed in 365 days if no update occurs. Please check if the master branch has fixed it and report again or close the issue.

pedrorrodriguez commented 2 years ago

Sorry to come back to this. If there is no interest for this feature please disregard. I thought it would be useful to organize the thoughts in this thread.

What I am proposing:

A tone equalizer that not only affects luminosity, but can work on the individual color channels independently for color grading, as found in Lightroom, Photoshop and many other editing applications.

imaxe

Why does colorbalance RGB not do everything that tone EQ does?

colorbalance RGB adds a color to a certain luminosity range. This extended version of Tone EQ is able to not only add, but remove color from a range. It also affects the luminosity of said range while being able to preserve local contrast.

EDIT - why does RGB curve not do everything that tone EQ does?

Tone EQ does everything that RGB curve does, while preserving local contrast

Good news:

This is already possible if you set the blend mode of the Tone EQ to an individual color channel, and it works perfectly.

Bad news:

It is cumbersome to set up and an inefficient use of computer power. You have to add three instances of tone EQ, and set each of them to use the right color channel. If you want to preserve local contrast, you also need to set up three masks. Although it works well, it requires many clicks, and even when you use the same mask settings for all three, it calculates the mask three times.

Extra thoughts:

My initial suggestion was to add a tab to tone EQ with the independent color channels. However, since tone EQ happens before color calibration in the pipeline, and that's not the place to be messing with colors, it might be wiser to have it be its own module that is placed after color calibration.

I don't have the ability to do this myself, however I think that everyone would benefit from such a powerful tool, so all I can do is offer feedback and request it, hoping that you will agree with me. I have no idea how difficult this would be to implement, however the tools are already in darktable, and repackaging them into this new module would be very handy to have. What do you think @aurelienpierre ?

If this is of no interest to anyone, I'll shut up about it won't bring it up anymore ;)

Thanks anyways!

MStraeten commented 2 years ago

What’s the benefit doing this in tone equalizer over https://docs.darktable.org/usermanual/3.8/en/module-reference/processing-modules/rgb-curve/?

instead of suggesting a solution to be implemented in a module designed for a quite different purpose there’s more value in providing an idea what you want to do and what you need to achieve.

pedrorrodriguez commented 2 years ago

What’s the benefit doing this in tone equalizer over https://docs.darktable.org/usermanual/3.8/en/module-reference/processing-modules/rgb-curve/?

The ability to preserve local contrast.

instead of suggesting a solution to be implemented in a module designed for a quite different purpose there’s more value in providing an idea what you want to do and what you need to achieve.

Tone EQ is scene-referred local contrast preserving curves, so it is designed specifically for this purpose. This would allow for more advanced split toning than currently possible with RGB curves or colorbalance RGB. I'll give you an example: this enhancement would let you remove red from the highlights of an image while preserving local contrast. RGB curve lets you remove red from the highlights, but it will reduce local contrast, and colorbalance RGB allows you add cyan to the highlights, but not remove red. They are different tools for different results.

aurelienpierre commented 2 years ago

I think you are mixing up everything and not really understanding what each of these tool does while trying to replicate other tools from other software.

You already have RGB curves in darktable. Tone EQ is meant for exposure and uses a "luminance" mask that is not suitable with individual channels.

Then, you may want to consider the channel mixer part of color calibration.

If you want to, for example, remove red from the highlights, you can't do it in colorbalance RGB,

Where did you get this idea ?

pedrorrodriguez commented 2 years ago

Thanks for your reply @aurelienpierre

I think you are mixing up everything and not really understanding what each of these tool does while trying to replicate other tools from other software.

Perhaps, and I am sure I am very far from understanding darktable's modules the way you do. However, what I am trying to replicate is not the tools from other software, but certain results. They are already possible to achieve in darktable, but it takes time to set up. In fact, the tone EQ does things that are not possible in other software.

You already have RGB curves in darktable. Tone EQ is meant for exposure and uses a "luminance" mask that is not suitable with individual channels.

This is one example of something I didn't know. I was under the impression that, since the new paradigm is the scene referred workflow, tone EQ would be the preferred tool. I had no idea that the luminance mask is not suited for individual channels, however, what I am proposing already works as expected with three instances of tone EQ.

Here are three examples of the same image with three different settings:

This is the base image, just contrast and saturation added

colorfulness tab

Remove red from highlights no eigf (like regular curves)

tone eq remove red from highlights no eigf

Remove red from highlights with eigf (should preserve local contrast, and applies the removal of red to nearby areas)

tone eq remove red from highlights

Add cyan with color balance RGB

color balance rgb cyan highlights

The differences are subtle but they are there. I just opened all of them as layers in gimp to compare, and the differences are visible. The point of this is not personal taste, but the results that can be achieved by such a tool. As I explained above, removing red is not the same as to add cyan, and as far as I know (correct me if I'm wrong), color balance rgb only does one of the two. Here are the same images in black and white (converted through the gray tab in color calibration):

Normal

bw no effect

Tone EQ remove red from highlights no eigf half opacity

tone eq bw cyan highlights no eigf half opacity

Same thing but full opacity to see the effect more clearly

tone eq bw cyan highlights no eigf full opacity

Tone EQ remove red from highlights eigf half opacity

tone eq bw cyan highlights eigf half opacity

Same but full opacity

tone eq bw cyan highlights eigf full opacity

Color balance rgb add cyan to highlights

color balance rgb cyan highlights bw

Same with increased chroma

color balance rgb cyan highlights bw pushed

Then, you may want to consider the channel mixer part of color calibration.

In principle, I am after the same thing the channel mixer does, only with finer control. The channel mixer's changes are global and affect the whole image. This lets you choose a certain luminance value and tweak it.

If you want to, for example, remove red from the highlights, you can't do it in colorbalance RGB,

Where did you get this idea ?

If there is a way to remove a color with colorbalance RGB, I am not aware of it. Please elaborate. As far as I know you can only add a color either globally, to the shadows, the highlights or the power. Even if it could, it would still have no eigf, which is an advantage of what I propose, in my opinion.

github-actions[bot] commented 2 years ago

This issue did not get any activity in the past 60 days and will be closed in 365 days if no update occurs. Please check if the master branch has fixed it and report again or close the issue.

github-actions[bot] commented 1 year ago

This issue was closed because it has been inactive for 300 days since being marked as stale. Please check if the newest release or nightly build has it fixed. Please, create a new issue if the issue is not fixed.