[SOLVED] BGE 'run armature' actuator, HUGE performance drop

I have a rig with 32 bones
each shin bone has an ik constraint

I use the ‘run armature’ actuator to update the constraints

I turned down the iterations to like 10 on each ik constraint

when I run the game I get a huge performance bottle neck coming from animations?

even with the ik constraints disabled I’m still getting a huge performance drop, what’s going on?

I think so too much polies when deforming make performance drop a lot, especially with so much bones!

thanks for the reply but i reduced the poly count to like 500 to test it out and saw no improvement, also 32 bones is pretty minimal

“Animations” is taking up 85% in the profiler

You may not want to hear this, but the BGE’s animation system is poorly optimized for anything close to a modern armature setup in games. There have been some recent optimization efforts like making it multithreaded and bringing in animation culling, but that more concerns large numbers of individual objects rather than a single rig.

You pretty much have to make the rig as minimal as possible (and without IK) if you want any chance of the game running good once everything else is added, think of what you saw in games for the original Playstation or N64. I’m not saying it’s impossible to have some animated characters running around in a BGE game, just that you need to be smart of making sure that you only have the animation you need.

I reduced the bone count to 4 and saw no improvement, that’s why I’m wondering what is going on

In this case it might indeed be the IK solver, try removing it and doing all of the actions via manual bone movement and see if that helps.

ok I stripped the polygon count of the whole scene down to 300 and the bone count to 8, now I’m seeing 100% improvement. I guess you’re right, bge isn’t optimized as well as I thought for this, guess I’m going to have to be super conservative with my setup

removing the ik constraints wasn’t affecting anything

ok, I see what’s going on now, removing the characters hair (imported from makehuman) and the performance improves. The hair is super high poly and was probably weight painted to the armature, also removing the subsurf modifier from the body(also imported from makehuman) brings the frame rate back to 60

I’ll mark this as solved, nothing out of the ordinary happening, thanks ace dragon and ardriansnetlis

Hah… Makehuman makes humans for renders, for games you might need to make a lower poly humans yourself;)

I’d guess it was mainly the subsurf, especially if it was below the armature modifier in the stack- the subsurf would have to be reprocessed every time the armature changed and even professional engines can’t do that well (although Pixar is working on some pretty interesting real-time subsurf stuff last I saw…)