Hi
I cant manage to add a texture to a model loaded from a 3ds file
I tried to do the same with an irrlicht cube and the sydney model of the example and it works..
//cubo
scene::ISceneNode* n = smgr->addCubeSceneNode();
if (n)
{
n->setMaterialTexture(0, driver->getTexture("pezzo3.tga"));
n->setMaterialType(video::EMT_TRANSPARENT_ALPHA_CHANNEL);
n->setMaterialFlag(video::EMF_LIGHTING, false);
}
//3ds mesh
IAnimatedMesh* n2 = smgr->getMesh("cubo.3ds");
IAnimatedMeshSceneNode* n3 = smgr->addAnimatedMeshSceneNode( n2 );
if (n3)
{
n3->setMaterialTexture(0, driver->getTexture("pezzo3.tga"));
n3->setMaterialType(video::EMT_TRANSPARENT_ALPHA_CHANNEL);
n3->setMaterialFlag(video::EMF_LIGHTING, false);
n3->setPosition(core::vector3df(10.0f,0.0f,10.0f));
}
as you see, I follow the same steps for both the cubeSceneNude and the imported mesh but all I get with this one is an invisible cube!
(or , if I disable the transparency,a monochromatic cube of a color which seems the sum of all the colors in the texture)
[solved]cant add texture to 3ds mesh
[solved]cant add texture to 3ds mesh
Last edited by kilnan on Fri Apr 03, 2009 11:27 am, edited 1 time in total.