Page 1 of 1

invisible mesh

Posted: Thu Mar 03, 2005 6:59 pm
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?

Posted: Fri Mar 04, 2005 3:21 am
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 .

Posted: Fri Mar 04, 2005 9:05 pm
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);

}