dt 3.4: How to draw a closed straight sided path .

I’m having my usual learning difficulty with this activity, when trying to create a closed straight sided path in dt. Philosophically I’ve given up on trying to enclose an area with a 1 or 2 straight sided path on a plane (the ‘straight’ requirement is the difficulty). But surely it should be easy with 3 or more sides?

Even after an intense scrutiny of the official documentation, the key question remains: ‘how/where/when does one close the path to get all sides to be straight?’. My problem is that with use of the Ctrl key at various times, selected by trial and error (the ‘and’ always applies), I can generally create an ‘n’-sided closed path but only ‘n-2’ of the sides are straight. The first and last side are always Bezier-looking curves. I can correct that by clicking twice on the control point at the start of the path, with the Ctrl key pressed - but this shouldn’t be necessary, should it? I say this because, once in the last 30 or so attempts, I have created a multi-straight-sided figure directly - but I have no idea what I did ‘wrong’ to achieve this.

In addition I often find that one or more sides of the closed figure have short straight extensions ‘outside’ the path, as if the path drawing algorithm has overshot the apex and back-tracked on itself. What is causing this?

The path I create, whether straight-sided or not, ends up with a short-dashed line adjacent to every edge of the closed path. At first I thought this was an illustration of feathering with a radius of zero, but the short-dashed line remains adhering to the solid line no matter how much I try to increasing the feathering. Not only that, but the dashed line disappears as soon as I draw a second path - so it must be an ‘active-selection’ indicator - yes? If so, how does one apply a feather to the edge of a straight-sided path ?

What is it that you’re trying to achieve? Darktable has pretty good feathering, so it’s usually enough to roughly select the shape, and turn on feathering, increasing the opacity a bit; it detects and follows edges nicely.
See https://www.darktable.org/2018/12/darktable-26/ under Edge-aware bluring for blend masks.


I’m not entirely sure what it is you are after, but I do think it is something like I show here:

My approach to do this is as follows:

After selecting drawn mask and add path

  • hold down ctrl,
  • mouse-click on first point, keep ctrl pressed,
  • repeat for next points
  • click right mouse button



Ah, so! I had persuaded myself that a pixel-precise path round a rectilinear object (door, window, wall in perspective, etc) was required to produce an accurate mask. I certainly never tried ‘roughly selecting the shape’ or adjusting the opacity. Does dt really follow edges that closely? I must try it.

But could I also ask, as a purely ‘academic’ topic, how to achieve a closed straight-edged path simply ?

Yes, that’s the 4 steps which I had learned from the documentation, but because of some ham-fisted-ness (a newly created word, I believe) I always seem to end up with the first and last line segments curved.

Ill try it again.

(25 seconds later)


Having got that fixed, any comment on the feathering question ?

1 Like

My reply?
darktable in general?
The video?
Your ham-fisted-ness?


The dashed line does show the feathering boundary and it is only shown for the active mask.

I noticed way back that if it is set to 0 it might take a long time scrolling to get it to show up. To give you an idea, the following has a feather of, what I presume to be, 0. Very shortly after the video starts I start scrolling the mouse-wheel like crazy towards me while holding down shift:

This happens when you scroll away from you for too long (for whatever reason, a mistake easily made in my opinion) and it needs to go all the way back to a point that is actually visible. Rather annoying, but it is the way it is (a reset opportunity to a reasonable feather distance would be nice to have).

1 Like

The dashed line shows the outer limit of the featering (opacity = 0), the “feathering” slider makes the mask follow edges in the image (more or less). You can modfy the dashed line with shift-scroll, or by dragging the visible control points.
There’s also a third control: when you click on a control point on the main path, a line perpendicular to the path appears with a small handle at the end, that handle controls the “curviness” at the selected control point.

I found the best way to keep an eye on what happens is to show the mask by clicking on the icon to the right of the eye (bottom right of the module), and play a bit with the controls.

1 Like

@LateJunction Contrast can also sharpen up the mask so I would play with all of them with the yellow overlay enabled. The feathering slider does a nice job. There is a nice explanation in the 2.6 blog on the DT website of the feathering…it may have made it to the manual I have not checked. One other thing to try depending on the area you are affecting is a parametric mask. Usually you can with a combination of channels get that quite nicely selected and then if you roughly enclose the area with a drawn mask you can exclude any other areas of the image that are unintentionally selected…This is an older video but Robert Hutton did some nice ones and while its a phone booth it might serve to show you how you might approach your door. https://www.youtube.com/watch?v=xWF6Wk-JPb0&feature=emb_logo One other thing from the image provided by @Jade_NL often it can be easier to mask the surrounding and then invert the mask …so just for an example the area around his doors is fairly light and uniform so you might be able to nicely select all of that and then invert to give you the doors. Finally you could further isolate one door from the other by roughly enclosing the door with a drawn mask. One last thing you can sometimes actually with the feathering get a brush mask to work as well. They are not realtime displayed if you like but you can sometimes get a good result with experimentation.

Hmm, a valuable amount of good suggestions for me to work on over the coming days.

Thanks to everybody for all the thought and effort you are doing for my benefit.