Semitransparent/alpha image!

Blitz3D Forums/Blitz3D Programming/Semitransparent/alpha image!

ChrML(Posted 2003) [#1]
I couldn't find any commands to alphaing a 2d image rendered in 3d. Ofcourse, MaskImage can be used to mask one color to be transparent, but what about having the image half transparent, so the user can both see the front graphic, but still be able to see the world "through" the 2d graphics. Also, what I'm asking for is semitransparency, and how to do that. I'm going to use this for my hud. I don't think .bmp supports alpha channel, so do I have to use an another texture format that supports it, and that would be loaded in blitz (like .tga)?


Ross C(Posted 2003) [#2]
I believe you cannot do alpha on images, even in 3d. You probably need to use a sprite, or maybe a checked masked image might do.


ChrML(Posted 2003) [#3]
I tried to check an image, but that didn't look transparent. More like checked, where you see small holes where you can see the 3d. Would it be possible with a cube with the camera as parent, and it has a texture of the hud that's alphaed with TextureFilter? That would be a pain in the ass to get all to fit, and be correct, though... Sure it's not possible with Alpha images?


Ross C(Posted 2003) [#4]
Well, there's no real time way to alpha an image in blitz. A quad parented to your camera would work a treat. Apply the texture then use entityalpha to bring it down to it's required alpha level :)


ChrML(Posted 2003) [#5]
Ok, thanks for all help :)!


ChrML(Posted 2003) [#6]
How can I mask sprites? I'm trying alphaed .tga files in Paint Shop Pro 8 now, how to I set a transparency color in PSP?


Ross C(Posted 2003) [#7]
Use the color 0,0,0 for masking sprites. I don't know anything about .tga files unfortunatly :S Then load in the sprite with the 4 flag


Ross C(Posted 2003) [#8]
This thread will probably be of use to you :)

http://www.blitzbasic.com/bbs/posts.php?topic=26403