My billboard is not transparent
Posted: Sat May 21, 2005 10:28 pm
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?
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?