Feature Request: Split Layer to Local Selection Masks

When I’m painting in a more painterly way starting from a clean pencil sketch, I prefer to work with selection masks instead of different layers for the different coloured areas since this way I can blend more easily.

Still, my workflow is pretty much identical to the common way of colouring line-art. I can either:

  1. Wand select an area from the sketch, create a local selection mask, bucket fill with a flat colour as a starting point. Tedious because the wand selections often aren’t very good and need to be corrected manually.
  2. Use the Colorize Mask for smarter detection of edges, then use the wand selection (or similar color selection) on the flats to create local selection masks. This gives better selections, but is still tedious to do over and over again for a complex subject.

Whereas if I wanted separate layers, I could use “Layer -> Split -> Split Layer” after the colorize mask and be done with it. So for me it would be incredibly helpful if “Split Layer” had an option to split into local selection masks directly instead of different layers.

Coding-wise, I think it shouldn’t be hard to do since local selection masks are light weight layers anyway. Maybe a nice first feature for a new coder?

What do people think?

5 Likes

This seems like an interesting idea.

Funny, I ended up with similar workflow and wondered how to make it less tedious.

I ended up using G’MIC to colorize the line art with random colors and keep it as locked layer with zero opacity (can’t wand select on invisible layer…) to do my selections, but it’s a lot of layer switching…

I haven’t even thought about keeping them as selection masks, but I’m not sure if I’d find lots of selection masks less tedious.

This feature is now available in the Krita Next / nightly builds and will be included in the upcoming 4.2.9 version, thanks to new contributor confifu. :sunglasses:

3 Likes

It’s thanks to @confifu :slight_smile:

3 Likes

I’ve just tried this and it’s a nice new facility.

I’ve noticed that it’s important to tick the ‘Disregard Opacity’ box or you can get a massive number (depending on the selected palette) of mostly black selection masks with tiny white dots in them because of tiny regions of different colour/opacity at the edges of a colour filled region that are maybe due to anti-aliasing.
I found this especially when using manual brush colouring, even with the Basic-1 brush. It also happens with regions that have been flood filled using a lineart layer to define the regions.

If you remember to tick that box then it gives really good and useful results.

Should we have it on by default then?

Looking at it more closely:
The number of resulting selection layers does not depend on the selected palette. That is only used for naming the layers according to the palette colour names. It depends on the number of different colours, including any opacity variation. (I made an incorrect assumption about the purpose and effects of selecting different palettes.)

The Fuzziness slider control is set to zero by default and if this is increased to 1 or more, when Disregard Opacity is unticked, then there is no problem with a large number of mostly black layers for the colour filling methods I described in my comment, .

How Fuzziness would behave for areas of definite and deliberate opacity variation is another question but that use case would be quite different from the original development request.

I think Disregard Opacity should be on by default because ‘simple’ colour separation is the main use case and the reason it was developed. It’s also an obvious control while Fuzziness is more subtle. Also, anyone who’s been deliberately manipulating opacity would be sure to notice a box called Disregard Opacity.

1 Like

Just note that this behaviour has nothing to do with the newly implemented part — it’s the same for the old split into layers. Any enhancements there should be their own feature requests.

I’m not sufficiently concerned about this to make any additional/separate formal feature request. I was just making my observations after the first time I tried to use this process and giving my personal opinion.
Now that I’ve figured out the details of how it works, I’ll remember to turn on Disregard Opacity.
It’s a very interesting and useful technique so thank you for explaining this and raising the feature request in the first place.

1 Like