How do I save and re-use any kind of mask so that it can be applied to a smart object in any file?

Contributor ,
Sep 16, 2022 Sep 16, 2022

Copy link to clipboard

Copied

I try to not save layer masks as PNG, as I am looking for a generic way to re-use masks, not only masks with transparency / PNG / alpha channel masks, but all kinds of layer masks, even including SVG masks. All kind of masks.

It should be handy for the purpose of building actions.

If I use the mask from the channels, it will create a new layer, but I don't want that.

I just want to apply a saved mask (any kind of mask) to a smart object.

I suppose I have to save it as a PSB file in order to that, but that will also create a layer, that I don't want.

I just want to apply a saved mask to an existing smart object (layer).

I want to be able to paste the layer mask from file just like I paste it from the clipboard.

I can paste the mask from the clipboard, but I want to paste it from file or from a PS menu where it's stored, so that actions can be built any time.

 

 

 

TOPICS
Windows

Views

156

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 16, 2022 Sep 16, 2022

Copy link to clipboard

Copied

Masks are generally image-specific, so your target image would need to be the same pixel dimensions and have the same content for the mask to precisely fit.

 

Can you provide say 3 sample masks and 2 sample images to better illustrate your request?

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Sep 17, 2022 Sep 17, 2022

Copy link to clipboard

Copied

This is the effect in question, containing the layer mask.

This mask seems to be a PNG image with transparency (even though it doesn't say anywhere that is a PNG when looking at the mask), so its size should be possible to be adjusted to my target image after pasting the mask, without issues - trying to find a "fit mask to layer or to image" shortcut.

I make a smart object out of my target image, then I create a mask (that will be a full white mask by default), then Alt + click it to select it, then paste the mask that I selected and copied from the effect PSD file.

But I want to be able to insert this mask into my actions that I record anytime from the menu, or apply them as an effect anytime in on ongoing workflow, without the need to open additional files and copy/paste them from there, and without creating a new layer (because that is getting recorded in the action as an unnecessary bulk that needs to be removed later and the removal is also getting recorded by the action).

Just like patterns and brushes, I should be able to re-use and apply my masks anytime from my menu.

And further suggestions to how to do that are very welcome, thanks.

 

How do I store a layer mask so that it will be available from my PS menu?

Channels seem to be something specific for a file, so that is not good.

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 17, 2022 Sep 17, 2022

Copy link to clipboard

Copied

This effect does a lot more than just use a layer mask. There is also a gradient map and a "grunge" noise blend layer stack in addition to the layer mask.

 

So, is it just the layer mask (which in this case is generic enough to be used on any image), or do you also want the grain from the blend layer?

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Sep 22, 2022 Sep 22, 2022

Copy link to clipboard

Copied

I want to save the effects from PSD files both as an all-in-one action, and also separately each as an action, if it cannot applied in other way, separately.

For example I don't know of a "Layer Masks" effect section in PS so if I want to save that layer mask separately from the PSD to be used as a standalone effect, I think I must create an action that applies that mask.

But how do you store the mask in an action?

I thought that the action recorder would grab the mask once pasted, and store it in the action file, and link it.

But it won't store it and link it, not from a PSB or PSD file, nor from the clipboard.

How do actions store the resources that are necessary to run the action, and where?

I see actions as executable zip files that store all the resources but I am not sure that is how it works.

But actions seem to be existed from the very first versions of PhotoShop from the early nineties, so why deliver effects as PSD files then? I think they should be delivered / sold as actions. But if I want to use the grunge effect instead of the mask, separately, maybe I don't need an action for the grunge because it could be stored as a texture or other type of standalone effect available from the PS menu?

What about the gradient map preset?

Do I need an action to re-use it as standalone effect? I think that could be used as a preset gradient map, saved to the gradients instead?

But the main question is how to get the ation stored the assets that were pasted from the clipboard as layers into the action while recording?

I built the action by copy pasting layers from the PSD and / or copy pasting the mask itself, but the action cannot see those assets when it's being run, so where are actions supposed to save them and how?

 

 

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 24, 2022 Sep 24, 2022

Copy link to clipboard

Copied

One possibility is to store the mask/texture as a pattern, then record filling with the pattern.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Sep 24, 2022 Sep 24, 2022

Copy link to clipboard

Copied

Thanks.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Sep 24, 2022 Sep 24, 2022

Copy link to clipboard

Copied

Can you advise how to store the mask as a pattern?

In this video:

How to Save a Layer Mask as a Separate File in Photoshop for use in the Future – Martin Belan

will the mask be saved as a PSB file?

He just says save it but does not say the extension or format.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 24, 2022 Sep 24, 2022

Copy link to clipboard

Copied

Info on defining a pattern:

 

https://helpx.adobe.com/au/photoshop/using/creating-patterns.html

 

Patterns are not really designed for a single high-resolution image, they are intended for seamlessly repeating patterns of smaller "tiles", so it may just be better to record the placing or opening/copy/pasting the data from a saved file than to use a pattern.

 

As for the link to saving the mask as a file, the file format is "almost irrelevant" which is probably why it wasn't mentioned. The format has to support grayscale mode or just use RGB and ideally wouldn't introduce compression artefacts. So either PSD or PSB depending on pixel dimensions should be fine.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Sep 25, 2022 Sep 25, 2022

Copy link to clipboard

Copied

Thanks.

This free painting action uses lots of masks:

Painterly

Does this action create the masks on the fly or they are stored in the action?

 

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 25, 2022 Sep 25, 2022

Copy link to clipboard

Copied

The former.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
15 hours ago 15 hours ago

Copy link to clipboard

Copied

I see, so people don't actually store pre-made masks in the actions.

That is why I tried to save the mask from the PSD file into the action because I have seen that this action also "has" masks, lots of them.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
13 hours ago 13 hours ago

Copy link to clipboard

Copied

LATEST

You can set action playback to step by step and watch what takes place. You could ctrl/cmd double click each action step to manually walk through the action to see what is taking place.You can view the history steps or turn on logging to see what takes place. You can expand or double click or re-record action steps to see what they are doing. Or you can save the action steps as plain text or json code to evaluate what the action is doing. In a similar approach the action can be converted to javascript to see what it is doing. 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines