Best to describe with picture: http://oi67.tinypic.com/2jahqwz.jpg Basically the image has it's layers divided in two layer groups: background (red and cyan) with filter mask applied to it and foreground (all others) + one layer "free" under them (semitransparent black) also with mask. As u can see, there's nothing wrong with the foreground group, but the background gets divided into these strange segments. They are not regular and appear in different patterns. Also nothing goes wrong when filter mask is applied to single layer. Happens only after saving and reopening the file. It's enough to hide and unhide the group with the filter to make the artefacts disappear, but they will be there still when u open the file again. Happened to me for all (two) files created with Krita 3.0 so far. Reproducible: Always Steps to Reproduce: 1. Create image with a group layer with gaussian blur mask applied to it. 2. Save and close file. 3. Reopen file. Actual Results: The group layer with gaussian mask is divided into segments. Expected Results: The layer should be evenly blurred.
Hi, Thanks for your report. Could you attach a file that shows the issue? I haven't been able to reproduce. If the file is too big, please mail it directly to me.
Created attachment 100630 [details] source .kra file
Created attachment 100632 [details] exported .png file
Attached both source KRA file and exported PNG.
Thanks!
Interestingly, toggling the filter mask's visibilty "fixes" the artefacts.
Yup, it seems that it's just the calculations for saved filter are wrong - when it's calculated again (after toggling the filter), the artefacts are gone... until reopening the file.
I just tested this on Krita 4.0.0. While the problem still exists when viewing the image in Krita itself, it seems like the artifacts don't show up when exporting to PNG anymore. I suppose this is probably related to why it takes so much longer to export in 4.0.0 (it looks as if it's fully re-rendering the entire image on export, which is good). So it might be mitigated as far as export is concerned, but not on the Krita canvas.
The problem happens because of the way how we do initial canvas update after loading the image. This update doesn't take masks change/need rects, therefore borders appear. The problem can be reproduced only with operations that use KisFullRefreshWalker (we have only few of them).
Git commit 9d2920f896c0342774cacd95d4f8a4c5c9f58329 by Dmitry Kazakov. Committed on 09/05/2019 at 14:17. Pushed by dkazakov into branch 'master'. Fix rendering of masks and layer styles on dependent nodes In Krita we have two [0] types of "dependent" nodes, that is, whose contents depends on the result of a merge of other layers. KisAdjustmentLayer depends on the result of composing all the layer below it. KisGroupLayer depends on the result of composing its children. All these layers can have filter masks and/or layer styles. To handle them, the patch introduces a term needRectForOriginal(). needRectForOriginal(rect) means "what area of layer's original device should be prepared to correct result in 'rect' of the 'final device'". Under 'final device' it may be considered projection for a layer or a final composed planes for a projection plane. What is the difference between needRectForOriginal() and needRect? needRect() defines "what area of layers below should be prepared to get correctly merged image". Obviously, group layer doesn't depend on layers below (it depends on its children) and adjustment layer's needRect also includes filter's needRect, which is not the case for needRectForOriginal(). [1] --- actually, we have three. KisCloneLayer is also "dependent", but it is not covered by this patch. Related: bug 390299 M +5 -0 libs/image/kis_abstract_projection_plane.cpp M +8 -0 libs/image/kis_abstract_projection_plane.h M +4 -1 libs/image/kis_adjustment_layer.cc M +5 -2 libs/image/kis_async_merger.cpp M +23 -2 libs/image/kis_base_rects_walker.h M +17 -0 libs/image/kis_layer.cc M +15 -0 libs/image/kis_layer.h M +5 -0 libs/image/kis_layer_projection_plane.cpp M +1 -0 libs/image/kis_layer_projection_plane.h M +5 -0 libs/image/kis_mask_projection_plane.cpp M +1 -0 libs/image/kis_mask_projection_plane.h M +5 -0 libs/image/layerstyles/kis_layer_style_filter_projection_plane.cpp M +1 -0 libs/image/layerstyles/kis_layer_style_filter_projection_plane.h M +44 -18 libs/image/layerstyles/kis_layer_style_projection_plane.cpp M +3 -0 libs/image/layerstyles/kis_layer_style_projection_plane.h A +- -- libs/image/tests/data/async_merger_test/dependent_adj_mask.png A +- -- libs/image/tests/data/async_merger_test/dependent_adj_style.png A +- -- libs/image/tests/data/async_merger_test/dependent_group_mask.png A +- -- libs/image/tests/data/async_merger_test/dependent_group_mask_style.png A +- -- libs/image/tests/data/async_merger_test/dependent_group_style.png M +160 -0 libs/image/tests/kis_async_merger_test.cpp M +7 -0 libs/image/tests/kis_async_merger_test.h M +3 -2 libs/image/tests/kis_walkers_test.cpp https://invent.kde.org/kde/krita/commit/9d2920f896c0342774cacd95d4f8a4c5c9f58329