Inverse Kinematics

Inverse Kinematics

Hello all.

I have almost finished physics and nowI must realize an inverse kinematics in my engine. Our graphycs and animation system is based on Collada. So, I we don't use HavokAnimation. On every step of animation every animation track is updated and on the render step every graphycs animated node update it's transformation matrix from animation tracks.

Maybe someone knows what is the easiest way to do inverse kinematics in such system.

Can someone explain how to realize inverse kinematics not using HavokAnimation tracks, skeletals etc..., but maybe onlyhkaFootPlacementIkSolver for example.

I understand, first is animation, then out inverse kinematics system will only correc that matrixes.

I suggested to add ragdoll to the physics world and thenmoving it's parts, along with animation. But I think this is wrong solution of the problem.

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
Best Reply

Quoting - ysolovyov

Hello all.

I have almost finished physics and nowI must realize an inverse kinematics in my engine. Our graphycs and animation system is based on Collada. So, I we don't use HavokAnimation. On every step of animation every animation track is updated and on the render step every graphycs animated node update it's transformation matrix from animation tracks.

Maybe someone knows what is the easiest way to do inverse kinematics in such system.

Can someone explain how to realize inverse kinematics not using HavokAnimation tracks, skeletals etc..., but maybe onlyhkaFootPlacementIkSolver for example.

I understand, first is animation, then out inverse kinematics system will only correc that matrixes.

I suggested to add ragdoll to the physics world and thenmoving it's parts, along with animation. But I think this is wrong solution of the problem.

Hi ysolovyov,

It's possible to use some parts of Havok Animation without using the others. So even if you're not using our compression and blending, you can use the IK as long as you can convert your data into something that we can understand.

In this case, I think what you'd need to do is:

  1. Construct an hkaSkeleton for your rig. This is pretty simple; you should just need to create an array of hkaBone's, and an array that indicates the bones' parents in the rig. You might not even need the hkaBones, but it can't hurt.
  2. Make a copy of the output of your animation system, and convert it to an hkaPose.
  3. Copy and convert a few other transforms from your engine into hkQsTransforms.

I had a look at parts of the hkaFootPlacementIkSolver to see if you could avoid using an hkaSkeleton and hkaPose, but it's pretty dependent on those.

You could also try doing some of this with a ragdoll like you mentioned, but I'm not sure how well it would work. For foot IK, you could use hkpKeyFrameUtility::applyHardKeyFrame to position the foot, but then the other rigid bodies in the leg would have to be fully dynamic in order to ensure that the constraints aren't violated. I'm not saying it's impossible, I'm just not sure how good it will look :)

Let me know if you need help with the steps above...

-Chris

Quoting - havokchris

Hi ysolovyov,

It's possible to use some parts of Havok Animation without using the others. So even if you're not using our compression and blending, you can use the IK as long as you can convert your data into something that we can understand.

In this case, I think what you'd need to do is:

  1. Construct an hkaSkeleton for your rig. This is pretty simple; you should just need to create an array of hkaBone's, and an array that indicates the bones' parents in the rig. You might not even need the hkaBones, but it can't hurt.
  2. Make a copy of the output of your animation system, and convert it to an hkaPose.
  3. Copy and convert a few other transforms from your engine into hkQsTransforms.

I had a look at parts of the hkaFootPlacementIkSolver to see if you could avoid using an hkaSkeleton and hkaPose, but it's pretty dependent on those.

You could also try doing some of this with a ragdoll like you mentioned, but I'm not sure how well it would work. For foot IK, you could use hkpKeyFrameUtility::applyHardKeyFrame to position the foot, but then the other rigid bodies in the leg would have to be fully dynamic in order to ensure that the constraints aren't violated. I'm not saying it's impossible, I'm just not sure how good it will look :)

Let me know if you need help with the steps above...

-Chris

Thanks Chris, I implement IK of LookAt solver. I usedhkaSkeleton (we even can't use it :) ), array of paret indices and two arrays of hkQsTransform: local and model, don't use hkaPose because it is only a wrapper for them and alsow i don't use it becausehkaLookAtIkSolver, when solveing thow the hkaPose, use array of bones of the skeleon,but I have none :) As you wrote it's pretty simple, once again, thank you.

Login to leave a comment.