Jump to content
You must now use your email address to sign in [click for more info] ×

How do I paste into layer mask?


Recommended Posts

Maybe it's just me but I don't know how to paste  B&W image into layer mask?

 

I use KeyShot to render our models, and keyshot can render image and it's mask image separately into two different image files. I need to create mask image file and paste it into mask in the Affinity Photo. This is an easy task as copy paste in photoshop, but can't get it working in Affinity Photo. 

 

Any suggestions?

Link to comment
Share on other sites

  • Staff

Hi PrimozRome,

Welcome to Affinity Forums :)

Select the black and white image/layer and go to menu Layer ▸ Rasterise To Mask. You can then attach/nest it to the image/render by dragging it over the image/render's thumbnail until a blue vertical marker appear (in the Layers panel).

Link to comment
Share on other sites

  • 3 years later...

I regularly want to copy the background image into the mask, and edit it there .. in Photoshop it's copy and paste, as the OP says .. then you can look at the mask and edit it with any normal editing tool .. curves, levels, paintbrush ..
I actually can't follow your explanation above in response to the OP.. At all. Can you describe in simple, straighforward steps, how to do what I am trying to do? Yes, I have watched the tutorials, and if you can direct me to one that shows how to do this, I will happily put the time in on studying it.

Link to comment
Share on other sites

27 minutes ago, Haitch said:

Thank you. I'll have a go at that. But it seems a very roundabout way of achieving something that is so quick and simple in PS.

Well, it's just the way it is . Affinity Photo has not the intention to be a Photoshop replacement !!

 

Affinity Photo  2.3.1

Laptop MSI Prestige PS42
Windows 11 Home 23H2 (Build 22631.3007) - Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz   2.00 GHz - RAM 16,0 GB

 

 
Link to comment
Share on other sites

Affinity's market pitch aside ...

Thanks for the step through .. I'm able to do that. I have two basic problems .. first, how to create an action that can carry out that process of mask creation for me, given that it seems to depend on dragging the duplicate background layer into the mask ..

and second, how do you adjust the mask using normal editing tools, like curves and levels? your method seems to rely on editing the duplicate background layer before using it to create the mask .. I routinely want to be able to adjust the mask after creating it. I can invert it, paint into it .. but can't see how to adjust it.

If you can help with either of those, that would be appreciated

Link to comment
Share on other sites

2 hours ago, Haitch said:

Affinity's market pitch aside ...

Thanks for the step through .. I'm able to do that. I have two basic problems .. first, how to create an action that can carry out that process of mask creation for me, given that it seems to depend on dragging the duplicate background layer into the mask ..

and second, how do you adjust the mask using normal editing tools, like curves and levels? your method seems to rely on editing the duplicate background layer before using it to create the mask .. I routinely want to be able to adjust the mask after creating it. I can invert it, paint into it .. but can't see how to adjust it.

If you can help with either of those, that would be appreciated

See your other post HERE

Affinity Photo 2.4..; Affinity Designer 2.4..; Affinity Publisher 2.4..; Affinity2 Beta versions. Affinity Photo,Designer 1.10.6.1605 Win10 Home Version:21H2, Build: 19044.1766: Intel(R) Core(TM) i7-5820K CPU @ 3.30GHz, 3301 Mhz, 6 Core(s), 12 Logical Processor(s);32GB Ram, Nvidia GTX 3070, 3-Internal HDD (1 Crucial MX5000 1TB, 1-Crucial MX5000 500GB, 1-WD 1 TB), 4 External HDD

Link to comment
Share on other sites

  • 1 year later...
On 8/3/2019 at 5:17 PM, Haitch said:

Thank you. I'll have a go at that. But it seems a very roundabout way of achieving something that is so quick and simple in PS.

I totally agree! I've been dabbling around with AP for months now and I really and honestly want to use it instead of Photoshop, but it's just driving me nuts every time when it comes to masking and editing masks (especially when you want to paste something into a mask). The process in AP to me is absolutely counter-intuitive and unnecessarily complicated. The whole clipping and masking business is disturbingly confusing in all the Affinity apps once you want to do something that's a bit more advanced than the simple basic stuff.

I don't think that making things different from the almighty competitor just for difference's sake is beneficial to the struggling users (and of all: switchers). You have to admit – however grudgingly – that the guys at Adobe did some things right in Photoshop (and in Illustrator and InDesign as well).

