: Handle a transparent layer in Targa file I need to create some Targa file in order to load them in OpenGL (I can only use .tga ..). I created my images on Photoshop, I set a transparent
I need to create some Targa file in order to load them in OpenGL (I can only use .tga ..). I created my images on Photoshop, I set a transparent background but when I save my file it's totaly opaque.
The black layer is at 98% opacity
How can I handle transparent layer with Targa file in Photoshop ?
Thanks for your help !
EDIT :
More posts by @Nickens508
3 Comments
Sorted by latest first Latest Oldest Best
If you select 32 bit per pixel, then the alpha channel is included. You can then use that as your layer mask if you are planning on reimporting to photoshop to test the file. Other apps can use the alpha without doing anything.
Open your file in Photoshop.
Go to the Channels window and press the small button at the upper right and press New channel. An alpha channel will appear.
Select the new alpha channel and make the mask for anything that should get trimmed or get dimmed. Save the file as 32 bit tga. (24 bit don't support the alpha channel). The procedure is for the Photoshop version CS2.
The Targa file format doesn't store transparency in the same way as formats such as png so it needs to have an alpha channel which is a component of an image which describes how transparent each pixel is, with transparent being 100% black and opaque being 100% white and anything in between is semi-transparent.
To make an alpha channel from the standard transparency, you can do the following.
Note: This is how it's done in windows as I'm not too familiar with Mac so I have avoided shortcuts where possible.
Right click on the image layer's thumbnail and choose "Select Pixels".
Go to the channels tab and click "Save selection as channel"() at the bottom of the channels panel.
Make sure you save the tga with the 32 bits/pixel resolution option to save it with the alpha channel.
When the file is saved as a tga and opened again in Photoshop, it will look opaque, but the alpha channel is still there so the inverse of the the process above is the following.
Duplicate the background layer and delete it because it can't have transparency.
Go to the channels panel and click on the alpha channel.
Click "Load channel as selection"() at the bottom of the channels panel and click on the RGB channel.
Go back to the layers panel and invert the selected area by going to Select->Inverse. you might get a warning but it's fine.
Delete the selection and deselect everything by going to Select->Deselect and what remains is the image with the transparency showing.
There are other methods of doing this, but this one seems fairly simple.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.