Rigging the Foot

Ideas, enhancements, feature requests and development related discussion.

Rigging the Foot

Postby dcuny » Thu Jan 17, 2008 8:22 pm

Something that's been floated around a bit is, in addition to "generic" bones, for JPatch to supply "specialized" bones for arms or feet. We've talked a bit about rigging the foot, but it's on an unrelated thread, so I figured I'd try giving the topic its own thread.

Obviously, JPatch should provide more general options, because one type of rigging solution won't meet everyone's needs. But I think a general solution would be a good thing.

My impression (quite possibly wrong) is that the leg is pretty much like an IK arm - planar IK setup. Because it's constrained to a plane, you've generally got a null target to keep the knees oriented in the proper direction. The IK chain runs from the hips to the ankle - not to the toes. You can see an example of that here.

The foot itself is another IK chain, running from the ankle to the the toes. This allows the foot to be bent flexibly. There's an "FAQ" DVD for Blender's Mancandy Rig, and I noticed that the example video at the bottom of the page gives some examples of the foot rig.

Prior versions of JPatch allowed a bone to be "locked" into position, but didn't implement IK. I did a simple walk with it, and I thought it came out OK.

Any ideas how you want to approach default rigging of the leg and foot for JPatch?
dcuny
 
Posts: 2902
Joined: Fri May 21, 2004 6:07 am

Re: Rigging the Foot

Postby sascha » Thu Jan 17, 2008 8:42 pm

You've mentioned the reverse foot rig, but I've had no time to delve into it so far.
The IK solver I have in mind is basically a simple rotate plane solver, so any insights on how the reverse foot rig can be done are appreciated. As you said, a naive approach would allow to position (or lock) the ankle, but most of the time (at least for locking) you'd want to lock the heel, the ball or the toes, and not the ankle. Ideas?
sascha
Site Admin
 
Posts: 2792
Joined: Thu May 20, 2004 9:16 am
Location: Austria

Re: Rigging the Foot

Postby dcuny » Thu Jan 17, 2008 8:58 pm

There's also a tutorial here on rigging the foot for Blender, but it looks pretty complex. I need to play with it some time to figure it out.

So standard caveat: I don't have nearly enough experience here. :(

Using a plane solver for the leg -from hip to ankle - is probably good enough. Things get tricky with the foot, because you want to be able to lock down the toes, and lift the heel, or bend the toes.

The problem with the foot is that it acts in two directions. If you lock down the toes and lift the ankle, you want the foot to flex, but not to move out of place. On the other hand, if the foot is not locked, you want to be able to grab the ankle or toes and flex the foot - so the chain runs in the other direction.

So I think it's sort of the classic "locked" behavior we'd talked about before - normally, the IK runs in one direction, but if you lock the end of the chain, the IK should automatically run in the other direction.

You'd want the legs to have the same sort of "lock", so that ordinarily you could grab the leg from the ankle and position it with IK. On the other hand, if you "locked" the ankle and moved the hips, you'd want the IK solver to run in the other direction.
dcuny
 
Posts: 2902
Joined: Fri May 21, 2004 6:07 am

Re: Rigging the Foot

Postby dcuny » Wed Jan 23, 2008 7:14 pm

Digital Character Animation 3 provides a good overview of rigging the foot. The problem with the foot is that it's got three pivot points:
  • The heel
  • The ball
  • The toes
So you first set up a hierarchy of four bones:
  • Hip to knee
  • Knee to ankle
  • Ankle to ball
  • Ball to toe
You then set up four null targets:
  • Foot target Parent of the heel.
  • Heel target Parent of the toe.
  • Ball target Target of the ball.
  • Toe target Target to the toes.
Here's a diagram. The null targets are set outside of the foot so they can be manipulated:
FootHierarchy.png
FootHierarchy.png (3.81 KiB) Viewed 6265 times

Control the foot by moving the Foot target - lift it and the foot will follow. The rest of the foot is controlled by rotating the foot targets, not by moving the nulls. Since this is generally a pain to do, you normally end up creating three sliders for the null targets (heel, ball, toe) to control the foot, instead of working directly with it.

I assume that you can set up something similar in JPatch without null targets. The main reason for using targets is that it makes it a lot easier to select controls. I seem to recall someone suggesting using proxy targets - basically, a copy of a joint, only it's placed somewhere outside the mesh, so it's easier to see and select. That might not be a bad idea here.

Controlling the hand is generally done with a set of sliders - one for each finger to control the curl, and one to control the spread of the fingers.
dcuny
 
Posts: 2902
Joined: Fri May 21, 2004 6:07 am

Re: Rigging the Foot

Postby sascha » Wed Jan 23, 2008 10:51 pm

Yes, but how can you e.g. lock the ball or the ankle in this example? I mean, if you can just rotate, but not move them?
sascha
Site Admin
 
Posts: 2792
Joined: Thu May 20, 2004 9:16 am
Location: Austria

Re: Rigging the Foot

Postby dcuny » Thu Jan 24, 2008 1:45 am

Gah... I totally blew this one.

Here's another try:
foot_ik2.png
foot_ik2.png (2.81 KiB) Viewed 6248 times

There are four different chains:
  • Hip to Knee, Knee to Ankle (blue)
  • Ankle to Ball (purple)
  • Ball to Toes (green)
  • Toes (orange)
I think it's akin to this rig.

The key to this rig working is that the foot isn't connected to the leg. This allows the hips to drive the feet, without having to lock down the feet. But it presents a problem: how do you keep the leg and foot in sync?

The solution is to parent the foot and the end of the leg to the same target - the foot target. So moving the foot target causes the foot to follow the motion of the leg.

I'm still trying to grok the wonky setup of the foot. since none of the parts of the foot are attached, they're parented together with the null targets. That mean you can't move the null targets without messing up the foot. You can only rotate the foot targets. That much makes sense. But why the foot can't be a separate chain isn't clear to me at all. :|
dcuny
 
Posts: 2902
Joined: Fri May 21, 2004 6:07 am


Return to Development

Who is online

Users browsing this forum: No registered users and 2 guests

cron