Bug 373336 - [Incomplete "Fill" property] Layer styles use alpha of the layer incorrectly, resulting in color fringes in semitransparent areas
Summary: [Incomplete "Fill" property] Layer styles use alpha of the layer incorrectly,...
Status: RESOLVED DUPLICATE of bug 412283
Alias: None
Product: krita
Classification: Applications
Component: layer styles (show other bugs)
Version: git master (please specify the git hash!)
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-06 06:32 UTC by Spencer Brown
Modified: 2019-10-02 18:38 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
This file has a layer with semitransparent strokes and a color overlay layer style in Normal blending mode. (584.17 KB, application/x-krita)
2016-12-06 06:32 UTC, Spencer Brown
Details
attachment-5598-0.html (1.42 KB, text/html)
2016-12-07 17:07 UTC, Spencer Brown
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Spencer Brown 2016-12-06 06:32:45 UTC
Created attachment 102639 [details]
This file has a layer with semitransparent strokes and a color overlay layer style in Normal blending mode.

The strokes are in green and the color overlay is a blue color. There are visible green fringes in the semitransparent areas of the stroke. These areas should be blue, not green.

The correct behavior for the color overlay layer style in normal blending mode should be functionally equivalent to grouping the layer and adding a fill layer with the color blue set to inherit alpha.

I've also noticed this problem on the inner glow layer style (I think.)

Color overlay layer style is pretty handy in some texture art situations, for example making a specular power texture for a gun skin for Counter-Strike: Global Offensive. Specular power textures have big flat areas, and the exact values required to produce the correct effect can be somewhat unpredictable. Color overlay is a lot more concise and easy to change than making another group for specular power and adding a bunch of clone layers from the main layer stack and putting color fill layers with inherit alpha over those clone layers. To pack the specular power into the alpha channel of the texture (which is the format that the game engine expects), you select all layers, enable layer effects in the layer properties, copy merged, paste, move the layer to the top, and convert that merged layer to a transparency mask.

Inner (and outer) glow is useful to make certain types of alphas for Zbrush sculpting, or to convert line art to signed distance fields for crisp line art rendering in a non-photorealistic renderer without having to use nearest-neighbor filtering and broken-up texture coordinates.
Comment 1 Halla Rempt 2016-12-07 10:05:03 UTC
Hi Spencer,

Yes, I can confirm the bug. Neither I nor Dmitry will be able to look into it any time soon... But maybe you can come up with a patch?
Comment 2 Spencer Brown 2016-12-07 17:07:23 UTC
Created attachment 102664 [details]
attachment-5598-0.html

I'll see what I can do.

On Dec 7, 2016 4:05 AM, "Boudewijn Rempt" <bugzilla_noreply@kde.org> wrote:

> https://bugs.kde.org/show_bug.cgi?id=373336
>
> Boudewijn Rempt <boud@valdyas.org> changed:
>
>            What    |Removed                     |Added
> ------------------------------------------------------------
> ----------------
>                  CC|                            |boud@valdyas.org
>      Ever confirmed|0                           |1
>              Status|UNCONFIRMED                 |CONFIRMED
>
> --- Comment #1 from Boudewijn Rempt <boud@valdyas.org> ---
> Hi Spencer,
>
> Yes, I can confirm the bug. Neither I nor Dmitry will be able to look into
> it
> any time soon... But maybe you can come up with a patch?
>
> --
> You are receiving this mail because:
> You reported the bug.
Comment 3 Halla Rempt 2016-12-07 17:53:12 UTC
> I'll see what I can do.

Yay!
Comment 4 Dmitry Kazakov 2018-06-09 07:05:49 UTC
Hi, Spencer!

I was looking into this bug and I have a feeling that this is not actually a bug, but basically incomplete feature. Layers styles work in a way that both, the base layer content and filtered content are painted on a layer. So if you paint with semi-transparent stroke, they will blend. To avoid that one should select zero "Fill" property for a layer to avoid painting of the original layer data. And this option is still not implemented.
Comment 5 Dmitry Kazakov 2019-10-02 18:38:23 UTC

*** This bug has been marked as a duplicate of bug 412283 ***