I am trying to use objects from various files (mainly Maya obj and 3DS) .
I do not see any errors logged to the console when I load the mesh. So far I have only been able to get 1 model to work. All the others have problems with the textures. Some will have no textures applied, some will have a few of the textures partially covering the model.
Granted, these are the free downloads that I get from places like TurboSquid, so the quality of these models may be questionable.
I am using the following code...
Code: Select all
mesh = smgr->getMesh(filename);
if( mesh )
{
node = smgr->addAnimatedMeshSceneNode( mesh );
if (node)
{
// Basic initialization is good enough to render on the screen.
node->setMaterialFlag(EMF_LIGHTING, false );
node->setCurrentFrame(0);
init = true;
} else {
init = false;
}
}
The one model that I could get to work was a 3DS file that had all the textures in the same directory as the 3DS file. Many of the other models have their textures in a subdirectory structure. I also see that some of the tutorial examples specifically load the texture onto the object, but others do not. How do I know when I need extra code to load the textures?
Thanks in advance