Link to comment
Share on other sites

On 8/4/2019 at 3:52 AM, Ron P. said:

and second, how do you adjust the mask using normal editing tools, like curves and levels? your method seems to rely on editing the duplicate background layer before using it to create the mask .. I routinely want to be able to adjust the mask after creating it. I can invert it, paint into it .. but can't see how to adjust it.

Exactly!!! Right at this moment I'm seemingly unable to adjust my mask's tones by simply making a Levels adjustment (which is no difficulty whatsoever in PS) or using Curves. In AP it just doesn't seem possible and I cannot see why this should be so, when I – just as Ron P. wrote – can paint into it and even invert it which all is actually nothing different than modifying the tones within the mask as a whole or in certain areas.

It seems to me that beeing able to control an finetune the grey values in a given mask in order to change the transparency of a masked object or layer is absolutel essential tro the whole business of masking.

Edited by Lorox
typo
Link to comment
Share on other sites

@Lorox .. Thank you!

Have been hoping for months to hear from Affinity that they've implemented raster masking. Can't for the life in me see why they couldn't create an option to use either alpha or raster masking .. surely not technically difficult.

I'm afraid this has killed Affinity for me. Don't even have it on current PC. But would love to be able to switch from PS.

Link to comment
Share on other sites

  • Staff

Hi Lorox, Haitch,
If you want to create luminosity mask from a pixel layer press cmd+alt (macOS) and click the pixel image thumbnail in the Layers panel, then press the Mask Layer button on the bottom of the layers panel. Same if you want to create a mask from an existing selection - just click the Mask Layer button on the bottom of the layers panel (you can also oress the Refine button in the context toolbar with one of the selection tools selected if you need to refine the selection first. To control/edit a mask using a Curves or Levels adjustment, nest it to the mask layer (dragging it over the thumbnail of the mask layer), then change the Channel to Alpha in the respective Curve/Levels adjustment dialog.

Link to comment
Share on other sites

Thanks, MEB .. but for those of us who work in a more painterly way with masks, you're making our point for us.

Our main point isn't that it's impossible to achieve the same result, just that it's a complex and indirect method compared to PS. Secondarily, I still don't see how your approach allows selective work on the mask. How, for instance, with your method, would you edit a mask using levels or curves, then use the history tool to paint those changes selectively into the mask .. something I do all the time in PS. Obviously I don't use colour-related tools on the mask, but I use just about everything else on mask layers, and almost always not applying the edits to the whole mask. I appreciate that there's always a balance between left-brain and right-brain processes .. the point is that Affinity imposes a very programmatic, left-brain approach, which feels heavy-handed for some of us, and which is also slower than the approach that PS allows. Why would I go with a program that makes the editing process slower and less intuitive?  Affinity is great for people who like to work the way that Affinity imposes, but for those of us whose basic approach to image editing does not comply, it's a struggle.

I can't believe that this is a technical issue. PS had this aspect of masking well worked out from very early days. I don't understand why Affinity wouldn't offer raster masks as an option when they're central to how many photographers work. When Affinity has a change of heart on this, I'll come back to it with rejoicing, until then, I'm out.

Link to comment
Share on other sites

@Haitch

You can edit masks as if they were pixel layers, but it takes a couple of extra steps, unfortunately.  That's how life works sometimes.

When you create a mask, the Channels panel will display the thumbnail of the Mask Alpha if you select the mask in the Layers panel.  Just right-click on the Mask Alpha channel and select the "Create Grayscale Layer" from the contextual menu that pops up.  A new grayscale pixel layer will be created in the Layers panel that you can adjust will all of the image editing tools, adjustment layers, etc. that can be applied to any pixel layer.  Once you are satisfied with your adjustments to the pixel layer that you want to use as a mask, right-click on it in the Layers panel and select "Rasterize to Mask" and then nest that converted mask layer into the layer that you intend to mask (you will have to delete the previous mask that was nested in that layer).  If you need to adjust the mask further, just repeat the process.

So, in your example where you like to use the background image as a starting point for a mask - 

0) Create an adjustment layer above the background - make it something obvious, like an HSL layer with settings that make the effect obvious when applied to the background (like Saturation Shift set to -100) - hide the layer for now (turn it off so its effect is not visible).  This layer is just a test layer so that you can apply your mask to it and see the results as you edit the mask.

1) Duplicate the background layer.

