Saving layer opacity as targa alpha.

MH
Posted By
Mark_Heyworth
Oct 19, 2005
Views
1255
Replies
5
Status
Closed
I have an image open in photoshop which has a number of layers, each of which has a different opacity setting. The contents of each layer only cover a part of the image. I want to preserve the opacity settings for each layer as transparency and save the document as a targa. Do I have to go through each layer and create an alpha channel myself or is there some way to get photoshop to recognise the opacity as if it were layer transparency and save it as the alpha channel of the targa?
Thanks for you help!
Mark

MacBook Pro 16” Mockups 🔥

– in 4 materials (clay versions included)

– 12 scenes

– 48 MacBook Pro 16″ mockups

– 6000 x 4500 px

SP
Scott_Perkins
Oct 19, 2005
The easiest way would be to duplicate each layer and then merge the duplicates together. This insures that the alpha channel will account for any drop shadows or layer effects, etc. Then, control+click the merged layer’s thumbnail and save the selection. Targa files can only have one alpha channel. Then feel free to hide or delete the merged layer.

One more important thing… don’t leave your background transparent when saving a targa with an alpha channel. If you do, the transparency will default to white and then the alpha channel will cause white halos around everything and you won’t be happy. If there are drop shadows and such in the image, fill the background with the same drop shadow color. For most other situations not involving such layer effects, filling the background with black works 99% of the time.

Hope that helps.
MH
Mark_Heyworth
Oct 26, 2005
Well, thanks for that, it does work, although it seems like a long winded way of doing things, especially as I will have to do it a lot in the project I’m working on, it seems like there should be a way to save a file where photoshop just takes the colour and transparancy of each pixel in the image as it appears. Surely if it is displaying something on the screen with an RGB value of XYZ, and an alpha value of W, it should just be able to write that data straight to file somehow.
SP
Scott_Perkins
Oct 26, 2005
Hi, Mark.

You’re right… it can be a little long winded. It might help if you create the layers in groups/sets. That way you can just duplicate the group and then merge the group together and control+click that to get the selection.

Another thing that might work better… you could create your image as you have been. Then when you’re happy with it just make sure that only the layers with transparency are visible. Go to the edit menu and select copy merged. Create a new image the same size as your other one. Fill the background layer with whatever color you need, then hit paste. A merged copy of your transparent layers will appear on its own layer. Control+click that layer’s thumbnail and save the selection. Save the file as your targa.

The best part is you should easily be able to set up an action to do all this at the press of a button. You would get your targa file with the proper alpha and you would still have the PSD file to edit if any changes were needed.
MR
Mark_Reynolds
Oct 27, 2005
Yes Scott it is long winded but if you have a multiple layer file actions are you answer. You can make an F key action to

1 create a new blank layer
2 move it (using control left bracket) BELOW the target layer 3 move the focus to the target layer above (alt right bracket) 4 merge down (control E)
5 Load layer transparency
6 Save as alpha if you need

The action when quickly applied to each layer in turn will "hardwire" all the transparency meaning that although your layers are now all at 100% their transparency will be preserved.

This bit is quite complex to explain but here we go … you can turn the above action into a sub-routine so that a single action could render a whole layered document in this way with one step. This would be done with Alt right bracket and then playing the above action. just duplicate these two steps many times.

This then enables you to freely choose which layers to take into your targa. Im sure theres a way to automate the whole thing
SP
Scott_Perkins
Oct 28, 2005
Yep, that would be another good way to automate it.

MacBook Pro 16” Mockups 🔥

– in 4 materials (clay versions included)

– 12 scenes

– 48 MacBook Pro 16″ mockups

– 6000 x 4500 px

Related Discussion Topics

Nice and short text about related topics in discussion sections