how to make a sprite with alpha chan

Blitz3D Forums/Blitz3D Programming/how to make a sprite with alpha chan

Neochrome(Posted 2003) [#1]
Hi, im using photo shop 6 and im getting a little fed up of the alpha channel working on moment and not the next, this is because im only guessing my way

i have some clouds and i want to make them look like unreal. so i need an alpha channel (i know its not neccery BUT i need the practice) how do i do it, a step by step guide for me if you can please??


Ruz(Posted 2003) [#2]
just to say in anyone is using photoshop 7 ,there is a bug which prevents you from saving 32 bit tga with alpha channel
The workaround is to copy the pshop 6 tga export over the pshop 7 version.
Anyway alpha channels are pretty straight forward

In pshop go to channels and add a new channel, this is your alpha channel(alpha1)
Anything you draw in this alpha channel which is white will be opaque(non transparent), anything that is black is transparent.grey shades will be semi transparent.
This way you can get nice subtle transparency effects.
save your file as a 32 bit tga , which embeds the alpha channel in the file.

Then in blitz , use a texture filter
ie
TextureFilter "blahh.tga",1+2+8
2 is the alpha flag

This is handy for for leaves, railings etc.
obviously you have the colour channel also. So I have some green railings,with an alpha(black and white mask) for the gaps in the railings.
Like this below



Open the colour image in pshop.Copy the black and white mask in to a new alpha channel and save as 32 bit tga.


Neochrome(Posted 2003) [#3]
i cant get it to save 32 bits, just 24 bits! and even then photoshope will not allow me to tick the alpha channel when i save as png


Neochrome(Posted 2003) [#4]
yupp sorted it! cool.. i'll stick with tif's much better, tho big in file size >:(


Pete Rigz(Posted 2003) [#5]
The png filter for photoshop isnt that good. Try getting SuperPNG which is a much better png plugin for photoshop.


podperson(Posted 2003) [#6]
Rigz -- thank you for an AMAZINGLY useful link. I just downloaded almost all of their plugins for both Mac and Windows Photoshop.