octafish Posted March 3, 2023 Posted March 3, 2023 (edited) I use Affinity Photo to paint shading on objects created in Designer. I do come across a problem with half transparent pixels a lot. So for example I am using a simple single colored circle and lock the alpha of the layer. Then I am using a soft brush with the blending setting set to multiply to draw the shading. The outer antialiased pixels (with transparency) are not as much effected as the solid pixels and so creating a bright ugly outline. I tried a workaround by using a "selection from layer" on the circle layer and then use a second layer above the circle (blending set to multiply) to draw the shading. That works perfectly (see in the image below on the left) but if I combine the two layers I am getting these bright outline pixels again (in the image below on the right). Is there anything I can do to avoid these bright half transparent pixels and achieve a result like the one on the left of image below? I attached the affinity photo (v2) file. If you combine the "shading" layer with the "circle" layer you are getting the bright alpha pixels. alphaBlendingProblem.afphoto Edited March 3, 2023 by octafish Quote
lepr Posted March 3, 2023 Posted March 3, 2023 Hi octafish, welcome to the forums. Please attach an Affinity document which has the problem you've described. Otherwise you could get a load of wrong guesses until someone eventually solves this for you. Quote
octafish Posted March 3, 2023 Author Posted March 3, 2023 Thanks! I attached the document to the original post. I guess Affinity is multiplying the color of the pixel by the alpha value of the pixel when combining the layers. I guess this is premultiplied alpha? Can you somehow switch off this behaviour (just combining the colours of the layers depending on the blend mode and not additionally multiplying it by the alpha value of the pixel)? It's just a guess I am not 100% sure whats happening here. Quote
lepr Posted March 3, 2023 Posted March 3, 2023 Yes, looks like the paint RGB is masked by the destination alpha then multiply-blended into the destination, and inverse masked by the destination alpha then normal-blended into the destination. That can result in brightening instead of darkening where pixels are semi-opaque. Anyway, there are workarounds. Before starting to multiply-paint, move the alpha from the Pixel object to a Mask so you have a completely opaque Pixel object with a Mask. That way the paint will always be blended into opaque pixels while the Mask will still provide alpha for the Pixel object. An easier method is to clip-nest an empty Pixel object inside the base Pixel object and paint the shading in the nested object. Also, in case you are unaware, you could shade your vector objects without first rasterising them. As in the previous method, clip-nest a shading Pixel object inside the vector object. Quote
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.