G-Bone420 Posted August 12, 2023 Share Posted August 12, 2023 Hi there, I've just moved to Affinity from Illustrator and I'm trying to get used to how clipping masks are created in AD. I'm not sure if I'm getting the right terminology. I have a picture and I want to mask a section of text around an object in the picture: In Illustrator, you can create a vector object and then use that object to hide a certain part of something else. When I do so in AD, I get this: It's doing what I want, but for some reason is still showing the fill colour of the object that's supposed to be masking. Masking in Illustrator is quite intuitive (or, at least, I've become really accustomed to it) — You make a clipping mask, black objects within that mask hide and white objects reveal. So I can't really get my head around how this is working. I've also managed to actually do what I want to do by: – Creating a rectangle – Subtracting the doughnut vector from the rectangle – Using that as a clipping mask for the text layer But this is such a roundabout way that I must be missing something. Can anyone please advise? Quote Link to comment Share on other sites More sharing options...
Oidyuk Posted August 12, 2023 Share Posted August 12, 2023 Maybe I misunderstand what you are trying to do , but can you not just place the text below the image in the layer stack ? G-Bone420 1 Quote Link to comment Share on other sites More sharing options...
G-Bone420 Posted August 12, 2023 Author Share Posted August 12, 2023 16 minutes ago, Oidyuk said: Maybe I misunderstand what you are trying to do , but can you not just place the text below the image in the layer stack ? Ah, yeah the blue background is part of the image with the doughnut! So I'd then need to cut the doughnut out of the background image, and then put it above the text layer. Resulting in three layers when, as far as I understand it, I should only need two: a background image, and a text layer with a part hidden by a clipping mask. I've made a vector shape in the shape of the doughnut, and all I want to do is use that shape to hide part of the text layer: But when I try to do so: I end up with this: So it seems to me that I must be creating a mask wrong somehow 🤷♂️ Quote Link to comment Share on other sites More sharing options...
G-Bone420 Posted August 12, 2023 Author Share Posted August 12, 2023 Blue more like turquoise but not so relevant 😆 Quote Link to comment Share on other sites More sharing options...
G-Bone420 Posted August 12, 2023 Author Share Posted August 12, 2023 So it seems that this is possible, but only with a pixel-based mask in Pixel persona! You create a layer mask for the text layer, hop into pixel persona, and paint in black over the parts you want to hide. Is there a way to do this with vectors? Being able to paint is grand, but vectors often work a lot better for my workflow and I usually need to be able to easily re-edit them 😄 Thanks, George Quote Link to comment Share on other sites More sharing options...
Komatös Posted August 12, 2023 Share Posted August 12, 2023 Hi @George Moulos and welcome to the forums. No, because there are no vector masks. Since your donat is a pixel image, the easiest approach is to crop the donat and place it in front of a text layer. I have made an example. New Sweet (V2).afdesign approx. 33MB Quote MAC mini M4 | MacOS Sequoia 15.1.1 | 16 GB RAM | 256 GB SSD AMD Ryzen 7 5700X | INTEL Arc A770 LE 16 GB | 32 GB DDR4 3200MHz | Windows 11 Pro 24H2 (26100.2161) Affinity Suite V 2.5.6 & Beta 2.6 (latest) Interested in a free (selfhosted) PDF Solution? Have a look at Stirling PDF Ferengi Acquisition Rule No. 49: “A deal is a deal is a deal.” Link to comment Share on other sites More sharing options...
G-Bone420 Posted August 12, 2023 Author Share Posted August 12, 2023 Just now, Komatös said: Hi @George Moulos and welcome to the forums. No, because there are no vector masks. Since your donat is a pixel image, the easiest approach is to crop the donat and place it in front of a text layer. I have made an example. New Sweet (V2).afdesign approx. 33MB Vector masks should be easy considering vector clips and pixel masks already exist, don't you think? A vector mask is just an inverted vector clip, so this seems odd! Is there anywhere I can suggest this as a feature for an update? 🙂 Quote Link to comment Share on other sites More sharing options...
Brian_J Posted August 12, 2023 Share Posted August 12, 2023 @George Moulos In your original post, the Curve layer (donut shape) is clipped to the Text layer. Clipping produces the result that you got — the donut Curve layer is only visible in the area of the text. A Layer Mask is different than clipping. To add a vector mask, in the Layers panel, drag the mask shape onto the thumbnail of the target layer. Layer maskinghttps://affinity.help/designer2/en-US.lproj/pages/Layers/LayerMasks.html Layer clippinghttps://affinity.help/designer2/en-US.lproj/pages/Layers/layerClip.html A Layer Mask will produce results opposite of what you want to achieve — the text layer will only be visible in the donut shape. One option is to create a pixel selection of the donut vector shape and create a pixel mask on the text layer to hide it. G-Bone420 1 Quote Windows 10 22H2, 32GB RAM | Affinity Designer/Photo/Publisher 2 (MSI/EXE) Link to comment Share on other sites More sharing options...
lepr Posted August 12, 2023 Share Posted August 12, 2023 @George Moulos You initially clip-nested the black shape in the white text, and so the text clipped the shape and the shape became restricted by the boundary of the text. Then you created a stencil by subtracting the black shape from a filled rectangle and mask-nested the vector stencil in the white text, and so the stencil masked the text and the text became invisible where the mask had a hole, as required. Affinity unfortunately still has no feature for the user to specify a vector mask object behave as a stencil on the fly, and so the manually constructed stencil method is the way in Affinity if you need to maintain actual text in an exported file. If it is acceptable to have text converted to paths then simply subtract the black shape from the white text. Affinity also has non-destructive Boolean Compounds but note there is a bug when text is an operand: the Compound will be given no fill and stroke instead of automatically inheriting these attributes from the lowest operand, and so you would need to assign a white fill to the Compound. If rasterisation of the text in an export is acceptable, set the black shape's blend mode to Erase and clip-nest it in the text. Quote Link to comment Share on other sites More sharing options...
GarryP Posted August 13, 2023 Share Posted August 13, 2023 George Moulos: Is the thing I show in my attached video (basically) what you want to do? It is essentially a demonstration of some of what lepr said in the above post but with more details of the steps required. Note: When you are moving the text, make sure that Lock Children is ON so that the black pixel ‘masking’ layer stay where it is in relation to the background rather than moving with the 'parent' text. 2023-08-13 09-31-30.mp4 G-Bone420 1 Quote Link to comment Share on other sites More sharing options...
G-Bone420 Posted August 13, 2023 Author Share Posted August 13, 2023 2 minutes ago, GarryP said: George Moulos: Is the thing I show in my attached video (basically) what you want to do? It is essentially a demonstration of some of what lepr said in the above post but with more details of the steps required. Note: When you are moving the text, make sure that Lock Children is ON so that the black pixel ‘masking’ layer stay where it is in relation to the background rather than moving with the 'parent' text. 2023-08-13 09-31-30.mp4 Amazing! This is exactly what I wanted! I need to have text layers editable so that clients can request changes so really didn't want to have to rasterise the text layer each time, or have to create a bunch of unnecessary layers. Just a shame it's not possible to use vectors for masking because I often need to re-edit masks and having to paint them back in is a bit of a pain. But so it goes 🤷♂️ Thanks so much for this, Garry! Quote Link to comment Share on other sites More sharing options...
G-Bone420 Posted August 13, 2023 Author Share Posted August 13, 2023 3 minutes ago, George Moulos said: Amazing! This is exactly what I wanted! I need to have text layers editable so that clients can request changes so really didn't want to have to rasterise the text layer each time, or have to create a bunch of unnecessary layers. Just a shame it's not possible to use vectors for masking because I often need to re-edit masks and having to paint them back in is a bit of a pain. But so it goes 🤷♂️ Thanks so much for this, Garry! Oh! It IS possible with a vector – you have to set the blend mode to Erase! 🕺 Screen Recording 2023-08-13 at 09.53.49.mov Quote Link to comment Share on other sites More sharing options...
GarryP Posted August 13, 2023 Share Posted August 13, 2023 (edited) You’re welcome. It’s also worth noting that the black pixel ‘masking’ layer is still editable, like any other pixel layer, so that tweaks can be made at any time if the result isn’t exactly what is needed. It’s also also worth noting that, as lepr said above, by doing it this way, the text will always be rasterised upon export, to any file format. You can create the ‘masking’ layer using vector tools instead, as you have seen, but, because the technique uses a Blend Mode which isn’t Normal the Erase Blend Mode, rasterisation will still occur. Edited August 13, 2023 by GarryP Clarification. G-Bone420 1 Quote Link to comment Share on other sites More sharing options...
lepr Posted August 13, 2023 Share Posted August 13, 2023 8 minutes ago, GarryP said: as lepr said above I'm on George's ignore list, apparently G-Bone420 1 Quote Link to comment Share on other sites More sharing options...
G-Bone420 Posted August 13, 2023 Author Share Posted August 13, 2023 Just now, lepr said: I'm on George's ignore list, apparently Haha, sorry! I'd half responded and then got carried away with the other method aaaaaaand on closer look it also seems I didn't read the end of your post 🤦♂️ What export formats would this create issues for? I.e, if I'm trying to export to PDF? Quote Link to comment Share on other sites More sharing options...
GarryP Posted August 13, 2023 Share Posted August 13, 2023 (edited) 3 hours ago, George Moulos said: What export formats would this create issues for? As I said above, if you use a Blend Mode that is anything other than Normal the Erase Blend Mode, that layer and (possibly) its parent layers will be rasterised, every time, upon export to any file format. There’s no way of getting round this, it’s just what the software does for what I assume are various technical reasons. Whether that will be a problem for your output, only you can say. Edited August 13, 2023 by GarryP Clarification. G-Bone420 1 Quote Link to comment Share on other sites More sharing options...
lepr Posted August 13, 2023 Share Posted August 13, 2023 1 minute ago, George Moulos said: What export formats would this create issues for? I.e, if I'm trying to export to PDF? Unless an export format supports Erase blend mode, using Erase will result in rasterisation of everything that is having its opacity reduced by the erasing object. PDF certainly doesn't support Erase. G-Bone420 1 Quote Link to comment Share on other sites More sharing options...
lepr Posted August 13, 2023 Share Posted August 13, 2023 (edited) George, I gave you non-Erase solutions which will allow vector export in a PDF. Here is one using a Compound: sweet compound.afdesign (It uses a less detailed donut silhouette than the one you have created, but you'll get the idea.) Edited August 13, 2023 by lepr added example Quote Link to comment Share on other sites More sharing options...
lepr Posted August 13, 2023 Share Posted August 13, 2023 2 hours ago, GarryP said: As I said above, if you use a Blend Mode that is anything other than Normal, that layer and its parent layers will be rasterised, every time, upon export to any file format. That's incorrect. Affinity can export more than a dozen blend modes (but not Erase) to PDF (except some old PDF/X flavours) without falling back on rasterisation. GarryP 1 Quote Link to comment Share on other sites More sharing options...
G-Bone420 Posted August 13, 2023 Author Share Posted August 13, 2023 2 hours ago, lepr said: George, I gave you non-Erase solutions which will allow vector export in a PDF. Here is one using a Compound: sweet compound.afdesign (It uses a less detailed donut silhouette than the one you have created, but you'll get the idea.) Thanks for your help @lepr & @GarryP – I really appreciate it! (Would have replied sooner but I got a block message for having posted too many times? 🤷♂️) Quote Link to comment Share on other sites More sharing options...
GarryP Posted August 13, 2023 Share Posted August 13, 2023 13 minutes ago, lepr said: That's incorrect. Thanks. Fixed prior mistakes (in this thread at least). Quote Link to comment Share on other sites More sharing options...
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.