instancing animations

Hi everyone.

I’m running a scene with 40+ identical animated rigs. The rasterizer uses next to nothing (these are low-poly meshes), but the animations are really sucking up CPU time.

I know with panda3D it’s possible to animate a mesh once then just place it in the scene graph multiple times.
Is there a clean way to do this with the blender game engine? These instances don’t need to have any logic or physics attached.

I’m not sure if this will help, but make an empty that spawns your animated mesh, and then copy the empty to the origin, of all of your anamated meshes, and then delete all of those animated meshes, exept the one you chose for spawning and then mave the one animated mesh to a hidden layer. This will make them instanced, but I don’t know how much better the performance will be.
I hope this helped:)

Thanks for the reply.
First I should apologize for the vagueness of my post.

I am essentially using the same method stated above, only via python.

scene = bge.logic.getCurrentScene()
p = [0.0, 0.0, 0.0]
for x in range(0, 40):
    ob = scene.addObject('zombie_empty', own)
    ob.worldPosition = p
    p[0] += 5.0

The problem is that I have 40 identical animations being processed separately each tic.
I would like to calculate the changes to the mesh just once per tic, then copy the result to other locations in the scene graph.

I’ve seen cases where editing the actual mesh data produced similar effects, but I’m not sure if it’s possible using rigs.
I’ll have to poke around some more next time I’m near a real computer.

Ya I think that having 1 main mesh on a hidden layer, that is spawned into the main layer, should work; because its only calculating the changes to the mesh once then, but applying it to all of the instanced objects. But i’m not 100% sure so you’d probably have to play around with it a little bit.