No textures when I load a 3ds file

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
curtis
Posts: 22
Joined: Thu Oct 28, 2004 9:09 am

No textures when I load a 3ds file

Post by curtis »

heres my code

Code: Select all

scene::IAnimatedMeshSceneNode* handtruck = smgr->addAnimatedMeshSceneNode(smgr->getMesh("modules/handtruck.3ds"));
handtruck->setPosition(core::vector3df(-150,50,50));
handtruck->setRotation(core::vector3df(-90,0,0)); 
handtruck->setScale(core::vector3df(6,6,6));
It loads the module correctly, but the textures do not show.. Its just black...
asdf
DarkWhoppy
Posts: 386
Joined: Thu Sep 25, 2003 12:43 pm
Contact:

Post by DarkWhoppy »

Just apply the textures like this...

Code: Select all

NameOfSceneNode->setMaterialTexture(0, _driver->getTexture("NAME OF FILE "));
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

If you're using 3ds files, the textures should load automatically...
The textures have to be in the same folder as the 3ds file and in (old) DOS name style (8.3)...
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Neuron

Post by Neuron »

Whats about 3DS-files, wich uses no external texture files - just with colors. I managed to load them and I can see the colors, but it seems like a flat shading thing.

Can I use an other shading methode, like phong? Or must I add a light?

(Thanx)
Van
Posts: 9
Joined: Fri Oct 29, 2004 3:31 am

Post by Van »

I am having the same problem with 3DS files as well. No texture.

If I load my 3DS file into the MeshViewer, the MeshViewer (the demo with Irrlicht) loads the Textures and displays them. However, if I load them into my program the textures do not appear.

Yes, I am loading the mesh EXACTLY the same way from EXACTLY the same directory using the EXACT same files (names, etc).

The ONLY difference between my program and the MeshViewer is that I am using a LightSource. All other objects appear fine (with their shadows, etc). My 3DS object appears, all white, with no textures.

Currently I set EMF_LIGHTING to TRUE for my 3DS node. Also make the model solid. BTW, I tried setting the EMF_LIGHTING to false and that didn't help either.

OH, BTW, when I debug, I can see in the debug window that Irrlicht IS loading the textures for the 3DS. It finds all 10 of them. They are just not appearing on the model.

Is there some other flag I should set?
Post Reply