Page 1 of 1

help loading a milkshape 3d mesh

Posted: Fri Mar 12, 2004 4:50 am
by Byron
I am trying to load a model I made in milkshape 3d. It doesnt load the texture, the model looks OK but its all white. Here is the code I load it with:

Code: Select all

	irr::scene::IAnimatedMesh* boatMesh = smgr->getMesh("./misc/TestModel.ms3d");
	irr::scene::IAnimatedMeshSceneNode* boatNode = smgr->addAnimatedMeshSceneNode(boatMesh);

	if(boatNode)
	{
		boatNode->setMaterialFlag(irr::video::EMF_LIGHTING, false);	
		boatNode->setMaterialTexture( 0, driver->getTexture("./misc/TestModel.ms3d") );
	}
The mesh looks fine in milkshape

thanks for any help

Posted: Fri Mar 19, 2004 12:32 pm
by ttt
Hi
this comes a little late but anyway:
you have to provide a image file like jpg, bmp,.. to use as texture.

Code: Select all

boatNode->setMaterialTexture( 0, driver->getTexture("./misc/[b]MYIMAGE.JPG[/b]") ); 
cheers
t