Page 1 of 1

Problems with texture mapping.

Posted: Mon Mar 15, 2004 3:45 pm
by pheadbaq
I've got a DirectX cube mesh that has one texture mapped (at least in my 3d modelling tool) to each face of the cube. At runtime in the console, Irrlicht indicates that all the textures are loaded fine. But when it renders, I get the mesh, but no textures.

One odd thing is that if I design the mesh with no textures at all, Irrlicht will render it with all the faces on the cube being white. If I do as I described above, it renders all of it black. Anyone have some insight on this?

Posted: Mon Mar 15, 2004 5:13 pm
by soconne
Maybe you could disable lighting on the texture. Did you try that? Like Material.Lighting=false;

Posted: Mon Mar 15, 2004 8:33 pm
by pheadbaq
Hmm. Tried it but it didn't seem to make any difference. Here's the code I use to set it up:

Code: Select all

    IAnimatedMesh* regularMesh = smgr->getMesh("./myMesh.x");
    IAnimatedMeshSceneNode* regularNode = smgr->addAnimatedMeshSceneNode(regularMesh);

    regularNode->setPosition(core::vector3df(0, 0, 5));
    regularNode->getMaterial(0).Lighting = false;
    regularNode->getMaterial(0).EmissiveColor = video::SColor(0, 50, 50, 50);
Neither the lighting or emissiveColor properties changed the outcome :(

Posted: Mon Mar 15, 2004 10:23 pm
by soconne
is the texture the model using in the same directory? you might also want to check if the .X file itself is loading the texture from the same dir.

Posted: Mon Mar 15, 2004 11:22 pm
by pheadbaq
Yes to both. :(

eh

Posted: Thu Mar 18, 2004 4:43 am
by zateam
eh
i have the same exact problem he is having