Dear darktablers,
Whenever I draw a mask using a path, I generally draw the mask inside the subject, and then use path and mask feathering to extend the mask outwards to achieve a smooth transition.
Now, thanks to @anry’s work we have a great tool to streamline path drawing. However, AI masks sit at the boundary of the object. In order to use feathering effectively, the masks need to be shrunk a bit so that they sit inside the subject area. Unfortunately, the current resizing algorithm for paths resizes them towards the centroid of the shape, which for non trivial masks causes the mask to lose alignment with the features of the subject.
In a couple of discussions, including this one it has been suggested that mask resizing should rather work by inwards offsetting (i.e., insetting), i.e., like feathering works, only the other direction.
After spending some time iterating on the algorithm, I have a prototype that does exactly that and that is quite stable, and I would appreciate some feedback on how to best move forward before preparing a PR (for 5.8, as 5.6 is already in feature freeze).
See below for a comparison between resizing in master (left) vs. the experimental branch (right).
The current implementation replaces the resize behavior, however since darktable is all about flexibility I think that it would be better to offer both behaviours, and let users decide on a case-by-case basis.
So, my questions for the community are:
-
Is there a general agreement (at least among AI mask users) that this is a desirable thing to have?
-
Does it make sense to keep both resizing methods?
-
If the answer to (2) is yes, how should one choose which algorithm to use?
- With an option in preferences - applies to all paths drawn
- With a control on the bottom panel - to easily toggle on/off while editing
- With a modifier combination while resizing the mask (applies on a per-resize operation basis)
- Something else?
Thanks in advance for your feedback and comments.
@Pascal_Obry @hannoschwalm any thoughts?