Questions about rig and it's impact on game performance.

Hi, everyone.
I have some questions about rigging for a game character.

I read somewhere before, that IK animations in our rig can decrease performance in a game. However, if we don’t use IK, and use FK instead, we will get more keyframes on more armatures. Afaik, more keyframes will increase file size. But will that also has some kind of negative impact on performance?
Generally, which one is better for game character? IK animation or FK animation?

Thanks for any help.

absolutely, as performances bake all, zero dubt.
no matter how many bones need a new keyframe since this mean that the IK have a long chain that due a giant mountain of calculation.
even decrease the iteraction do nothing since , it give some speedUp only when here too low and the action is broken.
there already some system of autolimitation.
the only way to speedUp IK is not use it. (IN GAME OF COURSE)

from my test i can say that one IK cost more or less as 20 bone or more

as size i not know…:wink:

Wow, that much, eh? So it is true that IK is not recommended for a game character. Thank you very much for your help, Marco.
FK all the way, then :).

It’s worth noting that Blender’s IK solver is particularly slow because it’s optimized to be versatile for rendered animations with any number of bones in the chain, if you’re using a two-bone chain (EG most human and animal limbs) it should be possible to script a simple IK solver in python that uses trig to get the angle of the bones rather than iterating towards the target hundreds of times (after all, if your IK chain is two bones you have a triangle where two side lengths are the bones and the last side length is the distance from the root of the chain to the target location, all you have to do is solve for the angles of the triangle) Probably still not as efficient as a commercial engine’s IK solver, but it should give you a much smaller FPS impact while still allowing you to use IK. I keep intending to try this myself but I am having trouble finding the time.

At least use iTaSC instead of the legacy solver. When configured correctly, it gives about a twenty percent speed up.

Some other tips:

  • Use the BGE Deformer
  • Enable the restrict animation updates option

Thanks. I never knew about iTaSC before. I’ve just googled it and did some quick read about it. Good to know :slight_smile:
Alright, thanks for tips everyone!

good suff .
effectly , 2 bone with IK can have one code much more easy and fast
:yes:

anyway i found a way to not use it at all in easy way .
instead of “locrot” -> visual locRot (differently to bake action , this is a way more flexible (not waste all action)
then disable all constraint with 2 line of code .seem that work well