Jump to content
Sign in to follow this  
madebygeoff

Getting IK legs to parent to hips

Recommended Posts

I've been looking to moving my rigging set up over to KineFX, but there's still a couple of things that seem strangely counter-intuitive. One of them is parenting the roots of IK chains.

In most any other program, if you parents the roots of your IK chains (your L and R hip) to your pelvis, then move your pelvis up and down, the hips will move, the feet will say planted and everything in between will be driven by the IK chain. In KineFX, parenting the roots just moves the entire chain up and down, like in an FK rig.

You can get something like the usual pelvis behavior with the center of mass control in the full body IK, but it's not as precise as the traditional set-up. Ideally you'd have both in your rig.

I'm sure I could rig up a VOP with some offsets to drive the foot IK control counter to the movement of the pelvis, but I'm wondering if I'm missing something obvious.

Share this post


Link to post
Share on other sites

Thanks for this Mestela! That works in a way, however I now get the issue that my reverse foot stays planted (ball, toe, heel) even though they're children of the ankle. The ankle follows nicely though! Attached a screenshot of the leg setup with reverse foot IK_setup.thumb.png.14d62b16d2a5157c2d987e625e106aa6.png 

Share this post


Link to post
Share on other sites

I haven't used the reversefoot VOP a lot. I tried it early on and it seemed excruciatingly slow. But it looks like it's wired up properly. If you post a file, we could take a look. You could also try the reverseroot SOP, which works pretty well, although it's still a bit heavy compared to doing the rig yourself.

But there one other thing to be aware of that matters more when you're doing more complicated IK chains. The IK Chains SOP and Two Bone IK VOP (which are both using the Two Bone VOP under the hood) work differently from the IK Solver VOP.

In the Two Bone IK, you have to blend the pelvis movement into the skeleton (the pipe that ends up in the 1st input of the IK Chains or Two Bone IK VOP). Then you animated the IK controls for the leg separately. This is what Matt shows above. It works, but I find it pretty counterintuitive compared to every other program I've ever used where you want the hip IK control to move to drive that hip movement.

In the IK Solver, it works the way you would expect if you've rigged in another program (but kind of opposite the IK Chains and Two Bone. You animate the pelvis, which drives the hip, and blend that in to move around the hip IK control. It's all a little confusing, so I attached a project file.

I asked SideFX about it since it seems confusing to me that they work in opposite ways and they basically said it was a "feature" not a "bug." Well, okay, I guess.

But it's worth knowing because I find the IK solver a more robust way to set up the leg rigs and required if you want to do three or four bone IK (a dog leg for instance).

Finally, Matt does some cools stuff above splitting out his rig pose controls so that it all looks cleaner in the viewport. I haven't done that here since once you attach control geo and wrap it all up in an HDA, it looks better, but it does make it a little confusing when you're manipulating the rig pose nodes.

IK_setup_v01.hipnc

Share this post


Link to post
Share on other sites

Oh, I just realized that is all in one VOP, not two separate screenshots. I think that's the problem. You may not be passing the proper info to the reverse foot because it isn't getting the output of the IK solver.

Have you tried doing the IK solver in one VOP, then append a second VOP below it and do the reverse foot in that one. I think that should work. If not, put a file here to look at.

Share this post


Link to post
Share on other sites

EDIT: right I think I actually got it to work now, hahah, will post a scene shortly!

Thank you so much for helping me crack this case, haha! 

I looked at your scene and I've tried the same setup, but when you put the reverse foot SOP after the rigattributeVOP, the reverse foot doesn't drive the IK. So it seems it has to come before the IK. However adding the reverse foot before also produces incorrect result where the ball also takes the toe when rolling, and the result becomes no ballroll, only toeroll. Also the reverse foot doesn't follow along with the IK leg.

Tried set it up manually to by just branching out the foot joints and reparent them accordingly to reverse foot. Blending that back to the stream of the second input before the rigattrVOP gives me that same result where the toe still behaves as it's parented to the ball, and thus produces no ball roll. 

Here's a scene that I've been trying to set it up in, with a reverse foot, perhaps there's something wrong with my inputs to the rig VOP, I'm pretty new to houdini so there could very well be a noob mistake here somewhere :lol: 

