Page 1 of 1

My billboard is not transparent

Posted: Sat May 21, 2005 10:28 pm
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?

Posted: Sun May 22, 2005 10:07 am
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

Posted: Sun May 22, 2005 1:48 pm
by Guest
i am using a simple ".bmp" file...and filtercolor is uniform...i must have done something else wrong...thx anyway.

Posted: Thu Sep 21, 2006 5:10 pm
by Pr3t3nd3r
+1
Same problem billboards are becoming black when moving the camera away.