darktable article lede image
masks
Aldric Renaudin

masks

In darktable, selective editing was a long awaited feature. Our development version now allow limiting module effects to a region of the image.

Remember the old times, the red light of the darkroom, the smell of the developing bath …

Remember when you were using your hands or a small piece of cardboard to achieve some masking …

Now you can do that in darktable.

example

let take this photo as an example.

example_ini

Here, we will get rid of the fluorescent orange wall. We will use the color zone module to desaturate reds, but doing so would also desaturate the lighthouse railings. We will use masks to avoid that.

example_desaturate

we now add a masks to limit the effect of the module to the wall only. Using the masks combobox from the module, we add a curve shape:

example_curve

And here is our final image:

example_end

masking interfaces

The masks combobox inside modules let you add new shapes, reuse existing shapes. But if you want to perform more complex tasks, you will have to use the masks manager which is in the left panel:

manager

Right-clicking on a shapes will open a popup menu with all the possible actions.

editing shapes

Two shapes types have been implemented: the simple circle (with feathering borders) and the more powerful curve shape. Here’s some tips to help you in shape creation:

circle & curve:

  • you can change the radius of the circle by using the mousewheel within the circle.
  • you can set the border size by using the mousewheel between the circle and the border

curve:

  • you can add control points by shift+clicking on an existing curve
  • you can remove corners by right-clicking on them
  • clicking on an existing control point will select it, allowing you to move it and making control-hooks appear that allow you to change the sharpness of the point
  • right-clicking on a control hook will reset it.
  • when creating a shape, you can press ctrl while adding control-points to add a sharp corner directly
  • you can use the scrollwheel to change the border width of the whole shape
  • the border width can also be set separately at each control point using the available anchors.

Advanced tips

  • combining masks and blendif offers a whole new world of possibilities
  • when a shape is assigned to a module, a group of shapes is automatically created. You can use that group to build complex combinations of shapes
  • shapes can be moved and combined within a group using boolean operators: union, intersection, difference and exclusion
  • opacity can be set per-shape using ctrl+wheel

Cloning

The spot removal module is not limited to circles anymore. It can use any shape for advanced cloning.

Warning

masks are only available in the development branch of darktable. We wanted to share with you the awesome features that are coming but installing the development version of darktable isn’t a trivial thing. Do not use this on production work.

Masks still have some known limitations

  • there is no brush painting. masks are currently limited to curves
  • very complex, self-intersecting curves might not render correctly

Note: again, great thanks to Jeremy Rosen for his help in the writing of this blog post

