Drawn & parametric mask case

I’ve a case, which seems common to me, but I’ve not found the solution to build the mask properly. Hoping that someone can help. :slight_smile:
With parametric mask it is usually easy to split the image on the horizon, like below.

I would like to add a drawn mask to include the clouds in the selection and remove the foam on the waves.
I think that’s not possible. Am I right ?

Absolutely simple with the ‘drawn and parametric’ mask option. Just add a drawn mask over the area that you do not want to change and set the polarity to exclude rather than include.


Maybe this quick and simple example will help?

Sounds great … :slight_smile:

Here I can remove the foam.

A bit more triky, but I can add the clouds:

How to do both at the same time ?

Yes, that’s the exclude side. But that’s only half the work …

I’m not sure actually - it’s certainly possible to create a second instance of the module you’re using and apply a different mask to that one as well (I think they stack). I’m still fiddling with it to see.

You can include/exclude each area as needed … it should not need a second instance.

Would you have an example ?

I usually work like this:

  1. Use parametric mask to narrow my selection, but leave enough to still include the whole sky. It will also include some land as well

  2. Use a drawn mask to draw over the sky & set the Combine Masks to Exclusive

Both modes have the capability to be set either positive/negative. The combine-masks options also allows further options. The best way to manage the problem is to turn ON the yellow mask and then you cam actually see the results.
The manual does make a good job of describing how this all works … have you read it?

Yes, I did.
The reason I believe it is not possible is the following. As far as I understand, to remove a part we need to use “exclude”; to add a part we need to use “include”. But we have only one drawn mask (despite it can contain as many shapes we want, we can combined with very flexible modes).
Having different masks (at least 2) we could combine one with “include” and one with “exclude”.

If you feel unable to do both operations in a single instance … simply use a second instance

It looks like you’re only using the L channel in the parametric mask, you can use all of them, particularly h which is hue, to help isolate the sky. You can use them in combination as well.

Also if you want to post the raw, I’m sure this would move a lot faster :wink:

I think it might be possible, but it’s non-intuitive on how to get what you’re asking. The key (thank you @anon41087856 for pointing it out) is the mask manager:


You can do boolean ops on the mask objects here, but I haven’t quite figured out how to get something like what you’re asking just yet.

Parametric + drawn (include) + drawn (exclude)

Here you are :
20181105_Agde_069.NEF (26.5 MB)

Yes that would be great ! :slight_smile:
But here “drawn” = “mask” and not “shape”. Shapes can be combined in various different ways, to create one unique mask.

Not sure it works neither…

Looking at the image I am surprised that you would want to apply the same adjustments to the sea foam as you would apply to the sky/cloud space. They are quite different in tonal color and would need quite different adjustments.
This (of course) does not answer your question but in my books it would make the entire point moot.

20181105_Agde_069.NEF.xmp (12.0 KB)

You’ll have to excuse the sloppy brush work! My wacom is not hooked up to this machine.

I did this:

  1. Get some contrast into the image! Filmic seems to work well, so does exposure fusion from the Base Curve. I used the latter.

  2. Make your parametic mask selection to include the whole sky.

  3. Brush the parts you don’t want, e.g. the light house and ocean. Then toggle the polarity of your drawn mask.

Obviously you’ll need to fine tune the drawn masks, but it’s a start.

Thanks for trying. That’s the kind of final selection I wanted, but with the accuracy of the parametric mask. :slight_smile:
The question was not how to draw a mask, the question was (and still is) how to add AND remove some drawn parts on a parametric selection at the same time.

This is impossible because the implementation works like this:

  1. All drawn masks are combined together according to their mode in mask manager (exclude, union, etc.)
  2. All parametric masks are combined together according to the mode selected for “combine masks”
  3. The output masks of steps 1 and 2 are combined together according to the mode selected for “combine masks”

Therefore, parametric masks cannot be behaved like drawn masks in combinations. There is already a feature request to add parametric masks to the mask manager that removes limitations like this: https://redmine.darktable.org/issues/11015

1 Like

Thanks to confirm.

That would be really powerfull !