View Full Version : alpha channel question
Pyabo
05-04-2006, 02:32 PM
I have a color-keyed bitmap... I want to take it and change the color-key to an alpha channel in some 32-bit format like PNG. Is there an easy way to do this? I have Photoshop 6. Seems like this might be a common task... ?
luggage
05-04-2006, 02:53 PM
This kind of works. Select the magic wand, set the tolerance to zero, tell it not to be antialiased or contigious. Then select the colour keyed pixel and hit ctrl-x. Then you can save it as a png and all should be well.
Jonas
05-04-2006, 05:16 PM
Yep, you can do that, do a Select->Color Range
Set it to 0 and do the eyedropper on your color key
That will select only your color key. :)
You might also find that PS has some little issues with loading and saving alpha channels.
Just enough to be annoying.
I think it was TGA where it will load it in as an actual 4th channel but with other file formats it loads/saves as a not so easy to edit applied mask.
So you might find it easier to edit if you use TGA.
Pyabo
05-04-2006, 06:18 PM
OK... selecting all the pixels of the transparent color... got that step. Now how do I create the alpha channel from it?
Waaaaait... OK, I think I get it. Cutting those pixels actually tells Photoshop that there is no color there at all. I should see that Photoshop checkerboard there, right?
OK, that sounds easy. But what if I actually wanted to anti-alias my sprite... blend it a little? How do I edit just the alpha channel?
Man I am a graphics newb.
luggage
05-04-2006, 06:33 PM
Tricky one. We usually get the anti-aliasing done when it's rendered out but you could try....
Use the magic wand.
Select the alpha area.
Invert the selection (shift-ctrl-I) - this should select the outer edge of your sprite.
Use the menu to get Select->Modify->Contract.
Contract the selection by 2 pixels.
Invert the selection. You should have a pixel or so selected of the edge of your sprite.
Apply a blur filter to the selection.
Not sure how good a job that will do though.
soniCron
05-04-2006, 07:37 PM
Alone, that wouldn't turn out terribly attractive. (You'd just get blurry edges.) However, take it one step further and adjust the levels of the alpha channel (go to Quick Mask mode) inward with a separation of about 16 levels between the two poles, and you'll find yourself with a really nice, smooth border. How it ultimately affects your sprite, however, is case-by-case. Usually, anti-aliasing after the fact yields greatly inferior results. There was another (better) example around these forums a while back; quick search for it. (I know I had some posts in the thread, if that helps.) It had graphical examples in addition to the "right" way to go about it.
Pyabo
05-05-2006, 10:26 AM
Food for thought... thanks guys.
vBulletin v3.6.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.