Screenshot from 2021-10-21 10-35-24.png

Screenshot from 2021-10-21 10-34-26.png

for_forum_v001_pernilla.hip

Edited by pernilla.j

Share this post


Link to post
Share on other sites

Here's the new scene, have a look. Everything seem to work i.e. ik leg follows the reverse foot setup and the whole foot follows the hips. The only issue now is to get the reverse foot being able to move with the heel control in the Rig pose. Right now the roll pivot is only correct if the foot is planted. Everything else works though ! 

footroll_setup_v001_pernilla.hip

Share this post


Link to post
Share on other sites

Alright, update 2. Got everything to work now. All i had to do was change where I had my rigpose:

reversefoot_drive_IK_leg.png.17fe6a60baf8ba9fff30fe3a4099baa1.png

Share this post


Link to post
Share on other sites

In your earlier file, the reason it wasn't working was because you had the reverse foot controls upstream from the IK, so when you blended back in the foot animation using the "skeletonblend_toes" node you were effectively blending back in the foot joint positions before the IK solver, overriding the positions coming out the IK solver and resulting in a foot that didn't move.

Edited by madebygeoff

Share this post


Link to post
Share on other sites

Can you post the revised file? I tried recreating what you're showing, but I'm getting double-transforms into the IK solver, so the foot roll does strange things to the leg position. But maybe I missed something in your set up.

Share this post


Link to post
Share on other sites

What about this? Keep the reverse foot after the leg IK, but add a second IK to add in the reverse foot ankle motion to the IK solve? There's probably a cleaner way to add in the reverse foot motion than the additional blast and skeleton blend, but I didn't have time to really clean that section up.

I might have missed something in your set up, but I was getting weird rotational behavior of the foot roll. This set up works the way I'd expect a conventional rig and as far as I can tell is more immune to flipping.

Interestingly, it's also pretty close to the set up I'd use for a dog leg (digitigrade) set up (a double-IK setup, not the usual 4-bone spring IK). Which means potentially you could wrap both as a single "Leg" HDA with options for digitigrade and platigrade. That'd take a little more experimentation, but... anyway. Hope this helps.

I'd still be interested in seeing your setup if you have a sec to upload. KineFX character rigging still feels a little like the wild west, so I'm curious to see other approaches.

leg-foot_v02.hipnc

Edited by madebygeoff

Share this post


Link to post
Share on other sites

Nice setup! I do think it's the way to go actually, creating the IK then blending it in twice, OR creating the reverse foot before and blending it in after IK leg. I guess you don't need a second IK, just do a skeletonblend. Here's my setup, It's pretty similar to what you got.

reverseFoot_v001_pernilla.hip

Share this post


Link to post
Share on other sites

Definitely agree that KineFX is a bit uncharted territory, not much tutorials or how to's out there, so I'm glad we can get a bit wiser together this way :) 

Just curious, wouldn't you rather use the IK solver for 4bones than having two IK chains for hind legs? I guess for insects and stuff the two IK chain setup is correct, but for like mammals? What's the advantage over the IKsolverVOP? 

Share this post


Link to post
Share on other sites

Both biped setups seems to work as expected, so I think it's just personal preference there.

As for the quad hind legs, it's also personal preference, but the 4-bone IK doesn't give you any control over the angle of the lower leg. Typically (in dogs at least) the angle between the lower leg (the meta-tarsus, which is actually an extended upper foot) and the upper leg (femur) is 180-degrees. They run parallel to each other with the tibia connecting them. If your model is built that way, the 4-bone IK works pretty well. But if it is modeled without that relationship, it can look a little weird and generally as an animator I just expect to be able to control that angle if I need to.

There's two ways I know of in other programs to get around that problem. One is to use an 3-bone IK on the upper leg and an aim constraint on the lower leg so that you can rotate the foot controller to adjust the angle. And the other is a 2-chain IK, which lets you rotate the hip controller to adjust the angle.

All three options work, it just depends on what you need. I haven't added a foot roll set up into any of these setups to see how that all works together. But the 2-chain biped set up above made me think that that might be the way to go.

dogleg_v05.hipnc

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×