My billboard is not transparent

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
VooDooMilivoje!

My billboard is not transparent

Post by VooDooMilivoje! »

Hi everybody!
I have one question...how can i make a billboard to be transparent?
(I want only one color to be transparent and all the others solid)
I tried something like this->



video::ITexture* image = driver->getTexture("picturre.bmp");
driver->makeColorKeyTexture(image, core::position2d<s32>(1,1));//pixel with color i want to be transparent
scene::IBillboardSceneNode * bill = smgr->addBillboardSceneNode();
bill->setMaterialType(video::EMT_TRANSPARENT_ALPHA_CHANNEL);
bill->setMaterialTexture(0, image);
bill->setMaterialFlag(video::EMF_LIGHTING, false);
etc...



i put that billboard in some 3d space...
and it is allright when camera is very near to the billboard,otherwise,when camera moves far enough from the billborad,it becomes full solid,including color i want to be transparent...
Is this what i did a good practise anyway?
bearSoft
Posts: 165
Joined: Fri Apr 01, 2005 9:55 pm
Location: Denmark

Post by bearSoft »

what type of graphic are u using?
only bitmap- type images will have a uniform clean color sceme
make sure taht is px u actually use as filtercolor also is the one used by the complete background
Regards.
Tech: win98se| 320mb ram| abitbe6| 433mhzceleron| atiRadeon7000.64mb| soundblaster125| dx9.0b | devCPP | IRR 0.12.0 |
Guest

Post by Guest »

i am using a simple ".bmp" file...and filtercolor is uniform...i must have done something else wrong...thx anyway.
Pr3t3nd3r
Posts: 186
Joined: Tue Feb 08, 2005 6:02 pm
Location: Romania
Contact:

Post by Pr3t3nd3r »

+1
Same problem billboards are becoming black when moving the camera away.
Galactic Dream Best RTS game
http://www.rageofwar.net
Engage in epic galactic warfare, guide your people through the galaxy! in the real time strategy game made with Irrlicht
http://www.evolutionvault.com
Post Reply