Page 1 of 2

Basic animation help - 3ds

Posted: Wed Apr 21, 2010 7:32 am
by sfkhooper
Hi, I've created my first animation in 3ds max with a biped, which looks lame, but loops nicely in 3ds max studio. It's a start. I've exported the file to .3ds format and referenced it in the code below. The problem I have is this - when I run my irrlicht proj, all I see is my biped character just standing there, as he looks in frame 1 from within 3ds max. So the animation is obviously not being invoked correctly. Are there any obvious problems with my code?

Also, note my reference to createFlyStraightAnimator. As you can probably guess this is my very lame way of getting the camera to sit still at a particular spot. I've justmodified example code. What's the right way to achieve a camera in one static location?

Code: Select all


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

	if (anms)
	{
		scene::ISceneNodeAnimator* anim =
			smgr->createFlyStraightAnimator(core::vector3df(0,-20,50),
			core::vector3df(0,-20,50), 3500, true);
		if (anim)
		{
			anms->addAnimator(anim);
			anim->drop();
		}

		anms->setMaterialFlag(video::EMF_LIGHTING, false);

		anms->setFrameLoop(1, 200);
		anms->setAnimationSpeed(15);

		anms->setScale(core::vector3df(2.f,2.f,2.f));
	}
	smgr->addCameraSceneNodeFPS();
	device->getCursorControl()->setVisible(false);

	gui::IGUIStaticText* diagnostics = device->getGUIEnvironment()->addStaticText(
		L"", core::rect<s32>(10, 10, 400, 20));
	diagnostics->setOverrideColor(video::SColor(255, 255, 255, 0));*/

	int lastFPS = -1;

	u32 then = device->getTimer()->getTime();

	const f32 MOVEMENT_SPEED = 5.f;

	while(device->run())
	{
		//key stroke check code removed for brevity
	}

Re: Basic animation help - 3ds

Posted: Wed Apr 21, 2010 7:40 am
by randomMesh
sfkhooper wrote:all I see is my biped character just standing there, as he looks in frame 1 from within 3ds max. So the animation is obviously not being invoked correctly.
Maybe the animation is too slow? Try to increase the animation speed.
sfkhooper wrote:As you can probably guess this is my very lame way of getting the camera to sit still at a particular spot. I've justmodified example code. What's the right way to achieve a camera in one static location?
Just add a normal camera rather than an FPS camera.

Code: Select all

smgr->addCameraSceneNode();
And btw, if you scale a node, you should normalize the normals in order to get correct lighting. (I know you have lighting disabled, but just in case.)

Posted: Wed Apr 21, 2010 11:58 am
by freetimecoder
If I remember correctly, 3ds has a very limited, or no animation support at all. You have to use a format that supports animation (e.g. .x, .b3d, .ms3d, .md2)

greetings

Posted: Wed Apr 21, 2010 12:57 pm
by pera
no animation in 3ds, nothing you animate in max could run in irrlicht (easily).

you could maybe try exporting to X format, directX9 skin and bone.

best bet is blender exporter to b3d model type.

Posted: Wed Apr 21, 2010 1:14 pm
by sfkhooper
Thanks everyone for your replies. I don't see any of the formats suggested as export options for 3ds max though. Do I need other tools to convert to a format that Irrlicht can fully understand?

Posted: Wed Apr 21, 2010 1:57 pm
by freetimecoder
You have to search for a plugin that exports the format you want (google). Converting 3ds to something different with another tool will not bring back the animation.

greetings

Posted: Wed Apr 21, 2010 1:59 pm
by sfkhooper
Crikey! Begs the question then - why am I using 3ds max?

Can anybody recommend a decent 3d modelling / animation package that would be good for use with Irrlicht?

Posted: Wed Apr 21, 2010 2:56 pm
by Murloc992
sfkhooper wrote:Crikey! Begs the question then - why am I using 3ds max?

Can anybody recommend a decent 3d modelling / animation package that would be good for use with Irrlicht?
Blender+b3d exporter.

Posted: Wed Apr 21, 2010 5:34 pm
by pera
milkshape is simple, 20$, and its ms3d format is supported in irrlicht with animations (so I've heard, never tried it).

Posted: Wed Apr 21, 2010 7:55 pm
by Lonesome Ducky
+1 for milkshape. Even if only used for animation it is a useful tool definitely worth the price.

Posted: Wed Apr 21, 2010 9:57 pm
by Scarabol
+1 for Blender its FREEE and works well, with the modified Exporter:
http://irrlicht.sourceforge.net/phpBB2/ ... php?t=3864

MfG
Scarabol

Posted: Thu Apr 22, 2010 8:07 am
by pera
That exporter is from 2004?
Is it directX8 only?
I think that wont do skin and bone animations.

Posted: Thu Apr 22, 2010 10:52 am
by Bear_130278
3dsMax+Panda->.x 8)))

Posted: Thu Apr 22, 2010 12:59 pm
by Adler1337
Anim8or is free and easy to use and you can export to .ms3d with Ani2Pov.

Posted: Thu Apr 22, 2010 3:22 pm
by freetimecoder
+1 for Blender, user interface might seem a mess at first, but it is possible to do everything you need with blender. I switched from cinema4d to blender and have never regretted it.

greetings