Feature request for a freehand brush selection tool

The two workflows as A and B.

A) Active ‘paint selection tool’, do paintings as normal, then switch to other tools (like move, transform or brush), paintings change to selection automatically.

This is like @LunarKreatures said, quick, won’t interrupt paintings, basic function.

B) An action to start ‘paint selection mode’, in this mode, switching to other tools is OK, you paint, transform, paste image, use filter etc, only when you quit the mode, to get the selection.

This is like @hulmanen said, more function, could use a visible mask/layer to contain changes, then to selection.

These two workflows are NOT in conflict.
We can have a paint selection tool, use a invisible layer, acted as A), and a action to toggle a visible layer, do more things on that layer then change to selection, as like B).

In original post, I start from ‘global selection mask’, because it already played the role of ‘paint selection’, just that it’s not very convenient to use. But selection mask does have all things we need to implement this tool/action in krita.

And thanks @TheTwo @raghukamath , I said it’s not good to change ‘mask’ means, maybe the solution is to add a new ‘selection layer’, or change the ‘selection mask’ with additional functions as ‘mask/select layer’ (suitable name).

2 Likes

@hayu So the difference in terms of workflow is that in “A” you have one keystroke less to get back to regular painting? Or is the idea also that for the paint selection tool, the selection is only displayed as matching ants, even when editing it?

I would say it’s more than one keystroke less. It’s more propose and workflow that also changes. Having it as a tool makes it quick, again i will say no matter what changes are made to the global selection mask it’s not as quick as changing to a tool. To me the mask is more for complex selections, while a tool would be for quicker edits that you kinda want to either use a texture brush to select or just want more precision than the freehand selection gives.

If we think of the tool working exactly like the other selection tools, so no alpha tied to the transparency, a much simpler and limited workflow , you have access to the selection actions, so it’s much easier to do boolean operations, than actually painting on the mask. Cause i just think that sometimes being able to select areas with a texture could be nice without having to deal with the global selection mask, i don’t think this would be a complete redundant tool either just another way to do a similar thing with maybe some limitations in exchange of speed.

Truth be told i don’t use the global selection mask at all i dislike the workflow of working with it as it feels like it takes me out of my common mindset of working, and most of the times feel like a cannon to kill a mosquito. Having a similar workflow that could be used to select shapes based on brushes without having to deal with setting that up would feel like it’s the perfect middle term. I can understand that it is a integral part in your workflow but i don’t see as both options being the same thing, you can do that with the selection mask but, still i think a selection brush tool is a similar and simpler way to achieve a similar result.

@LunarKreatures I’m not trying to pooh-pooh your points at all, I just haven’t grasped what it is you’re proposing. What would the user see when using this tool? I’ve been imagining it’s some kind of color overlay, which is why I’ve been confused about the difference. But is it the idea that you just see the usual marching ants selection outline when using a paint selection tool?

I searched if some other software has this type of selection tool and found it unsurprisingly that CSP has it. I tried to record a video of this tool here. Please excuse my clumsiness in switching to brush and selection pen tool, I am not at all used to CSP. But you can see how it paints green stroke and then immediately makes a selection when I release the pen.

So with this tool the selection workflow is like this

  • You select the tool or activate it with a shortcut
  • paint your selection, it will show you a stroke momentarily as you paint
  • And immediately when you release the pen you will have a selection
  • switch to brush and paint.

P.S if any one wants a better quality of the video they can watch it here → Nextcloud

3 Likes

Thanks, @raghukamath ! Finally I agree that it is a different tool indeed!

If you see the video that @hayu posted in their plugin post, it also does similar thing, and they said that this can be a separate tool. Below is the video notice how the green strokes turn to selections

One improvement in this video over the CSP tool is that this one also has opacity of the brush taken into account

But csp does not support semi-transparent parameters.
In my opinion, black means non-selection. Translucent means incomplete selection. So mix it with black. This is the plan I put forward before.
As for Boolean logic, csp also uses it to create “selection brushes” and “selection erasers”

Yes I edited my last post mentioning that opacity is disregarded by CSP’s tool. which can be improvement in our case if we consider the opacity.

I don’t think the semi transparency is needed for this tool as @hulmanen noted it might have issues with some brush engines especially how it would behave with the rgba brushes. imo it can continue to work like the normal selection tools that would already be an improvement in the tool set.

i also had stated in one of my first posts that it was a tool found in other softwares but seems like the information was missed.

2 Likes

The global selection mask etc are about how to implement the function in krita (we can use that code), but the tool and action should work the way just as you described, that’s the relation.

Have you tried the demo plugin here? That’s what we can do use current krita functions.

In a better implementation (requested here), if this is a tool, you can do:

brush → paint → press and hold → paint selection → release to get selection

or

brush → paint → press then release → paint selection → press other tools, like brush, transform to get selection

And as an action:

brush → paint → press → add a selection layer, do any paint, transform, filter on the layer → press again → change layer to selection

These are not in conflicted, they could be implemented at once, and you only use which one you need.

Do you mind if I edit this post title to “Feature request for a freehand brush selection tool” ?

2 Likes

Use grey scale, IMO, is a historical and technical choice.
For example, in computer graphics/vision, generate a mask image and put it on input image to extract area we need (and many other operations), it’s convenient and simple to use a one depth color space, there comes the greyscale color.
So the point is one depth, not white/black, and we have alpha value in RGBa, using alpha/opacity is intuitive and better when you do paintings, also when paint a selection.
We can add options to automatically change color and brush preset, so that you get a hard edge, full opacity selection as default, and it’s easy to have a semi-transparent select if you decrease brush opacity.

That’s OK, I have read what you said, and am still thinking how to edit the thread.

I am thinking of textured brushes. They only differ in grayscale.
Grayscale and transparency can also be considered at the same time, just like adding a brush tip.

Maybe this is wrong, but as I understand, when use brush to paint, whether to use opacity or a brush tip with semi-transparent effect, all get the same final pixel alpha value of the same transparency, right?
So just use the alpha, you already have brush tip’s semi-transparent.

1 Like

No. It needs to be weighted with alpha when converting it to grayscale. For example, if a 50% gray color is 50% alpha, the final effect is a 25% selection.

I think that would be too unpredictive and confusing for user. User would then have to guess how much selection is going to happen. Only brush alpha is good way to go I think

1 Like

Wait… I was thinking about texture, but texture doesn’t seem to change color. I didn’t remove the white background, which led to this result.

The option to change color, whether HSL adjustment or RGBA option, is not practical. So I agree with you

I haven’t tested the plugin yet as i have not found time to do so. so my knowledge is coming from the videos showing it work and my own personal views on how the tool should work. But will test it when it’s possible

I confused on your explanation what you mean by press and release, press and release what exactly? What is the function of it? Not really understanding the workflows you described.

Personally i don’t think selection alpha is much needed for this sort of selection, having it being able to use the brush texture should be enough for most users. But i also understand from what was discussed here that if one uses 100% brush opacity the behavior should be the same as the other selection tools which works for me. Though i still have some small concerns at if users will understand this opacity function and how it would behave with some brushes like rgba.