Difference between revisions of "A better Bucket Fill tool fill"

From Inkscape Wiki
Jump to navigation Jump to search
m (→‎Complaints and requests over the years for a better bucket tool:: add another bug report link (RFE for geometric mode))
 
(7 intermediate revisions by one other user not shown)
Line 15: Line 15:
Even if you "grow" your fills, that does not cure the problem.
Even if you "grow" your fills, that does not cure the problem.


- Increasing the threshold leads to bigger probability of the bucket tool freezing for a bit and not creating a fill at all.
- Extreme threshold leads to bigger probability of the bucket tool freezing for a bit and not creating a fill at all.


- The "Close gaps" feature is not very intelligent. It closes the gap in one area,while often leaving undesirable empty spaces in other areas.
- The "Close gaps" feature is not very intelligent. It closes the gap in one area,while often leaving undesirable empty spaces in other areas. The gap is not being closed at the end of the two lines - which again leaves laborious clean up work for the artist.


- The actual resulting fill is not very precise, the fill nodes are not placed well, are too dense and/or are not corners when needed.   
- The actual resulting fill is not very precise, the fill nodes are not placed well, are too dense and/or are not corners when needed.   
Line 25: Line 25:
It is a pain to then manually fill them. Zoom in and out to get them. Try filling spiky hair. Just try it.
It is a pain to then manually fill them. Zoom in and out to get them. Try filling spiky hair. Just try it.
'''
'''
== '''Complaints and requests over the years for a better bucket tool:''' ==
== '''Complaints and requests over the years for a better bucket tool:''' ==
It has been requested numerous times to improve the bucket fill tool in inkscape.
It has been requested numerous times to improve the bucket fill tool in inkscape.
Line 34: Line 35:
https://bugs.launchpad.net/inkscape/+bug/182930
https://bugs.launchpad.net/inkscape/+bug/182930


https://bugs.launchpad.net/inkscape/+bug/170588 (geometric mode)


== '''Possible ways to approach this''' ==
== '''Possible ways to approach this''' ==
Line 41: Line 43:
You can already emulate this sort of bucket fill tool by doing the following workaround:
You can already emulate this sort of bucket fill tool by doing the following workaround:


[http://youtube.com/XeFgXKzCOlQ?t=3m34s @YouTube]
[https://www.youtube.com/watch?v=XeFgXKzCOlQ&t=3m34s @YouTube]


Having said that I believe that this approach is very hackish and inconvenient. It would be much better if inkscape had a proper tool to do this instead!
Having said that I believe that this approach is very hackish and inconvenient. It would be much better if inkscape had a proper tool to do this instead!
Line 63: Line 65:


1. Gmic colorize - Gimp and Krita recently got a way better fill algorithm:
1. Gmic colorize - Gimp and Krita recently got a way better fill algorithm:
here is a link with more information of how it works-
https://github.com/mypaint/mypaint/issues/150
https://github.com/mypaint/mypaint/issues/150


Line 78: Line 81:
[[File:CloseGapsExample3.png|400px|thumb|center]]
[[File:CloseGapsExample3.png|400px|thumb|center]]


If two lines do not overlap and there is a gap between them: Close gap
If two lines do not overlap and there is a gap between them: Close gap at the end of both lines.


If two lines overlap: Do not auto close gap.  
If two lines overlap: Do not auto close gap.  


Here is an example of its use in paintstorm studio:
Here is an example of its use in paintstorm studio:
<cant post because of spam filter>
[https://www.youtube.com/watch?v=oXUReniLyqw&t=2m4s @YouTube]
 
Proposal by Todor Imreorov <blurymind@gmail.com>

Latest revision as of 16:28, 26 April 2015

Problem:

The current bucket fill tool is creating fills based on bitmap pixels of the screen, rather than the vector lines data. It is dependent on the zoom level of the viewport. This is not necessarily the problem. The actual fill algorithm is creating less than desireable results that leave a lot of laborious clean up work for the artist.

Compared to some developments for this tool in other open source and proprietary software, the fill algorithm is outdated.

- Some times does not fill the area at all and just freezes for a while.

- It leaves empty corner areas all over the place, which the artist has to then manually fix

BucketToolCornerAreas.png

- It leaves empty areas at tight places, where it is somewhat hard to clean them up:

BucketFillCornerAreasExample.jpg

Even if you "grow" your fills, that does not cure the problem.

- Extreme threshold leads to bigger probability of the bucket tool freezing for a bit and not creating a fill at all.

- The "Close gaps" feature is not very intelligent. It closes the gap in one area,while often leaving undesirable empty spaces in other areas. The gap is not being closed at the end of the two lines - which again leaves laborious clean up work for the artist.

- The actual resulting fill is not very precise, the fill nodes are not placed well, are too dense and/or are not corners when needed.

Whatever you do with it, it always leaves small pixel areas unfilled! The shame in it is that it can not properly fill cleanly inked (with the calligraphy tool) lineart it leaves gaps everywhere. It is a pain to then manually fill them. Zoom in and out to get them. Try filling spiky hair. Just try it.

Complaints and requests over the years for a better bucket tool:

It has been requested numerous times to improve the bucket fill tool in inkscape. If you look at the mailing list, the forum and Launchpad - you will find many users asking for an alternative bucket fill tool that works in a different way to the current one:

https://bugs.launchpad.net/inkscape/+bug/656498

https://bugs.launchpad.net/inkscape/+bug/182930

https://bugs.launchpad.net/inkscape/+bug/170588 (geometric mode)

Possible ways to approach this

Vector bucket fill mode - instead of filling areas based on visible pixels, fill it based on surrounding vector shapes.

You can already emulate this sort of bucket fill tool by doing the following workaround:

@YouTube

Having said that I believe that this approach is very hackish and inconvenient. It would be much better if inkscape had a proper tool to do this instead!

Pros:

- The fills are very precise, their nodes fit the surrounding shapes well. Corner nodes are present where needed. Density is good.

- Doesn't leave empty areas like the bucket fill tool at all. The result is much better!

Cons:

- The fills only get created if the area is completely closed. (needs to be implemented an "auto close gap")

- The fills follow the interior shape too precisely. This sometimes leaves small spaces between line and fill when rendered. The artists often needs to "Grow" the line a little bit. Ideally the fill border should be precisely under the middle of the ink lines. (needs to be implemented "grow/shrink" feature)


Better bitmap fill algorithm - The current fill algorithm suffers from the downsides of the old bucket tool. There have been big developments over the years and the bucket fill workflow has improved immensely.

1. Gmic colorize - Gimp and Krita recently got a way better fill algorithm: here is a link with more information of how it works- https://github.com/mypaint/mypaint/issues/150

Here is explanation of why it is better: http://www.davidrevoy.com/article240/gmic-line-art-colorization


2. More intelligent Auto-close gaps: https://github.com/callaa/Drawpile/issues/189 Close gap is a feature that is present in a few manga art related painting applications. It is a planned feature for Krita.

What it does: It tells the bucket tool to automatically close gaps with an invisible straight line, before doing the fill operation. That stop paint from spilling outside of an area, without affecting the classic "Tolerance" value

CloseGapsExample3.png

If two lines do not overlap and there is a gap between them: Close gap at the end of both lines.

If two lines overlap: Do not auto close gap.

Here is an example of its use in paintstorm studio: @YouTube

Proposal by Todor Imreorov <blurymind@gmail.com>