Darktable feature request

In gimp I can create a black and white layer mask, perhaps with the color threshold tool or with a desaturated luminance mask. And then I can edit that mask with a brush.

I can do most of that with Darktable but editing the mask is often not so easy. I can flip polarities, combine drawn and parametric masks and usually get what I want. But I think it could be easier.

If Darktable had a yellow-colored brush tool that could be feathered and/or blurred you could add to an existing parametric mask. A corresponding erase tool that could also be feathered and blurred would be the cat’s meow.

I was thinking of a similar thing. Now we have the ability to generate raster masks from modules and use them in later modules, having an independent module to paint or edit raster masks using brushes sounds like it would be useful.

Possibly best raised as a feature request on darktable’s github project (https://github.com/darktable-org/darktable/issues), though I think the general concept of ‘painting’ within darktable has been discussed before.

2 Likes

darktable masks are not rasters (pixelated images) but vectors (paths defined by their coordinates), so you can’t paint them with a brush. What you ask is not trivial to implement, we would need a painting framework too.

1 Like

But they are still rasterized internally on-demand. You still can’t save these masks for custom edits.

I think darktable 3.0 pipeline is near end-of-life. It has already been twisted quite a lot with pipe reordering and masking, for which it had not been designed.

I believe the only clean way to do that would be a nodal editor, where each module is a node with one RGB input, one RGB output, and one alpha mask input. Then, you could wire modules to alpha masks (to blur, paint, or compute masks earlier in the pipe and apply them later) and avoid duplicating masking features. That would factorize features quite a lot, and open a lot more flexibility on masking (so you could process the masks with the same algos as the pictures).

As it is, modules can only extract masks from their inputs, and we have to re-implement stuff like guided filters or gaussian blurs in modules, in masks, etc.

3 Likes

Ok. Good to know that. I can continue to finish up in Gimp.

…fwiw an example of what this technique is good for:
In bird photography the eyes are almost always too dark, if the body is properly exposed in typical forest-setting daytime lighting, particularly early and late in the day, when the lighting is at its best.

With a slightly manually edited threshold mask in Gimp I can isolate the “light” part of a bird’s eyes only (leave the dark eyeball dark, but lighten the rest of the eyeball), sharply and accurately. And then lighten the “light” part of the eyes by one or two stops. The difference is dramatic.

I can usually do that in Darktable too, by combining a parametric mask with drawn. But it (usually) doesn’t always work, in Darktable, as well as Gimp. For that particular task.

1 Like

Fair enough. I thought it seemed too easy!

Isn’t this already there? There are many options in the mask manager. I mean the mask manager is a bit complicated but you have to try several settings. You can also change the polarity of drawn masks (in the mask manager).