Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • EspaƱol
      • FranƧais
      • PortuguĆŖs
  • ę—„ęœ¬čŖžć‚³ćƒŸćƒ„ćƒ‹ćƒ†ć‚£
    Dedicated community for Japanese speakers
  • ķ•œźµ­ ģ»¤ė®¤ė‹ˆķ‹°
    Dedicated community for Korean speakers
0

Automate masking

Community Beginner ,
Feb 04, 2020 Feb 04, 2020

Copy link to clipboard

Copied

Hi, I have a specific question.
I need to compositing separate images. Every layers have a unique folder and a mask layer. All  the layers have the same name BPR_Render and BPR_Mask but different folder. I need to copy the mask from BPR_Mask layer to the folder. After this action I delete the BPR_Mask layer. I get as result only the BPR_Render at the uniqually named and masked folder.
I need to do this process with every folder.
I would like to automatize this process. But Action is not suited for this because I can't make a relative refferencing in actions.
How can I autamate this process? I would be very happy if someone could help me this problem.

TOPICS
Actions and scripting

Views

2.1K
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

correct answers 1 Correct answer

Community Expert , Feb 04, 2020 Feb 04, 2020

You want to put images into some document where did that document get into your work-flow. Is it a new document created the withe a canvas size size to house you the two image files your are going to put in the document.  How will they be positioned for the document composition they would most like need to have the same size canvas so the would align correctly. If you want to put image files in how will the process put the correct image file in. Action step settings are recorded in the action st

...

Votes

Translate
Adobe
Community Expert ,
Feb 04, 2020 Feb 04, 2020

Copy link to clipboard

Copied

Please clarify the Layer set-up with a screenshot. 

And what is the Ā»mask layerĀ« supposed to be exactly? If the file is RGB and this is a neutral Layer would you need to use the composite or one of the three RGB-Channels as a Layer Mask? 

 

Very probably this can be automated with a Script; are you familiar with JabaScript? 

Votes

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 Beginner ,
Feb 04, 2020 Feb 04, 2020

Copy link to clipboard

Copied

I belive so script would be help this. Hovewer I'm not familiar at all with javascripting sadly. 
The first picture show what I have. The second is what I just would like to aquire. I apologize for the misunderstanding. I should attach a picture what I would like to achive. 
image.pngimage.png

Votes

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 ,
Feb 05, 2020 Feb 05, 2020

Copy link to clipboard

Copied

I donā€™t think you answered this question yet: 

Would you need to use the composite or one of the three RGB-Channels as a Layer Mask? 

Votes

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 ,
Feb 04, 2020 Feb 04, 2020

Copy link to clipboard

Copied

I do not believe you will be able to automate Photoshop 3D rendering and masking in a batch Action or script.  3D layer are not like Smart Object layer where you can replace the smart object layer'e object content.   You can not replace 3D layers meshes. I have never see a Mockup template that use 3D layers that get replaced to update the mockup with a different design. Scripts can use logic to reference things relatively but I don't know how you would be able to automate 3D Layer rendering and masking changing lighting.

JJMack

Votes

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 Beginner ,
Feb 04, 2020 Feb 04, 2020

Copy link to clipboard

Copied

No that is a totaly simple 2D layers. Just I wrote the exact name like BPR_Render. So I think you missunderstand me. I'm sorry about that. I should explain more this simple problem. I already have rendered pictures, a diffuse render and a mask. Have a head a jaw a body etc. I just would like to put this fils to layers. I just would like to add a mask to the folder, and repeate this action. Becaus I need to do it manually with a lots of files. That is why I would like to find an automated process for this small action. 

Votes

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 ,
Feb 04, 2020 Feb 04, 2020

Copy link to clipboard

Copied

_

Votes

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 ,
Feb 04, 2020 Feb 04, 2020

Copy link to clipboard

Copied

I do not understand what you wrote put files Into Layers, add layer mask to group. What group how are the layers positioned in the document. Where in the layers stack etc  what you wrote is too vague IMO. Where did the document come from  that you want to put layers into a template perhaps. How many groups  does the document have. What is the relative logic for files. How many files are put into layers? If you do not know how to Script Photoshop you will need to do your processing manually.

JJMack

Votes

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 Beginner ,
Feb 04, 2020 Feb 04, 2020

Copy link to clipboard

Copied

Okay. I try again.
I have rendered pictures. A diffuse and a mask separately.
Screenshot_1.png
Because it is the same size and position I don't need to do anything with positioning and sizing.
A put this files to separate folders. This is a Body folder for example.
Screenshot_2.png
I would like to add the mask to the folder as a proper compositing software do, like Nuke.So the layer has the mask or alpha. 
Screenshot_3.png
I would like a solution to add the alpha render to the corresponding layer. Beacus if I made an action from that what I do manually, that will find the name of the folder. The same nam like body. But i have a folder named as head, legs etc. I can't made it to the "currently active folder" wiht photshop actions as far as I know.

