help loading a milkshape 3d mesh

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
Byron
Posts: 8
Joined: Tue Jan 06, 2004 11:47 pm

help loading a milkshape 3d mesh

Post 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
ttt

Post 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
Post Reply