Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a set of rigs of my own defined 3D doll in Javascript. I would like to animate a set of rigs to simulate walking, jumping, etc. Obviously I could do it by myself, but I'm sure I would be reinventing the wheel.

Are there algorithms, libraries (won't matter the language) or anything that I can download and it will give me the position of the rigs in function of time for many animations like walking, jumping?

share|improve this question
up vote 2 down vote accepted

Generally this is done by loading animation data (built in a modelling/animation program like Maya) along with your model and reading the transformation and rotational data for each bone in a rig from there. This is commonly called skeletal animation.

Instead of loading the data from pre-baked animation files, you can adjust the bones procedurally (this would be referred to as procedural animation). Doing this well for very human-like behaviors such as walking, running, and jumping is an ongoing area of research.

There isn't a set of simple equations that you can apply to your bones to get even vaguely realistic motion out of them. Most procedural animation pipelines end up being an exercise in fiddling with a lot of little variables in order to achieve a desired result. You can probably find engines that support full or semi-procedural animation (the Fabric engine claims to), or procedural animation suites that integrate into modelling packages like Maya. There are also papers on the ACM and IEEE sites dealing with the subject, although they are behind membership paywalls so I can't link them directly.

The state of the art (as it is appropriate for and applicable to real-time simulations, like games) is not very great -- 100% procedural animation often looks a bit mechanical.

Now, this isn't to say that procedural animations are of no use; often they are combined with pre-cooked animations, for example by using inverse kinematics to allow for dynamic foot placement on irregular surfaces during idle animations (IK is essentially a method by which you specify the desired target point of the endpoint of a bone chain, and the appropriate displacement and rotation of the bones down the chain can be computed taking into account constraints and whatnot).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.