09 March 2010

Icky animation

It's been a while since I updated. I've been rebuilding the inverse kinematics system for animation I mentioned a while back. Although it's a system hog, in the end it's way too useful to abandon. Normal animation (frame by frame, pre-made) would be very time consuming to do for every entity in the game.

So, like those big 3D games, I'm building a skeletal system that's mostly shared across all entities. This means I only animate that skeleton once and that animation can be shared across a number of characters (as long as they have 2 legs, arms, and a head). Using this system, I'd still have to hand animate that skeleton but it'd be much easier with inverse kinematics - moving the foot would move the thigh and shin accordingly whereas without IK, I would have manually reposition and re-angle the thigh and shin each frame. So i only really need to focus on moving the foot about. Of course, there do need to be a few constraints here. A leg shouldn't bend backwards for example, so I'm making angle limits on the bones of the skeleton.

It's all very boring to explain so I'll stop there, and post a ragdoll/animation demo later on. If my horrifically vague and inaccurate explanation of what IK fails, have a look at this video. The only part of that robot's arm that is moved is the bit attached to the wheel. The rest of the arm works out how to position itself from there.

UPDATE: Instead of manually doing the animation, I'll be taking a procedural approach. So animation will be worked out on the fly. As a rough analogy, I won't show it how to walk, instead I will explain the concept of walking to the computer and it'll work out how to place its feet and move.

No comments:

Post a Comment