Abnormally low framrate, high physics %

I’m working on an fps, and i wanted to implement legs, arms/hands, and a lower torso to the character, feeling it adds realism to look down and not see empty space:p however it makes the framerate, which was otherwise 55-60 frames per second, dive down to 4-6 frames per second.

I’ve searched the forum and read that too many vertex groups, bones, and constraints slow the bge down. I have no constraints, 49 bones/vertex groups, and 32,000 vertices in the scene. Should this really be making such a dent in the fps, or am is it just a matter of not having the right settings?

on blender 2.49 armatures are way too heavy, on 2.57 this changed and the armatures on game engine are a little more quick(but not enough), for tell you the truth you need to minimize the bones you use per character, the limit for the bones per vertex is really ridiculoous on blender(almost impossible to work with) try to use less bones as you can because 32000 vertices isnt is that mutch, maybe your computer cant handdle that, you can try to post your hardware here for us to check, but I have a GTX 285 and a i5 processor on this computer and the armatures are still very heavy.

I have a MacBook Pro with NVIDIA GeForce 9400M and 2.53 GHz Intel Core 2 Duo. I guess i cant have three bones per finger:p

Your system spec is way higher than mine and I use much higher spec scenes. IK is especially bad for framerate though if you have that on all the fingers. Having said that,it still shouldn’t have such a nasty impact.

I can test my addon with over 20 armatures containing 20 bones each, each bone being affected by a copyRot constraint from a rigid body physics object and each character mesh having 3000 quads before my framerate gets as bad as you’re experiencing. Considering all that, it’s usually the scene graph that’s eating the most resources and my starting framerate is about 30fps.

I’ve got a 5 year old laptop: 1.66GHz Centrino Duo, GeForce Go 7600 graphics.

You initially said high physics % though… Physics has nothing to do with armatures. Could you give more details?

Edit: Incidentally, IK and armatures in general are an issue with all games. Some AAA games such as GTA4 use shape keys to animate the fingers to avoid having bones for them.

Edit2: I’m using a patched version of 2.57b. The patch only fixes a Blender crashing bug and hasn’t made it into trunk yet. The bug crashes Blender when a rigid body joint exists on a hidden layer in the game when the game engine starts.

@FunkyWyrm - Really? I didn’t think that a AAA game studio would use shape keys just to animate fingers, but I suppose that the tradeoff between armature computation cost and shape key animation is worth it.

sorry asce but i dont think so!

@SolarLune: I don’t have the link since I reinstalled windows, but there was an article on some game dev related site that mentioned the shape keys thing. It kinda makes sense since in gta4 the fingers are rarely moved so it’s worthless computations to calculate the bone orientations all the time. 10 fingers with 3 bones each is 30 bones. This can more than double the number of bones in the armature for very little gain in realism.

Yeah, you’re right. It makes a lot of since - most times, the fingers are still, and the hand moves. If every person in the game had even just three bones for the four fingers and another two just for the thumbs, that will be 10 for just one NPC. If you have three or four NPCs onscreen, that’s way too much work - this isn’t even counting any of the other bones (legs, back, arms, etc).

you can try to use on both, armature and mesh to no colision, that way they ll not change the pysics. then you could try to parent the armature to an custon shape.

When i don’t parent the armature to the player bounds (I’ve followed a set up similar to that in BlenderCookie’s bge tutorials) the whole scene runs at 60 fps! It seems like it was a collision problem, the bge went haywire when the player bounds was constantly colliding with the armature and/or character mesh. I just made the box (player bounds) hollow using a solidify modifier and it runs at full speed! I do think I will take the advice on the shape keys for finger animation, the added control of the deformation seems worth it to me:)

I don’t think you should have gone with making the box bounds hollow with a solidify modifier, as that makes the physics more complex than they need to be. It’s better to have the armature parented to the box bounds, but make the armature and mesh set to ‘No Collision’, and just test for collisions and physics using the Player’s bounds.

That’s a good point, hadn’t considered that. using no collision worked well, it was up to 60 fps again. Thanks for the help:)

That’s a good point, hadn’t considered that. using no collision worked well, it was up to 60 fps again. Thanks for the help:)