Votes

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 ,
Feb 04, 2020 Feb 04, 2020

Copy link to clipboard

Copied

You want to use black and white information from existing layer to create layer mask which will be applied to layer group, is that correct?

It is doable using action but... do you have layers and groups always named with the same name? The problem can be, even if you have same amount of layers and only one group always, to select layer with black and white informations which you want to use for layer mask. If you have that layer inside layer group and layer group is collapsed then using keyboard shortcut to select layer above/next layer in action will select layer group instead of layer. If you do not understand does not matter just answer questions:

  • Do you always have layers in the same relative position in the Layers panel?
  • Do you have layers with the same names or layers and groups are differently named?

Votes

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 Beginner ,
Feb 04, 2020 Feb 04, 2020

Copy link to clipboard

Copied

Yes it is alway the same relative position. 
Layers have always the same name but different bodyparts. Like Body, legs, head etc.
The problem is, we use Zbrush. Render out the elments from zbrush ant this software can render only image and separatly the mask or alpha.
After this process I need to make this composition becaus 2D artist paint over the already rendered images. After in 3D department we get back this paint and made a lyout to work with further at 3D software. Basicly we built from this bodyparts digitaly like a papercut figure. That is why we rendered separatly the bodyparts.

Votes

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 ,
Feb 04, 2020 Feb 04, 2020

Copy link to clipboard

Copied

You want to put images into some document where did that document get into your work-flow. Is it a new document created the withe a canvas size size to house you the two image files your are going to put in the document.  How will they be positioned for the document composition they would most like need to have the same size canvas so the would align correctly. If you want to put image files in how will the process put the correct image file in. Action step settings are recorded in the action steps in you action, File names are recorded into in the step. The step will always address the same file.  Or save a file for the current document with  and default the file name to the current document name.  If you want to process files in a folder  or folders you need to use Automate Batch or an image processor script.  These Batch Processor Open files in photoshop an play your Batch actions process one file at at time not on file pairs. Or you need to Programs A Photoshop script which you do not know how to do. A script can process pairs if files.  To do a Batch Automate you need to automate the all the processing that need to be done.  I do not understand why you created two image file to begin with where the second image is a black and white or gray scale image the you want to turn into a layer mask for the first image you created why did you not simply mask the first image you created instead of creating a second image file. why are you crating a layer group and masking it when there will be only a single layer in the layer group like your screen capture shows.  Perhaps if you describe what you are trying to automate better someone can help you design a work-flow process the can be automated with a batch action.  Batch actions normal process a single document at a time they may add the same file into each document in the process process.  Batch action can not add files with different names for  the current document relative to the document name or layer names. Action can only test a few document and layer conditions Action conditional steps.  The kind of logic you want to use in your processing would require Photoshop scripting.

JJMack

Votes

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 Beginner ,
Feb 04, 2020 Feb 04, 2020

Copy link to clipboard

Copied

Thank you for your answer. Now is clear for me there is no way to do it without script. The workflow have some limitations. 3D department made this renders from Zbrush. Zbrush just make only image render and separate the alpha or mask as a different black and white image. This files is needed to organize this fashion, because the 2D artists paint over the existing renders. And they use various layers trough their work.  

Votes

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 ,
Feb 04, 2020 Feb 04, 2020

Copy link to clipboard

Copied

This looks like it can be automated, perhaps with an action+helper-script or with a full script.

 

It would be good if you can provide a download link to say 3 PSD files with layers and layer sets exactly the same as used in your project. These can be reduced in size/resolution as it is not so much about the quality of the image, but working with the layer structure and looking for consistency etc.

Votes

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 Beginner ,
Feb 05, 2020 Feb 05, 2020

Copy link to clipboard

Copied

Thank you very much your answer. Sadly I can't provide this files. We have wery strict rules in the company about what kind of source materials we can giv out from Gameloft. I will ask a tech artist here to program this script.  Now I tried to investigate the posibilities. I hoped we can solve this problem with an action inside Photshop. Now Is clear a simple artist without scripting knowledge is not possible.

Votes

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 ,
Feb 05, 2020 Feb 05, 2020

Copy link to clipboard

Copied

LATEST

Screenshots would do, in a pinch, it is not that I don't trust you, however from previous experience, oftentimes the examples posted on the forum don't match the real files and a whole lot of time is wasted by those helping as they write a custom solution for a poorly advertised problem.

Votes

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