animating model from 3ds max

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
porki
Posts: 15
Joined: Fri Jun 08, 2007 2:18 pm

animating model from 3ds max

Post by porki »

I'm trying to use tutorial about movement to use keyboard to drive a truck. Truck model is taken from 3ds max (exportet to .3ds or .obj file).But when I'm trying to put it in the code from tutorial

scene::IAnimatedMeshSceneNode* anms = smgr->addAnimatedMeshSceneNode(smgr->getMesh("../../media/truck.3ds"));

after compilation window disappears. Model from 3DS max isn't animated so maybe it's something connected with add method. .3ds and .obj files are ok because I was able to load them, for example, in hello world tutorial.
I'll send more code if you want.
Thank you for any suggestions!
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

Irrlicht's mesh 3ds loader does not support animated 3ds files. you'll have to export to x or b3d
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
porki
Posts: 15
Joined: Fri Jun 08, 2007 2:18 pm

Post by porki »

but it isn't animated and I can load it in this code:
int main()
{
IrrlichtDevice *device = createDevice( video::EDT_OPENGL, dimension2d<s32>(900, 700), 16,false, false, false, 0);
device->setWindowCaption(L"Przyklad dzialania Irrlichta ");

IVideoDriver* driver = device->getVideoDriver();
ISceneManager* smgr = device->getSceneManager();
IGUIEnvironment* guienv = device->getGUIEnvironment();

IAnimatedMesh* mesh = smgr->getMesh("../../media/truck.3ds");
IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode( mesh );

if (node)
{
node->setMaterialFlag(EMF_LIGHTING, false);
node->setMD2Animation ( scene::EMAT_STAND );
}

smgr->addCameraSceneNode(0, vector3df(0,100,-100), vector3df(0,5,0));

scene::ICameraSceneNode * cam = smgr->addCameraSceneNodeFPS();
device->getCursorControl()->setVisible(false);
while(device->run())
{
driver->beginScene(true, true, SColor(255,100,101,140));

smgr->drawAll();
guienv->drawAll();

driver->endScene();
}


device->drop();

return 0;
}
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

oh sorry I misunderstood, and still don't understand the question.

I'm guessing "after compilation window disappears." is the important bit? Do you mean Irrlicht crashes after trying to add the mesh? Are there any messages in the console window?
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
Post Reply