Basic animation help - 3ds

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.
sfkhooper
Posts: 7
Joined: Sat Apr 17, 2010 1:22 am

Basic animation help - 3ds

Post 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
	}
randomMesh
Posts: 1186
Joined: Fri Dec 29, 2006 12:04 am

Re: Basic animation help - 3ds

Post 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.)
"Whoops..."
freetimecoder
Posts: 226
Joined: Fri Aug 22, 2008 8:50 pm
Contact:

Post 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
pera
Posts: 460
Joined: Wed May 14, 2008 1:05 pm
Location: Novi Sad, Serbia
Contact:

Post 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.
sfkhooper
Posts: 7
Joined: Sat Apr 17, 2010 1:22 am

Post 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?
freetimecoder
Posts: 226
Joined: Fri Aug 22, 2008 8:50 pm
Contact:

Post 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
sfkhooper
Posts: 7
Joined: Sat Apr 17, 2010 1:22 am

Post 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?
Murloc992
Posts: 272
Joined: Mon Apr 13, 2009 2:45 pm
Location: Utena,Lithuania

Post 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.
pera
Posts: 460
Joined: Wed May 14, 2008 1:05 pm
Location: Novi Sad, Serbia
Contact:

Post by pera »

milkshape is simple, 20$, and its ms3d format is supported in irrlicht with animations (so I've heard, never tried it).
Lonesome Ducky
Competition winner
Posts: 1123
Joined: Sun Jun 10, 2007 11:14 pm

Post by Lonesome Ducky »

+1 for milkshape. Even if only used for animation it is a useful tool definitely worth the price.
Scarabol
Posts: 167
Joined: Sat Jan 03, 2009 5:26 pm
Location: Aachen, Germany

Post by Scarabol »

+1 for Blender its FREEE and works well, with the modified Exporter:
http://irrlicht.sourceforge.net/phpBB2/ ... php?t=3864

MfG
Scarabol
pera
Posts: 460
Joined: Wed May 14, 2008 1:05 pm
Location: Novi Sad, Serbia
Contact:

Post by pera »

That exporter is from 2004?
Is it directX8 only?
I think that wont do skin and bone animations.
Bear_130278
Posts: 237
Joined: Mon Jan 16, 2006 1:18 pm
Location: Odessa,Russian Federation

Post by Bear_130278 »

3dsMax+Panda->.x 8)))
Do you like VODKA???
Image
Image
Adler1337
Posts: 471
Joined: Sat Aug 09, 2008 6:10 pm
Location: In your base.

Post by Adler1337 »

Anim8or is free and easy to use and you can export to .ms3d with Ani2Pov.
multum in parvo
freetimecoder
Posts: 226
Joined: Fri Aug 22, 2008 8:50 pm
Contact:

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