Bug 394438 - [transparency mask] Tiling effect when painting mask with Pixel-engine brushes
Summary: [transparency mask] Tiling effect when painting mask with Pixel-engine brushes
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Layers/Vector (show other bugs)
Version: 4.0.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-19 09:11 UTC by David REVOY
Modified: 2018-06-26 15:13 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
[^ screenshot of the bug] (497.07 KB, image/jpeg)
2018-05-19 09:11 UTC, David REVOY
Details
Video example (487.88 KB, video/mp4)
2018-06-07 23:38 UTC, mvowada
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David REVOY 2018-05-19 09:11:22 UTC
Created attachment 112746 [details]
[^ screenshot of the bug]

Hi, 

A bug seen on Krita Sprint 2018 with Dmitry; 

How to reproduce:
=================
1. On a flat large image (over than 2K x 2K pixels)
2. Duplicate the layer and apply a filter on it to do a dramatic change (eg. desaturate colors to b&w )
3. Now on the layer containing the b&w version of the picture, add a "Transparency mask"
4. Transparency mask appears and is selected, press "delete" on keyboard to turn the mask into full black.
5. Select a big airbrush, and paint with white color on the mask

Result:
=======
The airbrush stroke doesn't reveal the transparency mask correctly; tiling effect appears. it is even worst if a brush use the "Build-up" mode.
Comment 1 Dmitry Kazakov 2018-05-19 09:24:05 UTC
I can confirm the bug
Comment 2 Dmitry Kazakov 2018-05-24 14:43:10 UTC
Git commit c9cf2b33c824b690fd95ac3c6b6018c5a19244bb by Dmitry Kazakov.
Committed on 24/05/2018 at 14:42.
Pushed by dkazakov into branch 'kazakov/animation-cache-swapping'.

Fix extent calculation of KisMask

Some time ago the masks started to support indirect painting,
therefore their extent-related methods should also combine the
corresponding methods of temporary target

M  +45   -12   libs/image/kis_mask.cc

https://commits.kde.org/krita/c9cf2b33c824b690fd95ac3c6b6018c5a19244bb
Comment 3 Dmitry Kazakov 2018-05-24 14:44:33 UTC
Git commit 5255a2f3c959c7843e4837aa895f5ee385c27135 by Dmitry Kazakov.
Committed on 24/05/2018 at 14:44.
Pushed by dkazakov into branch 'master'.

Fix extent calculation of KisMask

Some time ago the masks started to support indirect painting,
therefore their extent-related methods should also combine the
corresponding methods of temporary target

M  +45   -12   libs/image/kis_mask.cc

https://commits.kde.org/krita/5255a2f3c959c7843e4837aa895f5ee385c27135
Comment 4 Halla Rempt 2018-05-24 15:03:35 UTC
Git commit b790c4d4c671042b222f337af2615f39f92e9f8f by Boudewijn Rempt, on behalf of Dmitry Kazakov.
Committed on 24/05/2018 at 15:03.
Pushed by rempt into branch 'krita/4.0'.

Fix extent calculation of KisMask

Some time ago the masks started to support indirect painting,
therefore their extent-related methods should also combine the
corresponding methods of temporary target
(cherry picked from commit 5255a2f3c959c7843e4837aa895f5ee385c27135)

M  +45   -12   libs/image/kis_mask.cc

https://commits.kde.org/krita/b790c4d4c671042b222f337af2615f39f92e9f8f
Comment 5 Halla Rempt 2018-06-07 07:48:48 UTC
Build up mode is still broken.
Comment 6 Dmitry Kazakov 2018-06-07 11:06:55 UTC
Git commit ab670ba3b15b3617ba5ef50d87fe76c644a18fda by Dmitry Kazakov.
Committed on 07/06/2018 at 11:06.
Pushed by dkazakov into branch 'master'.

Fix BuildUp painting mode for masks and selection-based layers

When rendering dabs we should use correct pixel size :)

M  +2    -2    libs/image/kis_painter_blt_multi_fixed.cpp

https://commits.kde.org/krita/ab670ba3b15b3617ba5ef50d87fe76c644a18fda
Comment 7 mvowada 2018-06-07 23:38:15 UTC
Created attachment 113137 [details]
Video example

Hi Dmitry,
Thanks for fixing this, however it seems I'm still able to reproduce the problem. Please see the video example. (Krita Version: 4.1.0-pre-alpha (git ab670ba) on Ubuntu 14.04 Unity)
Comment 8 Halla Rempt 2018-06-12 07:38:48 UTC
The problem is also present with with the spray brush engine.
Comment 9 Dmitry Kazakov 2018-06-12 12:08:54 UTC
Git commit 25801542f2294268ec0a5174e4195375ba460571 by Dmitry Kazakov.
Committed on 12/06/2018 at 12:07.
Pushed by dkazakov into branch 'master'.

Fix tail-artifacts when painting with a Pixel brush on a transparency mask

In the end of the stroke indirect device is merged into the main selection
used a lock help. We should synchronize with this lock to ensure there is
no race condition between reading two extents: from the main selection and
indirect target.

Note: there is still another bug when with Quick Brush, but I'll put it
      under a separate bugreport.

M  +5    -1    libs/image/kis_mask.cc

https://commits.kde.org/krita/25801542f2294268ec0a5174e4195375ba460571
Comment 10 Halla Rempt 2018-06-13 11:51:37 UTC
Git commit ac91e6964deb6fc13afee5bb2d685f5c54e97795 by Boudewijn Rempt, on behalf of Dmitry Kazakov.
Committed on 13/06/2018 at 11:48.
Pushed by rempt into tag 'v4.0.4'.

Fix tail-artifacts when painting with a Pixel brush on a transparency mask

In the end of the stroke indirect device is merged into the main selection
used a lock help. We should synchronize with this lock to ensure there is
no race condition between reading two extents: from the main selection and
indirect target.

Note: there is still another bug when with Quick Brush, but I'll put it
      under a separate bugreport.
(cherry picked from commit 25801542f2294268ec0a5174e4195375ba460571)

M  +5    -1    libs/image/kis_mask.cc

https://commits.kde.org/krita/ac91e6964deb6fc13afee5bb2d685f5c54e97795
Comment 11 Andrey 2018-06-26 15:12:23 UTC
Git commit b61a7fb995e6da444737b544e0077e064f36b304 by Andrey Kamakin, on behalf of Dmitry Kazakov.
Committed on 26/06/2018 at 14:18.
Pushed by akamakin into branch 'akamakin/T8628-multithreading-optimization'.

Fix tail-artifacts when painting with a Pixel brush on a transparency mask

In the end of the stroke indirect device is merged into the main selection
used a lock help. We should synchronize with this lock to ensure there is
no race condition between reading two extents: from the main selection and
indirect target.

Note: there is still another bug when with Quick Brush, but I'll put it
      under a separate bugreport.

M  +5    -1    libs/image/kis_mask.cc

https://commits.kde.org/krita/b61a7fb995e6da444737b544e0077e064f36b304
Comment 12 Andrey 2018-06-26 15:13:12 UTC
Git commit 202d8208cabff786d4a9609c20385e2d4204aa82 by Andrey Kamakin, on behalf of Dmitry Kazakov.
Committed on 26/06/2018 at 14:18.
Pushed by akamakin into branch 'akamakin/T8628-multithreading-optimization'.

Fix BuildUp painting mode for masks and selection-based layers

When rendering dabs we should use correct pixel size :)

M  +2    -2    libs/image/kis_painter_blt_multi_fixed.cpp

https://commits.kde.org/krita/202d8208cabff786d4a9609c20385e2d4204aa82