Darktable | How to apply a mask from a treatment

Cool. All done. Found it. I never would have thought it was a raster mask. Thanks.

1 Like

About the 3dlut mask (from 1:50).

The mask at about 4:00 looks really rough. You should be able to get a better mask in darktable using the parametric and drawn mask feature available in every module. In addition, when the next version comes out in a few weeks, there will be color matching between photos.

The color processing in 3dlut creator is crude and without masks.

I have no idea what you’ve been talking about this entire thread then.

3dlut creator was an example not of beauty and health (have artifacts, no artifacts And so on), but an example of the very idea of applying any corrections as masks.
For example, you take the tool filmic rgb and process an image with it, but (then) the result is not applied to the image, but as a mask for a tool, say, color calibration.

Or vice versa. Go to the color calibration tool, to the lightness tab, do a different volume effect on the photo, but make the result a mask for the fimic rgb tool. There could be a lot of variations. I mean, obviously, meaningful variations.

Yes, those are called raster masks in darktable.

To me what was shown was a more interactive version of the color mapping module in DT…That is then saved as a lut…if the DT color mapping module allowed selection of areas then you could export a PNG after applying it to an identity PNG. There is as mentioned the new feature coming but that is only one sample not multiple ones correct???

:slight_smile:
The idea is to create a mask not with the tools that now create masks in dt, but directly with the tools themselves: filmic rgb, tone eq, color calibration etc.

And the raster mask tool is useful, I don’t argue.

Well, or a mask based on the channels of the same photo that we process.
The mask is the processed image itself. We don’t limit it with mask sliders, but directly apply it to the image itself. Moreover, you can apply not all three rgb channels, but only the green channel. Such a photo, which serves as a mask, acts as an external material, so as to be able to pre-correct it as a mask. And then we can correct such a mask with any tool in the DT.
But these are all my wet dreams, as I understand it)
Because there are rgb sliders in the mask tools, but the blur sliders there are strictly straight. You can’t make a curved curve. In any case, a separate mask preparation can sometimes be a very effective masking method than just sliders, even with advanced options.

Some modules allow per-channel masks. exposure is one of them.
At @priort said, you can drag an instance of exposure whereever you want it. You can do the following:

  • enable the exposure instance with neutral settings (exposure: 0 EV, compensate camera exposure disabled, black level correction: 0). Enable its parametric mask. Select the desired channel, and create a ramp (this will give you the contents of that channel as the mask value); use boost factor to include highlights, if needed; apply feathering if needed. For example, this is now set to mask based on the B (blue) channel (show mask is enabled):
  • add another module, and make it use the exposure instance created above as the source of its raster mask. In this silly example (really, pretty bad, but I’m too lazy to find another image), I applied color balance rgb to desaturate the image, and then used the raster mask created using the dummy exposure instance to limit desaturation to the areas where the B channel has a high value (on the left: without the mask; on the right: with the mask):

I believe what you are after is a node-based editor (but I’m not sure I got that right). Try:

Node-based image editing (Cascade)

Gimel Studio: cross-platform, non-destructive (node-based) image editor (Gimel Studio)

1 Like

I am still a little confused and likely missing something. The video example from the OP seemed like it was asking to effectively create a source image to use as a color grade for another image. At least that was the example. I think this could be achieved from a full DT edit to create the source image and then use DaVinci as it can “steal” or transfer the color grade from one image to the next. The part that confused me is the request to do something like this at the level of a module to create a mask. Since what you see from any module edit is the resulting pipeline output of all the modules it might be hard to determine what that would do to another image.so I am not sure how effective or predictable that would be. Enhancing the old color mapping module might offer something like that within DT. There is the new color matching feature added by AP but I think that is one color match per instance so a linear application of several color matched instances would be awkward at best. But maybe I have missed something

A raster mask is nothing but a parametric mask from another tool.
Thank you very much for explaining your point so thoroughly and clearly - I read your explanation in full, but this very explanation had already been told more briefly and it was clear to me what it was all about.

Let me explain my thought differently.
Let’s imagine an image that has not been processed in any way at all. In the normal world such an image has both dark and light areas.
Let us assume that the lighter the area in such an image, the less opaque it is, and the darker the area, the more transparent it is.
Are there programs where the image itself can be made a mask without any sliders?
That’s the basis of the example I wanted to convey.

Once we understand that there are such tools in programs, we can go further - change such an image for a mask. How do we change it? Any way you like. Not just by limiting the sliders - the limiters of the visible spectrum channel ranges, brightnesses, and so on.

