Okay, I have started with the 01.HelloWorld example and I am trying to load a .3ds file. So far, I have a model of a Pyro-GX from Descent1\2 that had loaded correctly, and is displayed correctly. The reason why that one loads as far as I can tell is due to it having only one texture for the whole model which I used as a test when I first encountered this problem. And the code I used to load it was the example code to load the "sydney" model, with the filename changed to point to the ship's model. That also loaded the texture file correctly.
The trouble started when I was trying to load a Descent3 level that I converted to a .3ds with a tool I found on Planetdescent.com, which is a large repository of a ton of Descent-related files. I was able to correctly texture it when I brought it into 3ds Max, and exported it into a .3ds due to just plain saving it putting it into a .max file.
Here is a small picture of the level, that's now exactly how its supposed to look, but it gives you an idea.
I copied the lines that loaded the first .3ds model ( i had removed the:
Code: Select all
node->setMD2Animation ( scene::EMAT_STAND );
http://s10.photobucket.com/albums/a113/ ... escent.jpg
And the console said:
http://s10.photobucket.com/albums/a113/ ... escent.jpg
I did place the correct texture files in the same directory as the model, and at the end, you will see "Could not open file of texture: djctf_fixed.mat" That was because I was told by a friend who has some experiance with irrlicht that I had not given it a material file. This made sense to me because all of the textures used in the level's model were put into one Material that had 12 sub objects, or materials:
http://s10.photobucket.com/albums/a113/ ... ialSub.jpg
When I try to use a:
Code: Select all
levelNode->setMaterialTexture( 0, driver->getTexture("facflor3.tga"));
So, I'm not sure how to either pull that compound texture into seperate materials, or how to tell Irrlicht "Hey! I do know what I'm talking about, and the textures are right here, in the same dir that they've always been, where they're supposed to be. Or perhaps I've completely glazed over the correct fix...