Original Post
🔒 Locked
transparentcy
Advertisement
if you mean the paint program that comes with windows, it can''t do that. in fact, bitmaps can''t, so you''ll have to use PNG or GIF or TGA or your own custom format or something.
you can use Gimp or Paint Shop Pro to create these.
i just use my own custom format, so i''m sorry i don''t have a lot of information on these other programs.
you can use Gimp or Paint Shop Pro to create these.
i just use my own custom format, so i''m sorry i don''t have a lot of information on these other programs.
You can avoid having to create the alpha channel in an image program by simply iterating through your image as you load it, adding an alpha value, and setting alpha to zero for the transparent color and 255 everywhere else.
quote:
Original post by Myopic Rhino
You can avoid having to create the alpha channel in an image program by simply iterating through your image as you load it, adding an alpha value, and setting alpha to zero for the transparent color and 255 everywhere else.
Well if you do that in your texture manager you''ll get into trouble when you want textures for which you calculate the alpha in some other way (average, etc).
The best way is to use a 32 bit image format like TGA (or make your own as i did) and calculate the alpha plane in some editor (Photoshop) or write an utility for generating alpha channels (make this utility to be able to create color-keyd sprites, alpha = (R + G + B) / 3, or to load a greyscale alpha plane from another file).
All your source are belong to us
/*ilici*/
quote:Why would you get into trouble? You could easily parameterize it, make different functions, etc., to do the right thing all the time. My own image management code does this; it's extremely flexible and powerful, and I've never had a problem with it. When you've got sprite art which is already color keyed (which is what the OP is asking about), my approach seems more straightforward.
Original post by Ilici
Well if you do that in your texture manager you'll get into trouble when you want textures for which you calculate the alpha in some other way (average, etc).
Yep, just for color-keying it''s no use to store the Alpha component, but I had many textures which i didn''t know anything about and had to load them for the world. i did not know how to generate the alpha for each one so i created my own format and the converter calculated alpha by some algo of choice. check out my basecode for the format and converter + loads of other goodies.
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement