Jump to content

Recommended Posts

Posted

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!

Posted

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 …

Bildschirmfoto2024-11-05um12_34_42.thumb.jpg.8a796f9b50b18dc175bc07a7cd54a928.jpg

… 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.

Bildschirmfoto2024-11-05um12_39_08.thumb.jpg.5a950289d2a9076604d0ee89d54a1d9a.jpg

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:

Bildschirmfoto2024-11-05um12_47_55.jpg.92fa14f06290237b0a38a95f17cbda25.jpg

• MacBookPro Retina 15" |  macOS 10.14.6  | Eizo 27" | Affinity V1  
• iPad 10.Gen.  |  iOS 18.5.  |  Affinity V2.6

Posted

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!

Posted

 

Oke so this is my initial setup. The top layer is the mask image and the bottom layer should be masked by it.2024-11-0515_08_50-Window.thumb.jpg.057d9696f15e26eedd5610232d1faec0.jpg

If I drag the layer's icon to the other layer's icon I get this:

2024-11-0515_09_23-Window.thumb.jpg.c746a3bdced2c1f37efa0b0dbeb69b5e.jpg

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.

  • Staff
Posted

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.

Posted (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 by Tok Tok
Posted
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.

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)

• MacBookPro Retina 15" |  macOS 10.14.6  | Eizo 27" | Affinity V1  
• iPad 10.Gen.  |  iOS 18.5.  |  Affinity V2.6

Posted

Just use a blend range adjustment see vid grab:

Daz1.png

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

 

 

 

 

 

Posted
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: 

SCR-20241105-oytz.png

Daz1.png

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

 

 

 

 

 

Posted
3 hours ago, Return said:

Like this?

clipimage.jpg.f436587e041300a4204d38e62fa7fa9c.jpg

Your last post is a bit cryptic without additional explanation 

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.

 

Posted
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:

  1. destructive via rasterize to mask (like @MEB)
  2. non-destructive via blend range (like @Dazmondo77)
  3. non-destructive via channels adjustment (see below)
  4. probably more options I didn’t recall 

channels adjustment 

  1. add channels adjustment (in masking position)
  2. set to GREY mode
  3. choose alpha channel
  4. set I input to 100%
  5. set A input to 0%

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.

 

Posted
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.

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.

 

Posted

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.

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.

 

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.