Get an animation from 3Ds Max 6 to Irrlicht, how?

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
cr_itm
Posts: 57
Joined: Sun May 01, 2005 10:13 am

Get an animation from 3Ds Max 6 to Irrlicht, how?

Post by cr_itm »

Hello,

I want to create an animation with 3D Studio Max 6, with normal keyframe animation or with bones, doesn't matter. I don't know which file format I must use, to get the animation properly into Irrlicht.

May someone explain to me, in which format I must export my animation, so Irrlicht can use it and display the animation? Perhaps I must use the third file format that I must convert to/from, the only thing is that I must use 3DMax on one end, and Irrlicht on the other end of the "conversion-pipeline" :-)


Thanks a lot
Baal Cadar
Posts: 377
Joined: Fri Oct 28, 2005 10:28 am
Contact:

Post by Baal Cadar »

Ideally you export to the direct x file format .X.
In order to use the animations in Irrlicht, you have to append them to a single animation and not the frame, which partition an animation from the former one. So for instance Animation 1: Frame 1 to 50, Animation 2: Frame 51 to 100 and so on. This way, you can easily select animations inside the X file using Irrlicht.
No offense :)
Klasker
Posts: 230
Joined: Thu May 20, 2004 8:53 am
Contact:

Post by Klasker »

As an alternative to the .X format you can use Cal3D. The big advantage of Cal3D is that it uses blended skeletal animations, so your character can play many animations at the same time. Useful for swining a sword while running or talking in a cell phone while walking, for example.
I wrote a scene node that takes care of the Cal3D API for you. You can download it here.
You will still need the Cal3D source to compile it though. You can find that at its website (http://cal3d.sourceforge.net/), where you also can find exporters for 3ds max to the cal3d format.
cr_itm
Posts: 57
Joined: Sun May 01, 2005 10:13 am

Post by cr_itm »

Hello,


@Klasker: I really would like to use your scene node, but currently I must use Java in conjunction with Jirr for the project. If I would use your node, I must recompile the Java binding... too complicated at the moment :)

@Baal Cadar:

since a fairly long time, I'm trying to get an animated direct x file animation into my Irrlicht program.

I used the Panda DirectX Exporter (http://www.andytather.co.uk/Panda/directxmax.aspx). First, I tried a normal keyframe animation, but it did not work. Then I tried to get a bone animation running, but without success. The model is always still, like it is just displaying the frame 0, skipping all animations.

This is the code, I'm using to load the model/animation:

Code: Select all

IAnimatedMesh mesh = scene.getMesh( "c:/temp/myAnimation.x" ); 
IAnimatedMeshSceneNode node = scene.addAnimatedMeshSceneNode( mesh ); 
node.setFrameLoop(0, 100); 
node.setMaterialFlag( E_MATERIAL_FLAG.EMF_LIGHTING, false );
(It's java code, cause I use Jirr, but you will surely understand it)

These are my settings for the Exporter:

Image

I really can't get it working and I must finish it until this weekend :-(

May you have a look at the settings? Perhaps you can say, what I'm doing wrong. In the 3DMax scene, there is just one simple model with 3 bones, and only one of the bones is moving (the bone translates along the x axis from frame 0 to frame 50 or so).

Thanks a lot for your help!
drac_gd
Posts: 132
Joined: Sun Apr 09, 2006 8:43 pm

Post by drac_gd »

Use the "Top Frame Only" setting otherwise it will be all scrambled and some subnodes will be missing :(
drac_gd
Posts: 132
Joined: Sun Apr 09, 2006 8:43 pm

Post by drac_gd »

Oh and also bones dont work.. They may with IrrExtensions.. but for sure they dont work with plain IrrLicht
Post Reply