Archived

This topic is now archived and is closed to further replies.

MV

Bitmap transparency

Recommended Posts

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 ?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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 ?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites