Is GeometryBatchFactory only used for static objects?

I am working on some sort of RTS type game and I’ve run in to a problem with the models I’m using,

or rather the low frame rate they produce. I was reading that the amount of vertices are not as important as

draw calls and tried using geometry batching on my troop node, this however nullifies any effect from motiontracks

or animations of the spatials. this led me to believe that this technique is only for static objects as you do produce one.

All I did now was call GeometryBatchFactory.optimize(troopNode), am I using it wrong?



btw, I was using ten instances of a model with ~3500 faces and my fps dopped to about 20, maybe this is way out of line as well?

GeometryBatchFactory is for mostly static stuff.



What else is in your scene or were the 10 models all that was there? Just 10 models and 35,000 faces shared between them shouldn’t be that big of a deal for modern hardware. I routinely render hundreds of thousands of faces though my cards are pretty decent. I could get around 70 FPS for 200,000 faces split between 500 object or so on my older card… and nearly 200 FPS on my newer one.



Were the models animated when you did the test? What kind of card do you have?

I had the models plus a hexagon grid made up by 64x32 custom meshes batched using optimize(). Removing the grid doesn’t help. The models were animated and moving along motion paths. Does scaling the models affect performance? I had to scale them quite heavily to fit my scene, like 0.01 times original size.



I have an ATI Mobility Radeon HD5650

Animated as in performing a walking animation or something? Or animated as in just moving? For example, bone animation will deform the mesh every frame and the data has to be sent to the card again. It will definitely affect performance. Just moving them around, not so much.



By the way, batching your hexagon grid is the perfect example of the right place to use the batch optimization.

Yeah, animated like walking, attacking etc. I tried using the Oto ogre model from the tutorials instead and was able to

have 35 of them walking on screen without the fps dropping below 60, and that’s more like the model detail I need/want anyways. I was thinking, maybe there are other ways of enhancing performace, like less detail and animations when zoomed out. Is LOD applied to geometries automatically? Can LOD affect animations as well?



Oh, and when you wrote “It will definitely affect performance” you referred to the animations right, not answering my question about scaling affecting performance?

Right. Animation that deforms the mesh will definitely affect performance since it has to resend the mesh data every frame. The more faces/vertexes the model has, the worse it will be.

Besides having to resend the data each frame, there’s also the arithmetic that has to run on those 35,000 verts 60 times per second, that could also slow things down with all the other stuff that is happening. There are some ways to apply LOD on animation though, like update it less than once per second if the model is far away, etc. Haven’t gotten around to adding those yet.