I have an idea, is it possible to use vectors for markers? In the calculation, pixelate it first.
Now the colorize mask is no doubt pixel based, but we don’t need a airbrush or anything like that
vector is perfectly adequate and we can change the color of the dots or strokes
Might be a bit off topic,
how about something like this :
I’m not sure why it’s so fast in csp but maybe it limits the area being calculated to minimum, within each small selections being made. I figured that Krita’s colorize mask is also very fast if you apply it on a tiny canvas. Is it impossible to optimize Colorize Mask to this direction(that it keeps the area being calculated to minimum on each steps)? Like, if you’re gonna make it realtime anyway as you presented in the video.
I apologize if I’m wrongly assuming anything. I’m not a coder after all.
In my implementation the scribble/stroke objects are generic and only have to implement a function that returns the border points and a function that can be used to query if an arbitrary point is inside the scribble. So in theory you can have any high level representation of a scribble as long as it provides those.
But I still think the current approach is the best because is more versatile. And since they are stored separately a system to select them and change their color could be implemented in principle. I leave another test video:
There you can see for example that to paint the teeth I use a simple stroke. If you have to use dots you will end up making a dot for each tooth because you can not guarantee that other colors won’t color them. And for example in the left side of the mustache you can use size modulation with pressure to adapt the stroke to that area.
That also is in my todo list. That uses bucket fill like algorithms. You make a path;the path is sampled to perform flood fill around and make a mask; then if there is a closed area inside it won’t be flood filled; then you invert the mask and use it to fill the inside area. In essence is bucket fill but applied diferently.
Since fill gaps and this feature of flood fill inside path - is something i want to see,
Should I create a separate topic about it that has nothing to do with animation.
Showing benefits and use cases. I feel that discussion would not fit here , since the goal of this thread discussion is a tool that is for animation - though an overlap for non-animated illustration exist.
interpolating scribbles sounds way harder to do and manage on the curve graph.
csp has a similar selection tool, which may be related to it
It is suitable for multiple and complex shapes
Well I meant that since the scribbles are images (not vectors with a bunch of points) you just would have to interpolate their position, which is as easy as interpolating a point. And maybe also the rotation and scale.
Like the bucket fill and the magic wand, which are 2 uses of the same thing (floodfill algorithm to create a mask) but with different outputs (one fills an area using the mask and the other creates a selection from the mask), this is the counterpart of the “enclose and fill” functionality in csp. This would perform floodfill sampling the path you draw to create an “outside” mask, then inverts it and then uses the inverted mask not to fill but to create a selection.
I think this tool uses the “reference layer” feature in Clip studio.
https://twitter.com/_oceaninspace/status/1306700485148241921
The equivalent feature in Krita is the ability to filter by “color labled” layers.
Perhaps that could be a feature to add to the colorize mask too someday?
I still think it would be cool to have a “closed gap” detection function added to the bucket tool and even the selection wand and similar color selection tool someday.
If it ever has a real time preview/colorization like this I would use the colorize mask more
I thought of this thread, which is also the filling function related to animation
Inverted Fill - Develop / Feature Requests - Krita Artists (krita-artists.org)
With latest disccusion around Flood Fill / with Fill gaps for animation in this thread
https://krita-artists.org/t/very-important-for-animation-filling-gaps/20895
And a previous existing thread from March of 2020 about Fill Gaps in Fill Tool that received only 2 replies,
The feature I wanted to request
First and foremost is Bucket Fill with Fill Gaps feature.
The other one discuss from the above thread like lasso select fill
Being able to utilize the fill gaps with the pallet drop color to canvas feature that already exist
I decided to make a separate thread to discuss its use separate of animation, how it can be used - what we currently have, why sometimes Colorize Mask doesn’t fit the workflow. I’m not quite sure if I should’ve made it separate but i feel I need to because its kinda off topic from the linked thread. The discussion in the linked thread have focus more on use in animation and I feel the possible implementation for your standard painting might get overlook.
As far as I’m aware this is a feature that already exist in software like CSP [ I don’t use CSP so I cant vouch/ Only saw adds of it in my twitter timeline] .
Why Flood fill Improvements?
I don’t utilize bucket fill as much as I should because its a tool that give me more headache because of the way I inked lines. I think the bucket fill and other similar tools like [flood fill on mask created by a lasso selection] can be a powerful addition and help speed up the process. It can be an alternate way to do things -and its probably the way most anime/manga/cartoon style illustrator are more familiar with.
Sometimes you truly just wanna fill a certain portion of your illustration, or your illustration only has a few color. It would have been great if you can just drop the color in your canvas but then you are like me and you didn’t know you have a 1px of gap in your lineart and you drop the color only to see it fill the entire screen / which is a bummer now you need to hunt that gap to close it.
This can also be tied up with another recent request regarding improvements with the drag palette color to canvas.
We have colorize mask maybe use it?
I do use colorize mask and its a lovely feature but it also has downside.
It force you visualize your color all at once, and if you piss poor old pc / its not very interactive.
When I use colorize its more of a last step / the first step to coloring and I often use it on my full illustration and not during sketching/ visualization stage.
There are times along the way when you are designing things, sketching and just wanna check if red is the color you want.
We have a choice to use colorize mask but for things like this its more trouble to set it up than ah just using fill bucket without worrying your seeming no gap lineart has a small gap somewhere.
The set up of each way we can do flat colors;
- Colorize Mask
Add colorize mask
Do dots of color
Set up transparent if any
run the colorize mask
Wait…
- Bucket Fill [with Fill Gaps]
Select your layer, or select influence all
use bucket fill tool
choose color and click canvas
repeat for all color
- Manual
use a relative opaque brush
choose color
paint
manually erase outside color or be careful not to paint outside of your line
I honestly don’t want to be forced to a single style of doing flats [colorize mask] but manually painting can also be tedious and flood fill just doesn’t work for my drawing style that somehow almost always has that secret gap somewhere.
Here is my poor attempt at illustrating the differences.
I hope its ok that I made a separate thread about it.
I agree with your points here. As I said in the other thread, the colorize mask is good for certain cases (and the newer prototype is looking good), but it’s not optimal for every situation and poses certain restrictions on the work flow.
My view on the state of matters is: We have the flood fill tool and the colorize mask in Krita. Having the close gap feature will only make the fill tool better, and won’t take away from the colorize mask. We end up with two good coloring tools instead of one, which means more freedom to the artist to pick the one that suits their work flow and artstyle best.
Right now, artists who draw with loose lines (which is a valid stylistic choice) are limited to one option.
Another benefit to adding close gap is that other tools can benefit from it, like the magic wand. From my understanding, they can share the code.
I think Krita provides one of the most cutting edge painting features, the brushes are on point its been amazing painting experience so far… definitely gonna be my main art software. I have one concern though, the bucket tool feature is really intolerant of gaps, even with slight gaps the entire composition gets filled. Most other software like Medibang, Clip Studio offer an option to fill gap; i think it might be a good idea to implement that in Krita. It would definitely shave our painting work flow time. Please consider this upgrade it would be MAX appreciated. Thanks for reading
There is colorize mask feature for this purpose - Colorize Mask — Krita Manual 5.2.0 documentation
Yeah, colorize mask is fantastic for stuff like that, though, I agree with Keemo_Bryan that it would be nice to have it in the normal fill tool, since it’s quicker!
As a practical workaround, you can put a ‘closure’ layer above your lineart where you manually draw thin lines to close the gaps and then use the fill tool on the colour layer with ‘Limit to current layer’ unticked in the tool options docker. Also do grow selection = 4 px (or whatever is needed to get the fill under the lineart closure to meet an adjacent region fill).
After that, you turn off the closure layer to reveal your original lineart. This has the advantage that you get to decide where the boundaries of the colour filled regions will be if there are large gaps in the original lineart.
This has been almost 2 years, this particular feature is not present back then and is the closet to fill gaps in fill tools.
Recent discussion has been made and presented and a similar tool to fill gaps in fill is currently being discussed and i think is in early stages of development.
It’s called enclose and fill also colorize tool is currently being optimize to do real time adjustment and some other things that can help in animation.
its a pretty old post. several discussion has been made in between this and the proposal of a new tool.
Sorry for the jumbled up chronology in the posts. I have merged 5 topics into one so that votes are not divided. In future if a user has not done due diligence of finding the duplicates before posting feature request it will be closed immediately with a link to original.
I’m sure I’m late to the topic, and am not technically a Krita dev (at least not yet), but in image processing what you’re basically asking for (if I understand you correctly) is something which will fill a shape with holes in its outline?
That’s actually not very “fundamental and basic” at all, it’s pretty advanced… but in topographic image processing, we would use an operator called close (⋅), which amounts to dilating the layer (⊕) and then eroding it (⊖) by the same threshold, to bridge any gaps. Dilation is just expanding a mask outward by so many pixels, and eroding is shrinking it by the same number of pixels; if there’s contact between both sides of the gap, you lose the gap in your penciling.
That could create a mask which would allow a fill for shapes which have holes smaller than the threshold. It would work the exact way it currently does, but only on the closed mask as input. It could also be marked over the original image (probably needless to say) so you wouldn’t lose your pencil gaps, in case they’re stylistic. I’ve unfortunately never touched Krita source code (awesome a product as it is), I’ve at most messed around with GIMP a few years ago; but dilation and erosion are pretty fundamental operations, I imagine opening and closing are already in the source somewhere, and this sounds very doable! If someone with more know-how than me wants to implement it I think it would solve a lot of problems for the casual end user.
It might even be possible to build it as some kind of macro, if the functionality is in here…
Well, I have to say that I want to implement gap closing. I also know about what you said.
The most basic form of gap closing, given a mask where white means selected pixels (pixels to be filled), is by opening the mask (erosion followed by dilation. In krita think of shrink selection followed by grow selection). If the black values where the selected ones then it would be closing, as you said.
That approach is straightforward but one issue with it is that the mask can end up with some regions chopped off that should’t be eliminated:
In the image one can see that opening does a good job dividing the region in smaller ones given a gap size, but it also removes other small features. One can argue those are gaps since they have a size less than the selected gap size, but I think that only the removed regions that join two or more big non-removed regions should be considered gaps.
So, some reconstruction should be performed on the selected big region. I thought of performing some labeling and mark the removed regions as gap or non-gap depending on the number of big selected regions they touch. But that is not particularly fast.
Another issue is that this approach is kind of global. It requires to compute first the whole region and then segment it and choose some sub-region. That can lead to taking big time to select the whole region, even if the resulting sub-region is small. That surely would confuse the user. I think csp (I’m just guessing this given the speed of its filling) does it kind of on the fly. It’s like it checks for gaps as it fills. Although I didn’t find a fast way of doing this yet. And csp’s gap closing is not perfect also, but maybe that is part of the compromise between quality/speed.