Advertisement

Alpha channel in Photoshop

Started by February 19, 2010 12:14 AM
3 comments, last by larvantholos 14 years, 10 months ago
Hi, forgive the noobish question but I'm a programmer not an artist. I'm using Photoshop CS4 and I want to create a simple 2D texture with a transparent background. What's the best way to do this? For simplicity I'm just using a green circle, and I want everything else transparent. What I've done is erased the entire background layer and drawn the green circle in the middle. Then I went to Channels, created a new Alpha channel, and Filled it with white. I then went to save as a .BMP format, and made sure to save it in format A8 R8 G8 B8 so the alpha channel gets saved. nevertheless, when the image draws on the screen, it's a solid white square with a green circle in the middle. I know I'm doing something retarded, but I'm basically just shooting blindly as I have no idea what I'm doing. Tips appreciated :)
Quote: Original post by cache_hit
Then I went to Channels, created a new Alpha channel, and Filled it with white.
If the alpha channel is filled white, that means the whole image is 100% opaque.
Fill the alpha channel black, then select the green circle (if it's on a layer by itself, you can control+click the layer to do this) then go to the alpha channel and fill that selection in white.
Advertisement
Quote:
went to save as a .BMP format, and made sure to save it in format A8 R8 G8 B8 so the alpha channel gets saved.

Not all .bmp loaders support proper 32 bit bmps. (it was an extention added in windows XP? but i've seen a LOT of loaders just load 32bit bmp images as the 24bit+8bitpad format, effectively dropping the alpha channel)

You might be better off using a format that supports 32bit images, like TGA or PNG.

I think Adobe stopped supporting alpha channels in PNGs as from version cs3+ (correct me if I'm wrong). The transparency can instead be achieved by using the erase tool on the wanted transparent areas (leaving the alpha channel out of the equation). I think this is a bad approach since it doesn't allow for complete control of the transparent pixels. Maybe you want black or red pixels where the opacity is zero (important feature when dealing with textures that goes to 3D hardware graphics memory).

There is a work around to get functionality of previous versions into cs3+. Get a PNG exporter/importer (SuperPNG) or replace the existing one in the plugins directory with the older file. The file formats are located in the folder "your-photoshop-directory\Plug-Ins\File Formats".

The SuperPNG plugin website.
You can also add an alpha channel by adding in a blank layer and not collapsing it :) Simply make the circle, use transparent background color, or make it transparent in the format (if it supports it) and then add an additional layer ontop, when you collapse the image down as long as the image itself can support alpha - or its a format that supports the layers (IE tiff) you'll endup with the alpha you need in the image.

This topic is closed to new replies.

Advertisement