2) Right-click on the duplicate layer and select "Rasterize to Mask" - nest the newly created mask into the HSL layer and make the HSL layer visible to see its effect, modulated by the luminosity mask created from the background image.  In this example, if you set the HSL Shift adjustment layer Saturation Shift to -100, then areas in the original image that are shadows will retain their original saturation (i.e., the mask is black and the HSL adjustment has no effect) and highlight areas will be completely desaturated (the mask is white and the HSL adjustment has 100% effect).

3) At this point, if all you need to do is paint on the mask with a regular paint brush, then Opt-click (Mac) or Alt-click (PC) on the Mask layer and the grayscale mask will appear and be available for painting.  I have found that the brush only paints in "Normal" blend mode (that is, you cannot do things like define edges using Overlay blend mode with the paint brush while painting on a mask).

4) If you need to make adjustments, for example adding contrast or choking a mask with a Levels adjustment, then, with the Mask layer selected in the Layers panel, go to the Channels panel and right-click on the Mask Alpha channel and select "Create Grayscale Layer" - this will create a new grayscale pixel layer of the mask that you can edit will all of the AP pixel editing tools and adjustment layers.

5) When you are finished your editing, right-click on the grayscale pixel layer that you want to transform into a mask and select "Rasterize to Mask" - this step will rasterize all of the adjustments (adjustment layers, etc) that you used to edit the pixel layer and convert the pixel layer to a mask layer.  Then drag the new mask layer and nest it into the HSL layer and delete the previous mask.

Etc.  One thing to be aware of - adjustment layers have their own mask already built into the adjustment layer.  If, in the above example, you click on the HSL Shift adjustment layer, you will see a channel called HSL Shift Adjustment Layer.  This alpha layer is different than the mask alpha layer that you added to the HSL layer.  You can right-click on this one too and make it a grayscale layer if you choose, giving you two masks to manipulate without having to use the PS hack of creating a group out of a single layer to add an additional mask.

The process is a little kludgey compared to Photoshop's masking approach, but it really does not take that much more effort once you understand how to access and work with masks in AP.  As a side benefit, it preserves the previous mask (in the Mask Alpha that you used to create the new grayscale layer that you are currently editing) in case you need to start over from the previous mask.

AP is different than PS and there are probably reasons why the designers implemented masking this way - maybe you will find that AP's method for masking will create new opportunities for your workflow.  I hope this explanation is helpful.

Kirk

Link to comment
Share on other sites

2 hours ago, MEB said:

To control/edit a mask using a Curves or Levels adjustment, nest it to the mask layer (dragging it over the thumbnail of the mask layer), then change the Channel to Alpha in the respective Curve/Levels adjustment dialog.

Thanks a lot, MEB! This really works and I possibly would never have found this out by myself, especially that last part about changing the channel to Alpha in the adjustment's dialog.
So you can actually see "live" the effect your adjustment makes to the visibility of the layer or object you're masking, which at least is reassuring. I was really afraid you'd possibly have to go to and fro with grayscale layers turned into masks and back after any adjustments...

BTW: when once you have "rasterized" a grayscale layer to a mask – can you actually turn that mask back into a regular grayscale layer at all? With all my trial and error this morning I seemed not be able to achieve this.

Link to comment
Share on other sites

1 minute ago, Lorox said:

BTW: when once you have "rasterized" a grayscale layer to a mask – can you actually turn that mask back into a regular grayscale layer at all? With all my trial and error this morning I seemed not be able to achieve this.

Kirk addressed this point in the post just above yours:

1 hour ago, kirkt said:

4) If you need to make adjustments, for example adding contrast or choking a mask with a Levels adjustment, then, with the Mask layer selected in the Layers panel, go to the Channels panel and right-click on the Mask Alpha channel and select "Create Grayscale Layer" - this will create a new grayscale pixel layer of the mask that you can edit will all of the AP pixel editing tools and adjustment layers.

 

Alfred spacer.png
Affinity Designer/Photo/Publisher 2 for Windows • Windows 10 Home/Pro
Affinity Designer/Photo/Publisher 2 for iPad • iPadOS 17.4.1 (iPad 7th gen)

Link to comment
Share on other sites

5 minutes ago, Alfred said:

Kirk addressed this point in the post just above yours:

 