And the answer to the main question. Why do we need it?
Let’s go back to the tools for creating parametric masks in the Darktable program, so that we could build on something and see the benefits of the above example.
What are the sliders and what do they do.
In the world of video and photo processing, there is such a thing as color coding (standardization and definition). The signal itself consists of channels. This is an abstract explanation, without going into the basics.
In Darktable, the creation of a parametric mask takes place by restricting the visibility of the channel we choose to the range we want.
Also, to make the restriction smooth on the boundaries of the restriction, there is a so-called approach - feather. This is how we get a mask of the image.
In this case, all the area that we have restricted/cutted is not visible in the mask at all. And the zone that we have selected is visible as a dense spot, as if we had filled it within its range. That would not be such a mess and there was some smoothness, this very feather acts.
Feather is like making a slide for children to ride on a sled. Not jump them on a sled from a cliff. But here’s the problem - in real life slides are not completely flat, as in some dead world. So let’s imagine that a children’s slide has all sorts of hills, turns, and even people sometimes walk on it. And this is what?! Correct - it is a curve, and this curve is not changed by us in some device, and this curve is the curve of the image. Its characteristics.
But what if we do start processing such an image? Preparing it for a future mask?
That’s right. In front of us will appear in all its glory all!!! tools that this or that program has!
This is rgb curves, and not only rgb. This is all kinds of filmic rgb. This is color calibration tool, where we can change the volume in the shadows. It’s everything and everything!
And here we no longer have some of the usual channel limiters with their blurs and all sorts of tricks that these mask tools can do, but everything! tools in general.

I asked the author of the 3dlut creator program for a link to an example where you can see how the processed image acts as a mask. He gave me a link to the above clip.
The trouble with that example is that the main topic there was not applying the image as a mask, but copying the reference characteristics from one image to another.

1 Like

I think I understand what you say:

  • you want to manipulate image data using tools
  • but instead of using the outcome of that manipulation to create the next processed version of the image, you want to use it to define a mask.

If I got that correctly, and this is what you want to do, then darktable cannot do that. That’s why I recommended the node-based editors; it is my understanding that there, one can ‘split the pipeline’, using some modules to create the image, others to alter how the modules in the imaging pipeline are applied (defining masks). I may be wrong on both accounts. I have nothing more to add.

2 Likes

Sorry you lose me in the last part… @kofa might make more sense of it than me sorry … DT is still limited by a linear pipeline…you can move the modules around but in the end what you see is the final result of this linear chain…each module serving its output as input to the next module…this is what you see, so you may change exposure and maybe that is not a good example but rather something maybe with color and you will see a change on the screen and if you move that module you will get a different end result due to the linear processing. Currently the masks can be build in a restrictive way (exclusive) or by starting from scratch and building the mask (inclusive) … they can also filter the data at both the input and output stage (output sliders are hidden by default). This is the backbone currently of DT and masking… As you describe things as best I can follow them and for sure I am likely misunderstanding or missing something because you sound like you are talking about the ability of a module to act as a layer mask of some kind and that would have to be on the final pipeline result of which each module is a part of…again I could be off base as I was not able to fully follow your explanation. I am sure others will offer up something better…

I like DT without such masks, and I didn’t choose it because it is OpenSource or anything else. I chose it not because it’s OpenSource or anything:

  1. The right set of tools.
  2. People’s approach to classic photo editing.
  3. the way of thinking of the people who use this program. I like that way of thinking. And if I like the thinking of the people who use the program, I will also like the program itself, even if I haven’t really mastered it yet.
    My experience in life tells me to look not at the product to appreciate it, but at the people who use it. The circle of people. So that’s how it is :slight_smile: Well, it’s harder to get it wrong when choosing a program.

Well, with masks I will think of something :slight_smile:
Sincerely, thank you very much for your attention to my topic, well, and all the other people who paid attention to this topic.

I wish you all a harmonious mood when working with color.

2 Likes

darktable can’t have two editable images in it’s pixelpipe - so you just can use the infos present in the image for masking or apply some drawn masks.

Since the pixel pipe is complex enough yet it’s quite unlikely there will be an editable image that can be used for masking. It’s doesn’t make sense to change the inner logic of darktable - at least that would break the promise to be able to process your old edits with new darktable versions…

Maybe that’s something for vkdt…

Yeah. There was an idea, but it didn’t work out.
Take the tool (A) to create a mask - filmic rgb, or something else.
2, Fix the image with that tool (A), which then want to make a mask.
3. In the same tool (A) we choose the tool with the parametric mask, but in the parameters of the tool we choose the output image, not the input one. rgb output.
4. Switch off the tool (A) (filmic rgb etc.) with which you have done everything.
5. We turn on the tool (B) with which we are going to directly process the image itself, and with the raster mask select the parent of the tool (A) we turned off, where we prepared the mask.

It is likely that as soon as we turn off the tool (A), the output mask starts orienting to the flow that was before the tool (A).