Different ways for character animation

Post your questions, suggestions and experiences regarding to Image manipulation, 3d modeling and level editing for the Irrlicht engine here.
Post Reply
Nova
Competition winner
Posts: 99
Joined: Mon May 09, 2005 10:32 am

Different ways for character animation

Post by Nova »

Hi everyone,

A friend at university and I were just debating about different ways how to animate and export character animation and I would like to hear some more oppinions and experiences.

Basically what he told me was, when he creates a walkcycle he moves the character forward in the animation. Then I'd have to offset the character by (e.g.) 30.f to the left so the animation continious smoothly. My concern was that the node position - which is handled by the engine - wouldn't move with the mesh, but it would jump at the end of every animation. And with it the boundingbox, etc. Basically the engine wouldn't handle the current position of the character at any given time which could cause trouble with collision etc.

My approach would be to animate on the spot and move the character in the engine. This of course can easily create the moonwalk effect we all know and love, because a character never moves smoothly from A to B.
My friend also argues, that he woulnd't be able to animate the character relative to an object, a ladder for example.

Does anyone has any experience with this problem. I am very curious how this is handled by other people.

So long everyone
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

I would say it's clearly better to animate it without moving the character, just keep them on the spot. Makes it much easier to handle in game for all sorts of reasons, including physics interactions.
Image Image Image
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

Ask your friend what he'd do to the node position when stopping a walk animation, or changing from a walk to run (or jump, or fall...) animation mid-cycle. ;)
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

I remember this technic from the good old times when I started coding for 2d games (3d no one could imagine there)... ;)

it was the a common and easy way to do moving animations...
e.g. you had a screen with 40 x 25 chars (letters) and each letter was build out of 8 x 8 pixel...
so you could only move in 8 pxl steps...
to get a smooth movement you changed the pixels 7 steps in moving direction and on the 8th step you moved the whole char and reseted the pixels...
this gave a very smooth movement then... ;)
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Dorth
Posts: 931
Joined: Sat May 26, 2007 11:03 pm

Post by Dorth »

Gah, I can't find it, but there was this awesome article that gave tips like sin() and non-centered characters to give a very nice movement that didn't do the moonwalk effect. It was cheap to implement too...
fmx

Post by fmx »

IMO its usually a heck of a lot easier to simply move a character in its animation rather than get the game to do it, although I agree its no where as accurate (nor practical for most games).

Somewhat related to this discussion is "Natural-Motion" and their ragdoll based system, which seems to use actual foot positions to adjust the global position of characters (through IK-chained ragdolls and whatnot).
It's such a cool concept, I wish there were an easier way of being able to make use of it in a cheaper way
Dorth
Posts: 931
Joined: Sat May 26, 2007 11:03 pm

Post by Dorth »

Well, you can use the foot bones to tell you where the foots are and move accordingly ;)
fmx

Post by fmx »

Relying on just foot positions isn't enough, imagine a character going from standing to doing a cartwheel.

I tried it with the root-bone a while ago, works well until you realise that there's no real way to change animations without causing dodgy jitters (even if you grab and interpolate the root-bone position from last frame of one animation to first frame of another)

or maybe I wasn't doing it right :P

anyone else ever tried it?
Dorth
Posts: 931
Joined: Sat May 26, 2007 11:03 pm

Post by Dorth »

Well create information bones?
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Post by Mel »

For an interactive motion it is more useful the "moonwalk" approach. Besides, if you sync well the animations with the motion, it is not that hard to make the effect of correct walking/running. On the other hand, perhaps for complex animations, like intros, or the like (real time generated cutscenes) it is nicer to have the motions complete in the character, and move only the camera to follow it.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
Nova
Competition winner
Posts: 99
Joined: Mon May 09, 2005 10:32 am

Post by Nova »

Hm, would it be practical to have a root bone for the character apart from the skeleton, which the animator moves any way he likes and the game then calculates the difference in position/rotation of this bone for every frame and sets the position of the node accordingly.

That way the engine handles the correct position but the animator is still able to animate the character relative to some object if he likes.

I'm just not sure if that may be too much calculation if it's supposed to happen every frame?
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Post by Mel »

You are just moving the same problem to another node. You still had to calculate how to move the rootnode accordingly, in a way that is too dependant on the animation itself, which, IMO, is not very desirable in game graphics. It is easier to move the rootnode in the engine, and that foots and the rest of the body moves on its own in the animation. Most, if not all, the 3d games do the character movement like this.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
Post Reply