Zero1 Posted June 15, 2021 Posted June 15, 2021 I dont know if this is a bug or not but there seems to be a mismatch in how masks work.. If a mask is applied in the "mask child layer" it works as expected. If the same mask is applied in the "clipping child layer", the result imho is not correct. If i am not mistaken, the end result should have been the same right? I double checked and it happens on the iPad and on the Desktop version of Photo. Here is my reference photos to test it out.. I grouped the 2 method and applied a difference blend mode to see the difference. As you can see if both masks are "mask child layer" there is no difference.. (so this method to detect a difference is correct). When the mask of the top group is moved from a "mask child" to a "clipping child", the difference comes to face. Quote
NotMyFault Posted June 15, 2021 Posted June 15, 2021 (edited) 2 hours ago, Zero1 said: Here is my reference photos to test it out.. I grouped the 2 method and applied a difference blend mode to see the difference. Hi, could not yet check the files (can you please upload them?), but a general comment to you test method: blend mode difference does not work as expected when the images contain partially transparent pixels. Even if both layers have identical RGBA values, the alpha blend results in non-black pixels. If you want to use blend mode difference for checking if images are identical, you need to make 2 passes: only compare RGB values, set alpha to 100% (alpha 0%, bias 100%) only compare A values (converted to RGB), set alpha to 100% (R,G,B set to 100% A, A set to 100 bias, everything else set to 0%) you can use channel mixer adjustments to achieve this. Edited June 15, 2021 by NotMyFault Quote Mac mini M1 A2348 | MBP M3 Windows 11 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080 LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5 | Dell 27“ 4K iPad Air Gen 5 (2022) A2589 Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps. I use iPad screenshots and videos even in the Desktop section of the forum when I expect no relevant difference.
walt.farrell Posted June 15, 2021 Posted June 15, 2021 1 hour ago, NotMyFault said: blend mode difference does not work as expected when the images contain partially transparent pixels. Even if both layers have identical RGBA values, the alpha blend results in non-black pixels. If you want to use blend mode difference for checking if images are identical, you need to make 2 passes: only compare RGB values, set alpha to 100% (alpha 0%, bias 100%) only compare A values (converted to RGB), set alpha to 100% (R,G,B set to 100% A, A set to 100 bias, everything else set to 0%) Perhaps I'm confused, but to me, if two images have the same RGB values, but different transparency, they are not the same image. And therefore, a simple Difference blend mode should show they are different, and that's exactly what I would expect. Quote -- Walt Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases PC: Desktop: Windows 11 Pro 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 Laptop: Windows 11 Pro 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU. Laptop 2: Windows 11 Pro 24H2, 16GB memory, Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) 12 Core CPU 4.01 GHz, Qualcomm(R) Adreno(TM) X1-85 GPU iPad: iPad Pro M1, 12.9": iPadOS 18.5, Apple Pencil 2, Magic Keyboard Mac: 2023 M2 MacBook Air 15", 16GB memory, macOS Sequoia 15.4
Zero1 Posted June 15, 2021 Author Posted June 15, 2021 Well the Alpha values of both groups are the same (and this is the reason why when both masks are as set a mask child, there is no difference).. Anyway, the question/bug is not about the difference blend mode, it is about the way masks are processed depending on what kind of child layer they are. I have attached another screenshot (and also the source file). You can clearly see that there is difference, where i would expect the result of both masks should have been the same whether it was added as a mask child or as clipping child.. (or maybe my assumption is wrong, if so what would be the reason there is a difference if it is not an error/bug) Thanks! masks.afphoto Quote
walt.farrell Posted June 15, 2021 Posted June 15, 2021 8 hours ago, Zero1 said: If i am not mistaken, the end result should have been the same right? Why should it be the same? Quote -- Walt Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases PC: Desktop: Windows 11 Pro 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 Laptop: Windows 11 Pro 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU. Laptop 2: Windows 11 Pro 24H2, 16GB memory, Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) 12 Core CPU 4.01 GHz, Qualcomm(R) Adreno(TM) X1-85 GPU iPad: iPad Pro M1, 12.9": iPadOS 18.5, Apple Pencil 2, Magic Keyboard Mac: 2023 M2 MacBook Air 15", 16GB memory, macOS Sequoia 15.4
NotMyFault Posted June 15, 2021 Posted June 15, 2021 I simplified the file from zero1 to make this more obvious: it seems that a vector shape with a mask (used as mask) behaves different from a vector shape with a mask used nested (clipping) - or a rasterized version derived from the later. So I confirm his observation. The top pixel layer was rasterized from the green layer (while blue fill inactive), and then moved above. For me it is totally counter-intuitive that the rasterized layers gives a totally different result vs. the non-rasterized layer once the blue fill layer is activated. Seems really strange. On the other side, using mask in the "nested / clipped" position could be a kind of "undefined" in photo. So unclear if "by design", "undefined", or "bug", or even more unexpected. Really curious what the Affinity staff can say about this. masks bested issue v2.afphoto Quote Mac mini M1 A2348 | MBP M3 Windows 11 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080 LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5 | Dell 27“ 4K iPad Air Gen 5 (2022) A2589 Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps. I use iPad screenshots and videos even in the Desktop section of the forum when I expect no relevant difference.
Zero1 Posted June 15, 2021 Author Posted June 15, 2021 Thank you, exactly my point I believe when a mask is nested as a clipping child, it should act the same when nested as a mask child, the reasoning for this is because imho the mask result should be clipped to only affect the parent. Also you are right, this happens only with a vector shape as parent. I tried with pixel layers and then there is no difference. This kind of strengthens my argument because with pixel layers it works as expected, so it feels like a bug Quote
Staff MEB Posted August 23, 2021 Staff Posted August 23, 2021 Hi @Zero1, Welcome to Affinity Forums Thanks you for your feedback/report and files. There's indeed a few odd behaviours going on. I'm preparing a few files and taking this up to the dev team in the hope to get these behaviours explained/issues fixed. Thanks again for your support. Quote A Guide to Learning Affinity Software
Recommended Posts
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.