Advertisement

Bitmap transparency

Started by August 08, 2003 04:11 AM
3 comments, last by MV 21 years, 6 months ago
Hi guys, I''m trying to make a particle/billboard transparent with blending but it doesn''t work cause I dont know how to specify the alpha value. I''ve readen it could be done with the 4th parameter of the diffuse material, but this doesnt work. Someone knows ?
I''ve forgotten to write that I use a bitmap and not a tga file
Advertisement
Yes, you can use a TGA file. TGA supports an alpha channel. You can also specify a color which would be the transparent color and when reading the Bitmap you can generate a RGBA Image in Memory where all Pixel having the color you specified get an alpha value of 0, all other 1.

--------------------------------------------------------

"If it looks good, it is good computer graphics"
"If it looks like computer graphics, it is bad computer graphics"

Corrail
corrail@gmx.at
ICQ#59184081
--------------------------------------------------------There is a theory which states that if ever anybody discovers exactly what the Universe is for and why it is here, it will instantly disappear and be replaced by something even more bizarre and inexplicable.There is another theory which states that this has already happened...
The trouble is that I use the auxDIBImageLoad function to load bitmap and I have no access to the image''s data.
Actually, I used some parts of the tutorial 19, where bitmap are loaded and transparent, but I dont know why, it doesnt work in my case. I thougth it''s because I draw some other textured objects. Any ideas ?
Write your own loader. It is really not difficult!!
But you can also use an alpha map (a bitmap with only one component) and blend it with multitextureing

--------------------------------------------------------

"If it looks good, it is good computer graphics"
"If it looks like computer graphics, it is bad computer graphics"

Corrail
corrail@gmx.at
ICQ#59184081
--------------------------------------------------------There is a theory which states that if ever anybody discovers exactly what the Universe is for and why it is here, it will instantly disappear and be replaced by something even more bizarre and inexplicable.There is another theory which states that this has already happened...

This topic is closed to new replies.

Advertisement