Filed under: Blog Development Upcoming Feature
These are comments from the old website, archived as static HTML
  1. Can believe this day has finally came! Now just got to wait for a few more ¿weeks? ¿months?

    Anyway, AMAZING work. Darktable has become the best opensource RAW editor and one of the best OSS in their category, like Firefox in web browsers, VLC in video players, XBMC in mediacenters, etc.

    Congratulations and THANK YOU for your work and effort. Is so beautiful that a creative tool this great is free and available to everyone.
  2. Good Job Aldric.
    Many thanks for that much wanted feature !
  3. Oooo, it's the best news! In what version of darktable will be masks?
  4. I just gave this a try... I am flabbergasted. Great work!
  5. Wouldn't it be better to create something like "Conditional mask" instead of having similar functionality it in two separate places?
  6. So exciting! I can't wait for this to reach the stable version
  7. Aldric Renaudin on Fri Apr 19 14:55:25 2013:
    in the next one ;)
    it should be 1.4 (1.3 is the devel one)
  8. The feature I most waited.

    Thanks for this. ;)
  9. Oooh la la I can't wait this!!!
  10. Selective masks + conditional blend will be a killer combo!!
  11. Oh ! Waiting for this for long time ...
    Darktable is now a great alternative to commercial purpose like LR, so I could back from osx to my ubuntu ...
  12. This IS a great feature!

    I wonder, though, how many will abide the warning, considering this is a feature that so many have waited on ;-)
  13. Wow. I've been a very, very impressed darktable user for only a few weeks. Having shot b/w film as a teenager without the guts to go all the way and do my own prints, I was constantly frustrated by what came out of the supermarket lab, so I gave away my beloved Nikon F301. Now that I shoot digital, darktable has finally given me my own lab :)
    This new mask feature is almost too much awesomeness. I wonder: with this feature in place, will full retouching and clone brushes become possible? Seems like they'd use a similar infrastructure to reconcile selective operations with non-destructive history-based editing. In any case, I'll jump to current svn right after I've cleared my current work queue. Thanks heaps for creating and sharing darktable!
  14. Wow, this is the single most important thing thats missing right now. Looking forward to it!
  15. Wicked addition! Will there be the option to include masks within Styles, I know strictly speaking it perhaps doesn't make sense but can do when processing a sequence of video frames with static content, locked off camera. One day maybe even keyframed tools for working on the increasing number of raw video shooting cameras likely to start appearing like the Blackmagics.
  16. Nothing is moving on AfterShotPro, and adding masks to Darktable is a tipping point. Learning a new RAW editor is a lot of effort, so I've only done a little with Darktable. I have the development PPA up and running. The "mask" is available, but I'm not sure how to use it. I can create a mask, but nothing that I change (e.g., exposure) seems to apply to the mask.

    Could you give a little more detail on using a mask, for those of us getting comfortable with Darktable ?

    Thanks !
  17. Jack, you can't use masks for exposition, but you can use them for levels and Lab curve. If I understood correctly — masks can be used with the modules with which we can use blending modes.

    I tried it. I used two masks to remove the high-voltage
    column and two masks for the levels in the eyes. Unfortunately, near the small masks with little blurring (eyes) when exporting artefacts. You can view the full-size source here: https://storage5.static.itmages.ru/i/13/0422/h_1366632896_3854079_d41d8cd98f.jpg and full-size result here: http://storage1.static.itmages.ru/i/13/0422/h_1366632810_7606849_d41d8cd98f.jpg. You will see a bright strip on the nose, yellow pixel at the left -top side of the left eye and the colored pixels around the right eye :-(
  18. Thanks BigDogs. I'm really only looking for a RAW editor with masks/layers. I'm looking to set the total image exposure in a wide gamut that can then be converted into a jpg/tiff print. Masks are mandatory to set up the entire image. As for touch-up (like removing power poles), I think that can be done in GIMP for the jpg/tiff print.

    I'm going to play with some RAW images in AfterShot Pro, and then in Darktable. If the results are equal (or, better, of course), then I'm going to be a Darktable fanboy.
  19. psychokiller on Mon Apr 22 21:48:47 2013:
    Great feature! It complements Darktable in a very professional way. Go ahead and make it into the stable version. Thanx for the effort you all developers put in Darktable.
  20. That's awesome! Thank you for the great job.
  21. This is a great feature and mark the beginning of Darkroom as a professional tool.

    The mask feature work already really well. The problem is that when I select a object it would be great if it could "snap" to contrasted part objects so it could be easy to select a mountainrange, leafes, faces, eyes and so on. I also hope it would be possible to mask straight lines, paint layer masks and paint mask lines. But so far it's a good beginning with this tool.
  22. Awesome O_o
  23. Emmanuel Lacour on Fri Apr 26 08:22:52 2013:
    Dear DT developpers, thank you so much!(what else ... ;)
  24. This is really a major feature! Been waiting for this for some time now :-) Thank you very much and keep up the good work!
  25. Unfortunately, with so many artifacts, masks unusable. Hopefully in the stable release such will not be.
    http://s020.radikal.ru/i712/1304/52/69aa59e6f6b5.jpg
  26. We would really like to care about this issue. Could you please open an ticket in www.darktable.org/redmine? Please add a link where we can download your raw file and also attach the XMP file leading to the issue.
  27. i am total noob for Photography ...working on my e com site..because of budget contraints...This is really going to help clear some artifcts on the images..
    Thank you very much ...Team darktable...
  28. Thanks! It's totally fixed in current unstable version.I'm happy!
  29. This is amazing. DT is now ready for professional use.
  30. I'm glad to know Darktable will support "mask" feature,
    many thanks for the developer's effort, I will wait for it.
  31. Very, very impressed with DT, and this mask feature has won me back to it. I have bounced back and forth between Photivo, Rawtherapee, and DT for the past year, but always recognized DT was by-far the most ambitious overall, having unique features (like blending available in every module) that eventually would make it indispensible. But RT kept getting me back for technically trivial yet practically essential reasons that made workflow faster. For a start, being older, it is simply more clearly organized. For another, the large number of very useable presets accessible through a simple scroll box also helped me learn how to use it. And one last technically trivial and yet surprisingly critical difference: to adjust sliders with the scroll wheel in RT, i need to hold the Shift key. THIS IS GOOD. Why? Because (particularly in Ubuntu, where the blasted window scroll handles disappear unpredictably), i found that in both DT and Photivo, trying to move through modules using the scroll wheel was constantly inadvertently adjusting sliders, and i was wasting time and focus simply trying to "navigate safely." Yes, idiotically small gripe, and yet when i needed to work fast, it really did make it a no-brainer to "just use RT." Well, i hit a limit with RT yesterday that made me re-open DT, and to my surprise, it was not only better organized now (including the "leave only one module expanded" option - should be default!), but this masks ability is ridiciulously powerful. Well done. Now i'm going to gripe more about navigation/organization nusances, but that's only because DT has definitely taken the lead :-) Keep up the great work, folks.
  32. Well done guys. Selective editing is certainly something Darktable needs. Very excited to see this come out in the stable packages! Keep up the amazing work!
  33. This is truly great guys, thank you.

    I did manage to lose the drawn mask a few times until I got used to it, perhaps I right clicked twice in error?
  34. How is date for release stable version with this feature? When we can use it in darktable?
  35. Hi,
    was wondering if its possible to create a mask from a channel ?
    hope you can
    as this would be usefully for contrast and sharping etc in my work flow
    sorry if I missed that
    many thanks
  36. Have you tried conditional blending? Seems to be exactly what you are looking for...
    Have a look: http://www.darktable.org/2012/03/upcoming-features-conditional-blending/ and http://www.darktable.org/2012/07/some-enhancements-to-conditional-blending/