Tok Tok Posted November 4, 2024 Posted November 4, 2024 Hi, Not sure if this is the correct section to post in but this was the only section I could post in. I just started trying Affinity, and I got stuck on the first thing, unfortunately. I sometimes do compositing and I need to be able to use an image as a mask. So I import an image that I just rendered, import an alpha channel image as well and then I want to copy that image into the mask of my main image. I cannot get this done or find how to do it, everybody is talking about using the brush to mask out stuff. Taking this a step further, and this is the reason I went from PS to Affinity, I want to be able to import a linked image and use this as a mask. This way when I update something in my scene render it out my Affinity file gets updated with the latest versions without me having to import files again and again. Is this possible? If it's not possible I'll have to stick with photoshop. It would be a great feature to have since PS has been missing this for years. Thanks! Quote
thomaso Posted November 5, 2024 Posted November 5, 2024 Hi @Tok Tok, welcome to the Affinity Forums! You can use any object as masking layer for another object by dragging the masking object onto the layer thumbnail of the object that should get masked. Below two examples created in APub V1: The masking 'pear' as a linked grayscale image which includes alpha … … and the 'car' which is prepared as mask via a threshold adjustment (to achieve the masking darkness -> black) + a modified blend range curve (to achieve alpha): In Affinity V2 you have the additional option for a luminosity mask that may make it easier. To get the linked masking image auto-updated when changes doe to its original get saved you can activate the according option in the application preferences > General: Quote • MacBookPro Retina 15" | macOS 10.14.6 | Eizo 27" | Affinity V1 • iPad 10.Gen. | iOS 18.5. | Affinity V2.6
Tok Tok Posted November 5, 2024 Author Posted November 5, 2024 Sorry for being not clear about this but I'm using Affinity Photo, I wasn't aware there is a Publisher as well. I tried what you suggested in Photo but it does not work. What happens is that both of the images now look like the masked image when I drag the mask image on the other image. Thanks for taking the time to explain this though! Quote
kaffeeundsalz Posted November 5, 2024 Posted November 5, 2024 It works the same in Affinity Photo. If you provide screenshots of your application window with the Layers panel visible, someone might be able to tell what's wrong with your layer setup. Quote
Tok Tok Posted November 5, 2024 Author Posted November 5, 2024 Oke so this is my initial setup. The top layer is the mask image and the bottom layer should be masked by it. If I drag the layer's icon to the other layer's icon I get this: So the mask shows completely white. When I alt-click on it, it does show me the mask but it does not use it. What I am doing wrong here? This should be a super straightforward process. BTW I rasterized the images to be sure this works. Quote
Staff MEB Posted November 5, 2024 Staff Posted November 5, 2024 Hi @Tok Tok, Welcome to Affinity Forums Select the mask layer (black and white), then go to Layer > Rasterize to Mask to turn it into a mask. Next, drag that mask layer over the thumbnail of the car layer in the Layers panel to apply it as a mask to that layer. Make sure you have set the document background to transparent (Document > Transparent Background); otherwise, everything will look the same, as the canvas background is white by default. Quote A Guide to Learning Affinity Software
Tok Tok Posted November 5, 2024 Author Posted November 5, 2024 (edited) Than you, that works. But now the image is rasterized and not linked anymore. Do I always have to use Rasterize To Mask to be able to use it as a mask? In other words does the layer always need to be rasterized before using it as a mask? Edited November 5, 2024 by Tok Tok Quote
Staff MEB Posted November 5, 2024 Staff Posted November 5, 2024 Hi @Tok Tok, My apologies, I just read your previous post, not the whole thread. I understand now you want to use a linked mask you can edit externally. I believe there's a process but I'm not sure it works directly with a regular black and white image/layer. Need to check out a few things first. Quote A Guide to Learning Affinity Software
thomaso Posted November 5, 2024 Posted November 5, 2024 21 hours ago, Tok Tok said: I tried what you suggested in Photo but it does not work. What happens is that both of the images now look like the masked image when I drag the mask image on the other image. In your screenshot the image used as mask layer appears to have no transparency (alpha), its thumbnail seems to show a rectangle of just black or white (on the transparent background pattern in the squared thumbnail). In Affinity… • a layer of type 'pixel' can not be linked, and • a layer of type 'image' is a kind of vector layer (containing an object of pixels), and • there are two types of mask layers: pixel and vector. For some (unknown?) reason, and unlike a 'pixel mask', an Affinity 'vector mask' does not use the white of an image as transparency, therefore I used the workaround via the adjusted Blend Range Curve. Bildschirmvideo aufnehmen 2024-11-05 um 16.43.03.m4v You may be able to invert your car shape and remove its white to use it as linked mask. Note, once you converted an 'image' layer into a 'pixel' layer (e.g. to edit its pixels) you can also convert the 'pixel' layer back into an 'image' layer. (-> right click on the object inn the layout window) Quote • MacBookPro Retina 15" | macOS 10.14.6 | Eizo 27" | Affinity V1 • iPad 10.Gen. | iOS 18.5. | Affinity V2.6
Dazmondo77 Posted November 5, 2024 Posted November 5, 2024 Just use a blend range adjustment see vid grab: Screen Grab 2024-11-05 at 4.44.10 pm.mov Quote Mac Pro Cheese-grater (Early 2009) 2.93 GHz 6-Core Intel Xeon 48 GB 1333 MHz DDR3 ECC Ram, Sapphire Pulse Radeon RX 580 8GB GDDR5, Ugee 19" Graphics Tablet Monitor Triple boot via OCLP 2.2.0 - Mac OS Monterey 12.7.6, Sonoma 14.7.3 and Mojave 10.14.6 Affinity Publisher, Designer and Photo 1.10.5 - 2.6.2 Betas 2.6. www.bingercreative.co.uk
Dazmondo77 Posted November 5, 2024 Posted November 5, 2024 6 minutes ago, Dazmondo77 said: Just use a blend range adjustment see vid grab: Just realised the above example is a CMYK doc - if in RGB the blend range adjustment curve should be the opposite: Quote Mac Pro Cheese-grater (Early 2009) 2.93 GHz 6-Core Intel Xeon 48 GB 1333 MHz DDR3 ECC Ram, Sapphire Pulse Radeon RX 580 8GB GDDR5, Ugee 19" Graphics Tablet Monitor Triple boot via OCLP 2.2.0 - Mac OS Monterey 12.7.6, Sonoma 14.7.3 and Mojave 10.14.6 Affinity Publisher, Designer and Photo 1.10.5 - 2.6.2 Betas 2.6. www.bingercreative.co.uk
NotMyFault Posted November 5, 2024 Posted November 5, 2024 3 hours ago, Return said: Like this? Your last post is a bit cryptic without additional explanation 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.
NotMyFault Posted November 5, 2024 Posted November 5, 2024 On 11/4/2024 at 6:15 PM, Tok Tok said: I sometimes do compositing and I need to be able to use an image as a mask. Essentially this means translating lightness values into alpha values (opacity or its inverse transparency). There are multiple ways to do this: destructive via rasterize to mask (like @MEB) non-destructive via blend range (like @Dazmondo77) non-destructive via channels adjustment (see below) probably more options I didn’t recall channels adjustment add channels adjustment (in masking position) set to GREY mode choose alpha channel set I input to 100% set A input to 0% 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.
NotMyFault Posted November 5, 2024 Posted November 5, 2024 8 minutes ago, Return said: You're right, it is. Excellent. The only thing I worry about today is the election result in one of the most barbaric powerful economies of the world and the huge potential to destroy humanity within weeks or months. No longer any reason to care about insignificant Affinity bugs, questions of forum members or the state of health of forum members. Never the less, hope you are well. If not, give us a hint. 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.
NotMyFault Posted November 5, 2024 Posted November 5, 2024 A minor detail all forget is that sRGB uses gamma 2.2 by default, whereas alpha does not. Not relevant in this actual case of 0 / 1 binary mask. 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.
Tok Tok Posted November 13, 2024 Author Posted November 13, 2024 Thank you everyone for posting suggestions. I don't have time to look at it right now, but I will take a look at it in the coming weeks. 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.