Ah, sorry, that escaped me – possibly because it all seemed so complicated... With MEB's explanation of how to alter the tones of mask layers with adjustments (selecting "Alpha" for the channel in the adjustment's dialog) it doesn't seem so important anymore anyway... But thanks, nevertheless!

Link to comment
Share on other sites

3 hours ago, MEB said:

If you want to create luminosity mask from a pixel layer press cmd+alt (macOS) and click the pixel image thumbnail in the Layers panel, then press the Mask Layer button on the bottom of the layers panel.

So... I did this and got the mask! I also assigned an adjustment to this mask (so it appears nested to that mask layer in the Layers palette) and using "Alpha" as the adjustment's channel my settings of the adjustment are reflected in the transparency of all(!) the layers below as you'd expect.

BUT:
as soon as I drag that mask layer (with its nested adjustment) to the thumbnail of the layer I specifically want to mask (as opposed to ALL layers below the mask) my nested adjustment just disappears! What is going on here? Is this how it should be?

However, if I drag the mask layer (with its nested adjustment) onto the layer's name (meaning the layer I want to apply the masking to) the nested adjustment stays with it (and can be edited as desired afterwards). And the masking is obviously constrained the desired layer. That's actually what I was looking for...

BUT:
What exactly is different with those 2 ways of dragging the mask with its (own) adjustment? There must be something with this masking/clipping business that I just can't get my head around... Am I just spoiled by all those years of Photoshop (where masking always seemed so easy to understand) or is Affinity's take on masking really that ”oblique“ that it keeps puzzling me again and again?

Link to comment
Share on other sites

  • 2 months later...
On 8/4/2019 at 1:37 AM, HVDB Photography said:

Well, it's just the way it is . Affinity Photo has not the intention to be a Photoshop replacement !!

That's fine, if you can do the job better, but if you're roughly copying a feature/capability you should make it at least as fast/easy to use. Since a lot of people are trying to switch from PShop to Affinity it makes sense to follow what's been done before at the very least, and maybe find ways to improve it. Even little things in Photo vs Photoshop are cumbersome, like having to use a menu to make a selection from a channel (whereas in Photoshop you can just right-click a channel to load a selection). 

Windows 7 & 10 64-bit, Dual Xeon workstation(s) 64gb RAM, and single i7 laptop 32gb RAM

Link to comment
Share on other sites

1 hour ago, AndyQ said:

That's fine, if you can do the job better, but if you're roughly copying a feature/capability you should make it at least as fast/easy to use. Since a lot of people are trying to switch from PShop to Affinity it makes sense to follow what's been done before at the very least, and maybe find ways to improve it. Even little things in Photo vs Photoshop are cumbersome, like having to use a menu to make a selection from a channel (whereas in Photoshop you can just right-click a channel to load a selection). 

Exactly! I often find myself quite impressed with what you can do in Affinity Photo (same in Designer and Publisher BTW) but at the same time I'm often sort of turned off midway in a job by  the clumsy and uncomfortable way to get these things actually done within the apps. The Affinity apps regrettably – in several aspects – still lack an "elegant" and intuitive ergonomic concept. Especially Photoshop, however, has developed and refined this approach quite convincingly over the (long) years it has been on the scene.

To really compete with the Adobe apps it's not sufficient for the Affinity apps to just let the user come up finally with (about) the same results he'd get using Photoshop & Co. but he must be able to get there by a workflow that's at least as easy and convincingly ergonomic as it is with the (still) market leader. Having to go to two places in the menus and one place in the control bar and/or context menu to get something done, what the rival makes possible with just a click (OK: maybe with some additional modifier key...) won't do the trick eventually.

I REALLY do want to make the transition and I'm absolutely thankful to Affinity/Serif for having taken up the challenge. I actually admire what they've achieved so far, but PLEASE keep on working on the ergonomics of the apps to make the users enjoy what they're doing in the most satisfying way!

Link to comment
Share on other sites

+1 each to Andy & Lorox. Exactly.

I am still persevering .. occasionally .. but the workflow / usability / directness is the big hurdle. Affinity Photo will stand or fall by whether or not it can be an alternative to Photoshop. Enjoyment, Lorox's word, really is important. When you feel you're constantly fighting the app, you lose that.

As Lorox says, Photoshop has evolved. Often simple things, like adding a Vibrancy tool, which simply wasn't there in earlier versions, have made a huge practical difference. Sure, you could achieve the same results with HSL and maybe a tweak of Curves, but for some things it just made it quicker and easier. That philosophy needs to cascade through a swathe of Affinity tools .. even the Curves adjustment is clumsy compared to Photoshop, and there could hardly be a more basic tool.

