blender-iks-to-fks icon indicating copy to clipboard operation
blender-iks-to-fks copied to clipboard

FK Result Differs from Original Animation

Open Vercidium opened this issue 5 years ago • 7 comments

Hi there,

We've been using this script for a while for our game (it's a lifesaver, thank you!), but realised that in some animations the bones slowly slide away from their correct positions.

For example the feet of the character slide when they are meant to be still, and their hands move away from the weapons they are holding. Our modeller says it might be because the feet are no longer anchored in the FK result.

I've attached our original .blend file here (pre IK-FK conversion).

bandit.zip

Vercidium avatar Apr 05 '19 03:04 Vercidium

@Vercidium thanks for reporting this! Glad you're finding the script useful!

A couple questions before I take a look

  • Have you made sure to unchecked Deform Bones on all of your IK/control bones?

  • What are the names of the animations that aren't working properly?

  • Had this always happened or is this new?

  • Which version of Blender?

In general any context that you can give on when/why/how this seems to be happening would be helpful.

After that I'd be happy to dive into your .blend file and see whatsup!

chinedufn avatar Apr 06 '19 16:04 chinedufn

Lastly, and most importantly (:, if you can try your best to delete as much as you can from your model in order to create the most minimal example mesh/armature possible that demonstrates this broken behavior I'll be able to plop it right into the test suite and take a look at what's wrong.

Cheers!

chinedufn avatar Apr 06 '19 16:04 chinedufn

@chinedufn thanks for your response! I've attached a minimal version of our blend file.

  • Toggling the Deform Bones option doesn't change anything
  • We've only included one animation in the test file
  • This has happened minimally on some of our first person view reload animations in the past, but we've just ignored it until this point
  • We're using version 2.79

Normally the feet would not rotate with the hip because of the IK (the feet are planted). When it's converted to FK, the feet rotate with the hip.

Thanks in advance for your help

testscript.zip

Vercidium avatar Apr 08 '19 04:04 Vercidium

Awesome thanks!

Just a heads up - I use blender-iks-to-fks very heavily so a bug like this is definitely on my radar.

I'm approximately 5-6 weeks out from focusing on enhancing some of the Blender tooling that I use ... which would mean that you wouldn't see a solution to this for some weeks.

If that's a huge issue let me know and I can try to re-arrange things that I plan to work on and/or figure out a way to help you take a look at solving the problem!

If it isn't an issue - great - I'll definitely be getting to this!

chinedufn avatar Apr 12 '19 11:04 chinedufn

Unfortunately this is a big issue for us as we're using it for all animations in our first person shooter that we're starting alpha testing for soon. Most animation differences aren't noticeable, but there are some that stand out quite a bit.

We've figured out a temporary solution by creating keyframes at every frame of the animation before converting from IK to FK, which is good!

If you're busy we don't want to put pressure on you, we're happy for an update to the script when it suits you better.

Thanks again!

Vercidium avatar Apr 12 '19 11:04 Vercidium

Update!

Numerous keyframes aren't a problem for me as I export the rotations of each bone at each frame to our model file format anyway. I removed the code (starting at line 165) that removes the extra keyframes generated from your script, and problem solved! The animation copies across perfectly

Vercidium avatar Apr 12 '19 11:04 Vercidium

Awesome, so glad to hear!

I'll leave this issue open and still take a look at the issue next time I'm working on this library. But thanks for letting me know that you're all set.

I haven't taken a look at your model yet but I have noticed that bones that have Inherit Rotation don't get FK'd properly so just a heads up in case you ever run into that.

Anyways - thanks for the update!

chinedufn avatar Apr 21 '19 22:04 chinedufn