Problems with texture mapping.

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
pheadbaq
Posts: 33
Joined: Wed Dec 31, 2003 4:41 pm
Contact:

Problems with texture mapping.

Post 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?
Pronunciation: 'feedback' ;)
soconne
Posts: 87
Joined: Fri Mar 05, 2004 2:00 pm

Post by soconne »

Maybe you could disable lighting on the texture. Did you try that? Like Material.Lighting=false;
pheadbaq
Posts: 33
Joined: Wed Dec 31, 2003 4:41 pm
Contact:

Post 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 :(
Pronunciation: 'feedback' ;)
soconne
Posts: 87
Joined: Fri Mar 05, 2004 2:00 pm

Post 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.
pheadbaq
Posts: 33
Joined: Wed Dec 31, 2003 4:41 pm
Contact:

Post by pheadbaq »

Yes to both. :(
Pronunciation: 'feedback' ;)
zateam

eh

Post by zateam »

eh
i have the same exact problem he is having
Post Reply