invisible mesh

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
n008ie

invisible mesh

Post by n008ie »

Hey, i downloaded this cool engine, but now i have a problem :cry: . I would want to load a mesh, but without a texture, so it's invisible. But when i do not declare a texture, the mesh is white. Does someone know a solution?
Kaeles
Posts: 37
Joined: Thu Jun 03, 2004 12:43 am
Location: oklahoma
Contact:

Post by Kaeles »

if your wanting to make the mesh actually there, but invisible (like a window say) then apply a texture with an alpha transparency,
else just load the mesh into the IAnimatedMesh and dont set it to a scenenode.

hope that helps .
vorschau
Posts: 10
Joined: Thu Mar 03, 2005 3:00 pm
Location: vienna

Post by vorschau »

important is video::EMT_TRANSPARENT_ADD_COLOR
then load a texture 100% black, now its invisible but u still can use collision detection.



// maxerl
scene::IAnimatedMeshSceneNode* fig = 0;
scene::IAnimatedMesh* faerie = smgr->getMesh( "daten/bond.md2");

if (faerie)
{
fig = smgr->addAnimatedMeshSceneNode(faerie);
fig->setPosition(core::vector3df(0,-100,100));
fig->setScale(core::vector3df(2.5,2.5,2.5));
fig->setMD2Animation(scene::EMAT_STAND);
fig->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);
fig->setAnimationSpeed(20);
fig->setMaterialTexture(0, driver->getTexture("daten/bond.bmp"));
fig->setMaterialFlag(video::EMF_LIGHTING, false);

}
Post Reply