About animations

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
oli03
Posts: 4
Joined: Tue Aug 25, 2009 4:08 pm
Location: Auvergne - France

About animations

Post by oli03 »

Hi,

I have two noob questions about animation :
1) Is it possible to use b3d or md2 format to model a non character object (without bones) ? All posts are about human or characters.
I model a simple cube in blender, animate from up to down (with LocRot keyframes) and export with gandalf exporter (b3d) or built-in exporter (md2)
When I load it in irrlicht, it doesn't animate (b3d or md2), but the object is visible.

Code: Select all

IAnimatedMesh *MyMesh = m_IrrSceneManager->getMesh("media/test.md2");
IAnimatedMeshSceneNode *MyNode = m_IrrSceneManager->addAnimatedMeshSceneNode(PompeMesh);
MyNode->setAnimationSpeed(30);
MyNode->setLoopMode(true);
MyNode->setFrameLoop(1, 60); //for b3d only
MyNode->setMD2Animation(EMAT_RUN); // for md2 only
2) In a game, there is often cinematics in 3D that use the 3d game engine.
Is it possible to create animation in blender and, for example, load and "attach" an animation to the camera or another object, or all the animations must be packed with the mesh ?

Thanks for yours answers. :wink:
B@z
Posts: 876
Joined: Thu Jan 31, 2008 5:05 pm
Location: Hungary

Post by B@z »

1) as far as i know irrlicht doesnt load b3d with keyframe animation. use bones, you can rotate with them too xD put only one bone at the center of your cube, assign the whole cube to it, and rotate.
md2 doesnt even support keyframes, i heard b3d does but irrlicht cant use it.

2) well maybe its possible to export the animation from blender to camera, and attach it to irrlicht camera, but you have to write the loader in your own :P
I suggest you to use scripts, i mean like in xml file, you write when do the camera move to what position, what speed etc. and write which character play which animation, where to go, etc
i would make it like this, but i dunno, maybe smarter ppl will give you better answer :D
Image
Image
Post Reply