Using the .PNG format's Alpha Channel Properly?

Blitz3D Forums/Blitz3D Programming/Using the .PNG format's Alpha Channel Properly?

Jeremy Alessi(Posted 2003) [#1]
Can someone point me in the right direction more applying this technique in Blitz. I've never used the alpha channel of a .PNG. Usually I just mask black pixels or if I'm going for an alpha effect I don't incorporate the alpha channel into the image in Photoshop.


Dock(Posted 2003) [#2]
The trick to getting Alpha to work in Photoshop, is to delete the 'background' layer, as it's always opaque. Then any layers on top of this will be only opaque if you specify. You can use 50% erase, and the checkered background pattern will show through the layer. Save this as a PNG and you're sorted :)


Space_guy(Posted 2003) [#3]
i really dont like this way to do it :(
u get a white strip arround the gfx almost no matter how much u delete.
but it sems u cant save the alpha layer any more in photoshop for some stupid reasson. :(((((


Dock(Posted 2003) [#4]
It works fine for me. :) Sounds as though you're saving as a GIF, or a 256 colour PNG. You have to use true colour PNG, no other format supports alpha (well, none that we'd want to use for games).


Space_guy(Posted 2003) [#5]
well positive to hear it should work.
I speak to you more about it on icq later


Big&(Posted 2003) [#6]
If you are using PhotoShop 7 you need to upgrade to 7.01 as they took out the alpha stuff for some of the formats. The update puts them back in. No idea why they did it though..


Jeremy Alessi(Posted 2003) [#7]
I have 5.5. Anyway my problem is that when I attempt to use the alpha flag in Blitz the entire image remains completey "solid" no alpha blending at all. I can mask the texture but not alpha blend it.

See I am working with an artist who has utilized the alpha channel and sent me the images. I can use the alpha flag on my original images which don't use the alpha channel in the .PNG. Mine will alpha (but the whole image does not just the outline which is what we want) the new ones which actually incorporate the alpha channel will not.


Space_guy(Posted 2003) [#8]
Ah. that would explain it. ill try updating


jhocking(Posted 2003) [#9]
I say use TGA. The alpha channel is easier to manage and the larger filesize doesn't matter for most purposes because it will compress in the installation file.


Jeremy Alessi(Posted 2003) [#10]
OK, PNG works fine, for some reason I was sent the wrong files, so the image wasn't carved out of the alpha channel :)