Jump to content

Recommended Posts

When attempting to draw shapes with a brush and then fill them in with a color, such as when doing ink-and-paint, you need a tool that will properly "re-fill" the partial alpha pixels on the interior edges of the brushstroke.  Photoshop et al typically have an option for this on the paintbucket, such as "Antialias" or something similar.  I could find no similar feature in Affinity Photo, which makes it kind of impossible to use for ink-and-paint, since just flooding in the solid color regions would have to be done manually by the artist instead of being a single click.

- Casey

Share this post


Link to post
Share on other sites

It is called Tolerance and it is on the Context Toolbar. Higher levels fill more semitransparent areas.

765935781_ScreenShot2019-06-27at3_18_42PM.png.32cd71010d1d1b526cb10f3d7ade4841.png


MacBook Pro (13-inch, Mid 2012) Mac OS 10.12.6 || Mac Pro (Late 2013) Mac OS 10.14.6

Affinity Designer 1.8.4 | Affinity Photo 1.8.4 | Affinity Publisher 1.8.4 | Affinity Designer Beta 1.9.0.2 | Affinity Photo Beta 1.9.0.196 | Affinity Publisher Beta 1.9.0.742

Share this post


Link to post
Share on other sites

Neither of those two things is what I'm talking about.  Tolerance does not properly handle antialiased edges, it simply expands the region that will be filled (thus destroying the antialiasing).  As for the paintbrush options, those do not affect the paint bucket, do they?

- Casey

 

Share this post


Link to post
Share on other sites
8 hours ago, Casey Muratori said:

Tolerance does not properly handle antialiased edges, it simply expands the region that will be filled (thus destroying the antialiasing).

Okay, I really don't understand what it is you want to achieve.

I drew an enclosed area with a brush and black ink. I chose the paint bucket tool and filled it with blue paint and then dumped it into the enclosed area, one click with the Paintbucket tool. You can see the result, if is this not what you want then what is what you want.

1940708657_ScreenShot2019-06-28at7_51_48AM.png.9bf3cc60bb08a338f26c038246ae954a.png


MacBook Pro (13-inch, Mid 2012) Mac OS 10.12.6 || Mac Pro (Late 2013) Mac OS 10.14.6

Affinity Designer 1.8.4 | Affinity Photo 1.8.4 | Affinity Publisher 1.8.4 | Affinity Designer Beta 1.9.0.2 | Affinity Photo Beta 1.9.0.196 | Affinity Publisher Beta 1.9.0.742

Share this post


Link to post
Share on other sites

In your example image there are semi transparent pixels all around the area that you filled with the turquoise colour.

I believe the OP would like the fill to merge seamlessly with the surrounding colour without leaving translucent pixels.

Update: Hmm - OK I am confused too! Increasing the Tolerance will eventually colour right up to the line (as it were) leaving no translucent pixels, and it seems to me to preserve the existing anti-aliasing too.

Just looked at an old version of Photoshop, and to me is seems that anti-aliasing turned on gives a very similar result to Affinity.

Turning anti-aliasing off gives a hard edge, and destroys existing anti-aliasing on the outline.


Win10 Home x64   |   AMD Ryzen 7 2700X @ 3.7GHz   |   16 GB RAM   |   1TB SSD   |   nVidia GTX 1660   |   Huion 1060 Plus

How I make GIFs >>> ScreenToGIF (Windows only, Open Source, Portable, ~600kB)

Share this post


Link to post
Share on other sites
32 minutes ago, Aammppaa said:

I believe the OP would like the fill to ...

I am going to wait for Casey to reply and not speculate.


MacBook Pro (13-inch, Mid 2012) Mac OS 10.12.6 || Mac Pro (Late 2013) Mac OS 10.14.6

Affinity Designer 1.8.4 | Affinity Photo 1.8.4 | Affinity Publisher 1.8.4 | Affinity Designer Beta 1.9.0.2 | Affinity Photo Beta 1.9.0.196 | Affinity Publisher Beta 1.9.0.742

Share this post


Link to post
Share on other sites

I'm not sure exactly how to explain what is supposed to happen verbally, but mathematically you have a pixel of the form (color, alpha) where "color" is a vector (RGB, CMYK, whatever your encoding is) and "alpha" is an encoding of the range [0, 1] that (in this case) represents brush coverage of the pixel that was painted by a previous brush stroke.  An "alpha-aware fill" or "anti-aliased fill" is one where _all reachable pixels_ in the flood region with an alpha less than 1 have their original value of (color, alpha) replaced with (alpha*color + (1 - alpha)*fill, 1), where "fill" is the color with which you've filled the region.

Another way to say this is that an alpha-aware fill behaves as if you had filled the underlying region first, _and then_ painted the brush stroke over it.

No "tolerance" value is needed in this scenario - a tolerance of 0 will still fill the region exactly correctly, because you are not asking it to expand to any neighboring colors.  You are literally only filling exact matches for the _color_ part of the component, you're just extending into pixels whose alpha was partial.

Not sure how to describe this any other way, but I can post code for it if the devs really don't know what I'm talking about, but would assume any graphics programmer would immediately understand what I'm saying.

- Casey 

Share this post


Link to post
Share on other sites
On 6/27/2019 at 6:21 PM, Old Bruce said:

It is called Tolerance and it is on the Context Toolbar. Higher levels fill more semitransparent areas.

765935781_ScreenShot2019-06-27at3_18_42PM.png.32cd71010d1d1b526cb10f3d7ade4841.png

Thank you! You helped me big time!

Share this post


Link to post
Share on other sites

It is unfortunately one more paper cut in Affinity. Two paper cuts in this use case, actually.

The first issue with the fill tool is the lack of anti-aliasing/alpha awareness or the lack of an overfill option.

In other software this is solved by either including the alpha of pixels by default, or including an option to control the overfill. In Krita it is called "Grow Selection". ClipStudio Paint does it automatically by overfilling transparent pixels (because who would want ugly aliased fills!). PhotoLine fixes this with an "Overfill" option. Art Studio has a "smart fill" option.

Gimp, Photoshop, and Affinity Photo rely on the tolerance threshold to address this, but it is less than ideal, and often doesn't work as expected, or requires more fiddling around. Affinity's threshold seems the most finicky of all in my experience.

The second issue with Affinity Photo's fill tool is the lack of a "read merged" or "all layers" option in the Source drop-down list. Here is why: suppose the artist wants to quickly fill areas of comic artwork. The default workflow is to put the line art in a layer above the fill layer, then fill areas. This can be done in several ways, and one quick method is to just use the fill tool. The artist then chooses "sample merged" or "(sample) All layers", sets the overfill (depending on the software) and fills the area. 

This workflow is unavailable in Affinity Photo, however: the Source list only includes "current layer & below", "current layer", and "layers beneath". It is literally impossible to fill comic art using this very basic approach in Affinity Photo.

ClipStudio Paint offers the best controls and has options that range far beyond the "sample all layers", which is great. Krita has a nice "Color labelled layers" aside from the "All layers" option to precisely define which layers to sample from. PhotoLine, Gimp, Photoshop: these all have the "All Layers" option.

Yet Affinity Photo lacks any such option, rendering the fill tool pretty much useless for such work (including bringing in technical drawings as line art, btw! Not only comic art jobs!). Instead, the fill layer must be placed ON TOP of the line art, which is very, very awkward.

The Affinity devs should take note: add an overflow option, and allow the user to sample the layer(s) above the fill layer. Without these two very basic options the fill tool is pretty much useless for anything beyond simple tasks. At the very least add the "all layers" source option to have feature parity with Photoshop and Gimp.

 

 

 

Share this post


Link to post
Share on other sites

PhotoPlus predecessor of AP had anti-alias option on Flood Fill tool.
It's strange that Affinity doesn't have it...
Should be easy to transplant I think

Image 2020-07-03 at 12.56.19 PM.png

Share this post


Link to post
Share on other sites

The Anti-alias option in Photoshop (or in Gimp for that matter) is not the same as a dedicated overfill feature. The anti-alias option isn't actually a good solution, and often delivers not-so-great to unusable results. The application either needs to be 'aware' of anti-aliasing and overfill it by default (ClipStudio), and/or a dedicated overfill option is included.

Anti-aliasing by itself generally doesn't solve all use cases satisfactorily.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

Please note the Annual Company Closure section in the Terms of Use. These are the Terms of Use you will be asked to agree to if you join the forum. | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.