Jump to content

IKFK Solver


Milan

Recommended Posts

Hey everyone.

 

I stumbled across something and though it might be a good topic to explore and see if we can get something similar in Houdini.

 

Video will show more than me trying to explain so here it is. 

 

 

It doesn't seem very complicated per se. The question is how to make it looking nice and simple for the end user. I for one would save tremendous amounts of time having similar functionality without the need for custom setup every time.

 

Play, try and discuss....go

Link to comment
Share on other sites

Every regular IK chain in Houdini has IK/FK blending built-in, along with "swivel angle" (called "twist angle" in Houdini), as well as "twist target" option. To do the stretchy bones, one does need to set up the correct bone length expressions so that it's scaled to overstreched bone chain length though. I think their "scale" control is just a scale on the bone lengths?

Link to comment
Share on other sites

IK/FK blending is not the issue here. The ability to animate/control IK and FK at the same time is. Pretty much as if IK and FK poses were constantly matched on the go regardless of what controllers you are using. This is great for animator who don't have to think about switching animation modes. The IKFK blend in the video doesn't apply to controllers, but only the type of interpolation between given keyframes.

 

Giving animator the ability to freely grab and move the wrist to place, but keep the interpolation in FK mode would be tremendous time saver as IK posing is much faster than FK, however IK interpolates in straight lines of course unless you add more inbetweens. This system effectively eliminates this problem.

Edited by Milan
Link to comment
Share on other sites

Pretty much. Pose tool is a great when all you need is FK chain, but in case of legs for instance, you need to be switching between IK and FK interpolation because of foot planting. While pose tool give IK like control, it doesn't provide this essential functionality. 

 

Now I was hoping that if I make IK chain, I could simply blend between the interpolations, using IK goal when needing IK and pose tool when in FK, which for animator would feel like animating in the same way, but he'd be getting rotation base movement in FK and position based in IK. The main issue here is, that as soon as bone chain has IK attached to it, even if the IK blend is set to 0, hence bones are in FK mode, the pose tool no longer works and everytime you choose it is only moves the IK goal. 

 

So yes. Pose tool, but with goal planting.

Link to comment
Share on other sites

There's a weird hack where you can turn off the IK interaction for the pose tool in the InverseKin CHOP (last parameter). Then the pose tool can be used when the IK blend is 0. To move in IK, then you need to click on the IK goal object to move it.

Link to comment
Share on other sites

Great that get's me 80% there. Now the only thing left is getting IK and FK poses to alway match. It's easy to do it on a press of a button. Script finds what needs to be matched and does it, however I can't figure out how to do it silently in the background without too much of an overhead.

 

So everytime I move IK goal I want the fk chain to match the IK pose and when I rotate (or use pose tool) in fk mode I want IK goal to match the end of chain. I managed to get it working using python callbacks, however that becomes a bit unstable and slow (technically it's a hacked recursive loop so no wonder it's slow). Ideally I'd like to get a type of callback that only executes when I let go of the transform handle so it only matches the pose once per move, instead of with every changed value. 

 

Really the problem became this. Callback on a parameter only evaluates when manually changing the value, so that's no good, because it doesn't work with viewport interaction. python eventCallbacks evaluates all the time when using transfom handles (I've tried parmTuple and InputData). Is there a way to get script to run when value get's changed () but not while I'm dragging in the viewport?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...