Link to comment
Share on other sites

12 hours ago, Haitch said:

I am still persevering .. occasionally .. but the workflow / usability / directness is the big hurdle.

I've been working for two days now on a job that i would have finished in an hour on Photoshop, but am forcing myself to stick with Affinity Photo to learn how to achieve the same goals. It's like some kind of cryptic puzzle game, like playing Myst, trying to figure out how to get something supposedly simple done, like opening a door but it doesn't have a handle or swing freely. I've now got a lovely mask that isolates some trees, applied to some layer effects.  I just want to get the pixel data out of that mask and paste it into a Live Filter mask. Half an hour later I'm still trying. I can't even figure out how to convert a mask to a pixel layer.  It would really help if masks weren't treated as being different to any other pixel layer - they should just be greyscale images that you can move between being masks and visible images based on their positioning in the hierarchy. Also, why the "inbuilt masks" for Live Filters and adjustment layers? Why have a different approach for these to pixel layers? I'd be tearing my hair out if I hadn't just shaved it off....

[UPDATE #1] I didn't figure out how to paste greyscale pixel data into the Live Filter mask, but I did manage to add a mask to it by pulling the Live Filter out of its nested position, dragging a copy of the mask to it (masking the effect), then dragging the Live Filter back to it's original position in the hierarchy.  Is there a better way? Am I missing something or do I get bonus points for solving this particular puzzle? The shirty thing is that I won't be using Photo again for a month or so and will have forgotten everything I've learned by the time I get back to it...

[UPDATE #2] I also found how to make a greyscale pixel layer from a mask thanks to MEB's post on thread https://forum.affinity.serif.com/index.php?/topic/47033-converting-mask-to-pixel-layer/ which says: "Go to the Channels panel, right-click the respective mask channel and select Create Greyscale Layer.". Therefore, with this roundabout way, you can "paste data" into a mask by making a pixel layer copy of it, doing whatever you want with that then converting it to a mask and replacing the original mask.... (again, I might be missing some easier way..)

 

Windows 7 & 10 64-bit, Dual Xeon workstation(s) 64gb RAM, and single i7 laptop 32gb RAM

Link to comment
Share on other sites

21 hours ago, Haitch said:

I am still persevering .. occasionally .. but the workflow / usability / directness is the big hurdle.

It's like that. With the problem described AndyQ seems to back our feelings/impressions perfectly: after some time anybody working in pixel graphics will have realized that pixel masks ARE in fact just grayscale images applied in certain way to select corresponding pixels (meaning those having the same 2D position on the canvas) and allow to do certain things to them (i.e. adjusting their opacity etc.).
This given it seems only natural that masks should be editable just like any other grayscale image (including copying, pasting, painting in it, filtering it etc.) once you have them as the contents of your active window.

In Photoshop this is very much the case once you know how to make the mask content visible as the actual content of your active window. It doesn't take more than just going to the channels panel and clicking on the mask's channel – there you go and it's easy and intuitive. And turning the mask's content to a selection which you then can use in any pixel layer, adjustment layer, channel or other mask of your file is just one more click away...

In Affinity Photo this whole "field" of channels masks, selections and pixel layers is generally organized in such a "fragmented" approach that it becomes ”cryptic" as no obvious logic becomes apparent: so it becomes hard to understand and cumbersome to use. In effect you experience exactly what AndyQ said: you spend a day on a job which you could have finished in an hour with Photoshop. And true: as the way of achieving comparatively simple thing is so unnecessary complicated you're prone to have forgotten at least half of it of it by the time you have to work on the next job needing this a month later.

Please, to all you developers at Serif: I guess there are quite a number of guys here among us who REALLY WANT to work with your apps, who REALLY WANT you to succeed long term on the market. The workflow must become smoother, more unified and necessary actions for closely related goals should not be scattered over different places in the UI. I'd think in the end it just has to be at least as efficient as it is with those applications you – rightly – chose to challenge. Let's be honest: there may actually be a limit to the time professional users can afford to spend with Affinity Photo or Designer on jobs they could have finished in a fraction of the time needed if they had just reverted– however much loathingly – to Photoshop and Illustrator.

Link to comment
Share on other sites

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.