PDA

View Full Version : Industry Technique - Real Time Animation


Kid-Mesh
07-06-2005, 02:07 PM
I've been a hobby game programmer for several years and always wondered how Real Time Character Animation is being done today since it changes so much. So if anyone with experience could answer this question I would be grateful :)


------------------------+

Ok, here is what has been my approach to animating a 3D character and then calling it in inside a game.

Lets say my character has a total of five typical animations which are listed below.

1. Walk
2. Run
3. Jump
4. Death
5. Idle

Now I would do something like the following.

*Animate each of the five animations and save them into one file.
Note: That my experience with this is limited to DirectX and .x files

A Fictional example of my method with frame numbers being used for demonstration purposes.

Walk Cycle: Frame 1 - 150
Run Cycle: Frame 151 - 250
Jump Cycle: Frame 251 - 290
Idle:Frame 291 - 330

Once I have my character fully animated then I just save out the animation file which now has five different animation sets in it. From within my code I can know call the different animations that I want using tagged frames or calling them right from the cycle start points themselves.

So here is my question(s)…Is that how it's done in the industry today? Is it close? Or do the pro's actually animate each animation into a separate file? Another thing I was wondering too is that do you guys actually animate the characters in place for walk cycles and such? :shrug:

Thanks

EricChadwick
07-06-2005, 07:38 PM
That's the way it's done, for the most part. We organize our moves a bit differently than others, not really in a linear fashion since we blend between anims. But most do it linearly.

About running in place, most developers do it this way. The idea is to let the user (or AI) control how fast and in what direction the character should be moving, rather than let the content dictate it (since the content is more limiting).

AFAIK this WIP section is rarely visited by programmers, so you might be better off posting something like this in the Programming section.

Some info about how others handle animations:
http://reality.artificialstudios.com/twiki/bin/view/Main/SkinnedCharacters#Exporting_Character_Animations
http://udn.epicgames.com/Two/ActorXMaxTutorial#Notes_on_preparing_your_scene

heavyness
07-06-2005, 09:10 PM
sorry if this doesn't help...

but you might want to pick up UT2004. they have a lot tools for character animation in there. you might be able to pick through it and see how they do it. i know you can watch each single animation and there is a running count of what frame its on... might help.

Teratron
07-06-2005, 10:24 PM
Yeah thats spretty much it,

Most of my experience is with doom, and they actualy use the displacement in the walk cycle to move the charachter, it was kind of strange. So you did actualy hafe to animate the orgin bone (or wahtever your charachter is linked to) to get movement. I dont think many other games do it this way though, (usualy just walk in place)

Kid-Mesh
07-06-2005, 10:34 PM
*Smiles* Yeah I was kinda worried that I wouldnt snag a programmer or two in here but this was cool. Maybe a mod could move it for me :shrug:

EricChadwick - Thanks for the links I'm going to see what I can glean from those

kole - That's odd as you bring up Unreal because someone else was telling me that...I have everything except that too :)...just bought BattleField 2 the other day (Outstanding )

Teratron - Thanks for the post, that is a weird way of doing it.

EvoG
07-06-2005, 11:13 PM
Actually only two projects I've been on over the past 8 years required we sequence the motion into one long string. I know from a programming standpoint, from your perspective, that it may be easier to call specific frames you want to use from one big sequence, so this is just preference. Personally its easier to call a single file than to parse frames.


Nearly 100% of the time, we deliver each animation as a separate file.


Some exporters create single files (like Unreals package files compiled with ActorX), from many separate files.


99.9% of the time, all root motion is stripped. So far it has not been an issue to animate the character translating forward with biped, and then setting the 'in-place' mode prior to export. Recently, we're now going to be exporting translations, which gives MASSIVELY superior animation playback as the animator is responsible for both balance and speed, but mind you, this is on a per-engine, per-coder basis, so stick with in-place unless otherwise stated.


My experience has been professional (mostly AAA titles), for whatever thats worth. :D
Cheers

Kid-Mesh
07-07-2005, 12:15 AM
EvoG - That was some nice insight, what you said in regards to " .... on a per-engine, per-coder basis, so stick with in-place unless otherwise stated." Kinda struck home because in the end I wonderd if that was what it really boiled down to.

Being a "Lone Wolf" coder I dont really get a chance to use that many engines that implement various ways of handling animation. But as it was stated before a peek at Unreal is starting to intrigue me.

EvoG
07-07-2005, 12:29 AM
I do "lone-wolf" (I like that :D) myself, which is why this is totally preferrential. I work with single files while a few coders may just like managing one file. Honestly, it just doesn't matter, ESPECIALLY if its your own dealie...at that point the only thing that matters is the final product, however its derived.

To argue one thing on the 'CON' side of it, you may not want to deal with one massive file as an animator. One of my characters may have, at the very least, thirty sequences, with upwards of 2000 frames total. While not terribly heavy, I dont like managing that all at once. I dont like having to set my begin/end frames per sequence while editing...its minor but its a workflow thing for me.

As for Unreal, you have a definite thumbs up from me, especially with their next version coming up shortly for public comsumption, and while I can't say anything about it, I can say for sure that they really have their shit together with regards to animation handling IMHO. I've been working with Unreal professionally seemingly since it came out (almost 10 years ago?) and its always been an outstanding performer, so by all means, check it out. ActorX makes compiling animations very efficient, working with separate anims until you're ready to digest them into one large sequence...a blend of both methods for you if you will. :D

But yea, I'm glad if I gave you something useful to think about.


Cheers!

Pyrotechnic
07-07-2005, 01:31 AM
Yeah, Unreal has a seperate anim for each action. I would deffinately suggest getting a copy, it's very informative from any view of a game; programming, anim, texturing etc...

CGTalk Moderation
07-07-2005, 01:31 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.