General Animation Help, Walking and vertical motion.

Hi Everyone,

I’ve been using blender for about 2 years now and am only recently getting into Animation. I’m ultimately an Android developer and will be writing an export script to use for animation code for an OpenGL model. I already have some python scripts written to output my vertex group weights, etc… and I’m now working on creating a smooth animation and instead of tackling it directly in code, figured I could use Blender to get a smooth look (timeline, speed, key points and angles etc).

So here’s a quick video of what I’m looking at, (and I’m a 2.49 holdout for the moment, btw…)

So what I’m wondering here… is if there is a simple way to create a “floor” that forces the entire model to push upward so that the foot slides back creating a normal “head bob” affect as the model walks. I’ve already figured that I could possibly figure out lower vertex locations in code and translate the base bone upward based on a simple difference, but would still like to see if I could achieve this in Blender to get a good idea of what my final animated model will look like in game.

Thanks to everyone! Blender is friggen awesome.

In a way, yes. What you’re looking for is inverse kinematics. The rig you currently have looks like it’s animated entirely in forward kinematics. To use IK, you would need an IK constraint (there are a variety of tutorials online for setting up IK rigs in Blender). The IK solver in that constraint figures out how to bend the leg bones in the chain so your foot placement is exactly where you want it to be.

Unfortunately, this also means some additional complexity on your end if you intend on using this in your Android game. You either need to support IK solvers in your code or you’ll need to write a Python script in Blender that bakes the IK solution to FK rotations in the leg chain.

Thanks Fweeb, that last part was the thing I was the most afraid of. Being for a small mobile screen (although not so small tablets I suppose) I don’t think I will be going through that much trouble. What I will more than likely do is stick to the forward kinematics and move the root/base/main parent (whatever it’s called) bone up and down to get it as close as possible. I’m not 100% decided on the game camera angle, and if it’s even partially from above, I’m pretty sure it’ll come out well enough.

As a followup question, I’ve only learned enough Python and Blender API to be dangerous… and I can’t quite get how to pull out the bone angles at the different key points. Looking at the 2.49 docs, I think I need the Pose Class, but I’m not sure how to work with it. It wouldn’t be the end of the world to jot down some frame points and angles I suppose…