PDA

View Full Version : Stretchy, bendy leg + inverse foot dilemma. Assistance needed


Bleen
03-15-2006, 07:29 PM
Hello everyone.
I'm currenty working on a rig for a cartoon character. Such character has bendy, stretchy spine, arms and legs. The spine and arms are almost ready, and now I'm about to start with the legs.
But I realized that making a bendy, stretchy setup for them wouldn't work with the inverse foot.
Right now I'm using the spline IK, making it stretchy, and adding three extra controlers in the middle of the chain to control the curve, and make it smooth or mark the elbow / knee. I've used this for the arms and the result was very nice.
The problem is the legs. Since the inverse foot makes the "real" foot stick to it until the leg can't straighten/expand anymore, it wouldn't be useful with an infinitely stretchy leg!
(or so I think)

Does anyone have an idea how to work around this? Any other foot rigs?

I thought about making a simple FK foot and having a movable pivot for the sole... would this work?

Many, many thanks!

PS: I'm working with Maya 7.0

joconnell
03-15-2006, 10:13 PM
Heya bleen - the way you deal with this is to ad a control that only adds in the stretch command once the distance between the hip and the ankle goes past its normal length (which happens to be the length of the upper and lower leg bones added together.). You can either do this with an expression or alternatively with a condition node - you can feed the normal value of the leg if the distance between the hip and ankle is below the normal distance but a different value once it gets over - plug this into the scaleX value of each of the leg bones so that if the distance between the two is at a point where it should stretch, the scalex of each bone gets affected.

Bleen
03-16-2006, 01:31 PM
joconnell, thanks for replying.

But that's not the problem... I already know how to make a stretchy leg / arm using an ikRP solver...
In fact, I'm NOT using an ikRP solver, but a spline solver.
This is why:
This character has stretchy legs and arms. Plus, the elbows and knees can form a sharp angle or a smooth curve, depending on what the character is doing. And the animator also wants to be able to stretch the limbs to whatever lengths he requires, without losing the ability to form a knee or an elbow (which happens when you use a stretchy limb using an ikRP solver).
So I made 9 bones, and added a spline IK. I added an arc length node, divided it by its length, and input that to the scale X of each bone (but not the last in the chain).
This works OK. The bendy, stretchy limb is not the problem.

The problem is the foot control.

I want to add an inverse foot to this rig. But the inverse foot works with IKs from the "real"foot to the inverse foot. This makes the foot stick to the inverse foot, except when the leg length is at its max. Then it starts to distance itself from the inverse foot, first the heel, then the ball, and lastly the toe. This makes animating walks a "wal in the park" (pun intended). :D

BUT I'm making a stretchy leg, which means there is NO max length of the limb. So the foot would always stick to the ground. I figure the way to avoid this is to make an attribute "max lenght", which can be controlled by the animator. This would make the current length of the leg be it's max, no matter if it's the leg's original length or not.
BUT here is the problem: The scale X of the bones is driven by the length of the curve, which goes from the first bone to the last, and is dependant on the spline. If I limit the scale X with a slider, what would happen with the spline controller at the end of the leg? I think you would be able to still move it, since the Translate wouldn't (and can't) be limited... So the bones would stick to a certain length, but the spline, the ik and the controller wouldn't. This would cause problems with the shape of the curve, and this also leads to my next question... Where to add the ik going from the ankle to the inverse foot ankle?

Any help will be great! Thanks :love:

joconnell
03-16-2006, 01:50 PM
Hmm, maybe do something like the fk / ik arm thing where you have a non stretchy ik leg and the stretchy ik leg and if the stretch goes below a normal length get your main bones to use the scale, position and orientation of the non stretchy limbs. I'll have a bit of a think about this over the next while.

eek
03-16-2006, 11:50 PM
Ok,

I'll tell you how i do it. Ive reverse foot and natural foot rig, plus fk foot,fk/ik built into mine.

So i have 2 systems, pure stretch, and pure fk. With the pure stretch i have a slider i can blend between no stretch and infinite stretch, the leg will be glued to the floor with infinte stretch. I can still use reverse foot when its glued. The leg doesnt just constantly stretch however when it get back to its original length it acts like a normal leg, only when its past its ik length does it begin stretch.

With the natural foot (a result of the reverse foot) if i pull my character above the ground with no stretch, the foot will aim to the floor where its control is, blending to stretch the foot will curl back nicely into place. I, also have dynamic bend bones based on joint angle and, length controls of the chain which auto update the ik (x translate)

The reverse foot can work at any time in ik.

So in my system with ik, i have the stretch, length, reverse/natural foot/fk foot. In my fk i have its own length control, and fk foot. And the combiner chain has its own bend bone as its a result of its angle all controllable too.

I have buttons to snap fk to the ik and back. At one stage i had the fk length auto adjust to the ik, but it gets problematic.

I kept the two systems seperate because you can get into problems when mixing them together. I dont use length to get my stretch, i have constraints, in a very simple stable solution that could be built in maya easily.I am controlling the length of the bones but via a changeable ik. Basically i have a floating ik system that i can control and the bones piggy back for the ride. I think in maya you can only use bones to create ik chains.

animationrigs
03-17-2006, 12:47 AM
joconnell, thanks for replying.

without losing the ability to form a knee or an elbow (which happens when you use a stretchy limb using an ikRP solver).
Any help will be great! Thanks :love:

You can get around this by using a knee IK type solution, ie give the user a control that they can pull to position/bring back the knee. The other thing you can do is add an overall stretch that would stretch the leg to "meet the foot"....as far as your stretchy leg/iksplilne leg problem: Could you explain why it is that the spline IK from hip to reverse foot doesn't work/isn't what you want again. It seems to me that would work just like the spine...ie you place the foot and the leg stretchs to meet it with clusters along the way for shaping the leg?? or is it that you want the foot to be stretchy too.

Bleen
03-17-2006, 01:37 PM
eek, thanks for the great advise :bowdown:

That's a hell of a rig, but it's beyond my rookie rigging skills. :blush:

So far I've built an FK foot with a "pivot" paramater, which is a float from 1 to 3.
1 = pivot on ankle. 2 = pivot on heel. 3 = pivot on ball. This is all controlled by the bottom control curve of the ikspline. So one can manipulate the foot and place it wherever it's required, and it'll stick. To make a walk, one can simply keyframe the rotation, translate and "pivot" attributes. The only problem seems to be the tip of the foot, since it always requires manual rotation...
It's not very pretty, and certainly it doesn't work as well as an inverse foot... but it's all I could come up with.

I, also have dynamic bend bones based on joint angle and, length controls of the chain which auto update the ik (x translate)

I wonder how you do this... I mean, my bend bones are based on the ikspline, meaning I have three handles for the knee, which can be manually placed AND are also driven by a point and aim constrain to the end controls of the limb. I have a "bendy" attribute, which changes the weight of the constrains of those handles, widening or shortening their distance between each other. This also allows me to put the knee of the character anywhere in the leg, closening the knee to the wrist or pelvis...
So I don't know what you mean when you say you can make bendy bones based on the joint angle.
As for the auto aupdate ik, I also wonder how you do it. Doesn't the ik drive the bone's length? I have a curve length node at the end of the spline, which is driven by the end cluster, which is driven by the control curve at one tip of the limb. The ik "magically" follows the end cluster.
When I made a stretchy limb with ikRP, I parented the ik to the control curve directly. And the distance was measured using two nulls and a locator.
So I wonder how you can update the ik to the bone's length, when it's the ik that drives the bones length. Or maybe I'm all mixed up and I'm talking nonsense :shrug:

I have buttons to snap fk to the ik and back.

I dont use length to get my stretch, i have constraints, in a very simple stable solution that could be built in maya easily.I am controlling the length of the bones but via a changeable ik. Basically i have a floating ik system that i can control and the bones piggy back for the ride. I think in maya you can only use bones to create ik chains.

I have absolutely no clue how to make these setups, I have so much to learn...

You can get around this by using a knee IK type solution, ie give the user a control that they can pull to position/bring back the knee. The other thing you can do is add an overall stretch that would stretch the leg to "meet the foot"....as far as your stretchy leg/iksplilne leg problem: Could you explain why it is that the spline IK from hip to reverse foot doesn't work/isn't what you want again. It seems to me that would work just like the spine...ie you place the foot and the leg stretchs to meet it with clusters along the way for shaping the leg?? or is it that you want the foot to be stretchy too.

Thanks a lot for the reply. I actually have that control, using the ikspline for the leg.

The thing about the ikspline with the reverse foot is problematic to me because, since the leg can stretch infinitely, the foot will always stick to the ground. When you use an inverse foot with a defualt ik leg, and you move the foot back, the leg will try to follow the inverse foot until the length is at its max. Then the foot will distance itself from the inverse foot in this order: heel, ball, tip. This makes animating walks very easy.
This is the main problem.

Thank you all again for the great replies, I'm still working on this rig and, even if I have a foot now, it's far from what I wanted initially. I'll try making another skeleton with FK controls and making a third skeleton which will point and orient contrain each bone to its equivalent in the ik and FK skeletons. Then make a ik/fk blend attribute and make a set driven key which will drive the point and orient constraints of each bone.
This is a LOT of work... I should mention that the leg has 17 bones... make that times two. The arms have 9 bones each... 52 bones total... times three... That's a LOT :sad:

Further advise will be greatly appreciated, thank you! :)

eek
03-17-2006, 02:56 PM
I basically have a custom ik chain, built from a heirachy of nulls, with an ik chain - which (in max) a can translate in x , i.e there length. Now this is a floating heirachy, so i have a set of bones that, get piggy backed onto these via constraints, and stretch naturally. In max you can make a bone stretch just by turning it on to stretch. In maya i would do the same but just drive the x translate via the distance of the null in this 'special hiearchy.' I use the standard reverse foot, - i could of added a custom animatable pivot but that would get a little crazy.

The way its setup, means you have control over, stretch, the length of each bone - but this length is clever in that it only starts to stretch once it hits its limit, else it becomes like a normal leg.

My bend bone is very simple, and based on the angle of the chain, when the characters leg, rotates more it bends more, this is all controllable, so you can make it go backwards if you want, but the key with this is when the leg its stretched theres no bend in it - it goes flat automatically. Else you would have to keep setting the slider back to 0, when the leg is out stretched. This is all linked into the length too, so one limb could be short, but the bb will still work with it. Interpolation math is used here. Im looking into better curves for the bb, i like mayas nurbs cv curves, so i may have to write my own.

Buttons and custom attributes are easy in max, and houdini's 'spare' attributes, I dont know about maya.

Ah yes i see what you mean about, the reverse foot issue, but i have a length control, so i can turn the stretch completely off but still have the length, so eg. I can stretch the leg backwards, match up with the length controls - turn the stretch off - nothing will change but now its become a very long ik standard leg. With everything working.

CGTalk Moderation
03-17-2006, 02:56 PM
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.