Transparent Billboard

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
Siebenschläfer
Posts: 34
Joined: Thu Feb 05, 2009 11:37 am
Location: Koblenz, Germany

Transparent Billboard

Post by Siebenschläfer »

Hello,

I tried to do the same as example 11 and make a billboard with a texture where all black parts are transparent, but it doesn't work, my bilboard is still black with the picture inside:

Code: Select all

	// draw scene in background
	scenePlane->render();

videoPlaneRight_node = Smgr->addBillboardSceneNode( 0, dimension2d<f32>( 380, 285 ), vector3df( 0,0,100 ));

	videoPlaneRight_node->setMaterialFlag( video::EMF_LIGHTING, false );
	videoPlaneRight_node->setMaterialFlag(video::EMF_ZWRITE_ENABLE, false);
	videoPlaneRight_node->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);
	videoPlaneRight_node->setMaterialTexture( 0, Driver->getTexture("media/particlewhite.bmp") );

	ShadManager->flipTextureOnNodeVertically( videoPlaneRight_node );

	videoPlaneRight_node->render();
the rendering order should be fine, too. Did I forget some other trigger?

Cheers Siebenschläfer
Think Tannenzäpfle!
Cloudef
Posts: 123
Joined: Wed Dec 03, 2008 9:02 pm
Location: Finland

Post by Cloudef »

You do not specify the colorkey for which color to make transparent?
Siebenschläfer
Posts: 34
Joined: Thu Feb 05, 2009 11:37 am
Location: Koblenz, Germany

Post by Siebenschläfer »

no because in the example there was no need to use it. Beside I also tried it with adding makeColorKeyTexture but it changed nothing.
Think Tannenzäpfle!
Siebenschläfer
Posts: 34
Joined: Thu Feb 05, 2009 11:37 am
Location: Koblenz, Germany

Post by Siebenschläfer »

ok, obviously it was the matter of the rendering order... but now I get another problem:
if I build my scene and my billboard, give it the texture and draw it the way posted before the black is invisible. But unfortunately all the rest is transparent, too! But I want to have the black invisible and the rest clear visible.

Second try was with a solid billboard with a texture with makeColorKeyTexture for black. But this shows no effect. If the billboard is transparent I have the same problem like in the first case.

Any advises?
Think Tannenzäpfle!
Post Reply