Performance drop with static geometries.

Nudel

18-03-2007 15:58:56

Im trying to add a lot of ~5k poly objects into a scene. Ogre can handle about 1 million polys at 75fps but if i use createStaticGeometry with meshShapes, fps drops to 75 with only 300k polys. I tried to put the terrain, created by a heightmap shape, and the objects into different groups using body->setGroup() and disable collisions between the terrain group and the object group using terrainGroup->noCollisionWith(objectGroup). This, however, caused no performance improvement.
What can I do to optimize a large amount of high poly static geometries with mesh shapes? All objects are placed onto a terrain so their bounding boxes intersect, but i do not need collisions between the objects and the terrain or between objects and other objects. Theyre only needed for raycasts and between dynamicBodies and static objects.

betajaen

18-03-2007 16:13:26

Well it would do with that about amount of triangles. Collision meshes need to be simplistic as possible.

You need to optimise them by using a dedicated meshes for your collision objects. Take a flat straight road for example; it could have 16 triangles where it can just use 2. Same amount of detail but fewer triangles.

There is an ATI mesh optimiser posted on the main forums, perhaps you can ruin it through that and see what you get.

Nudel

18-03-2007 16:37:14

I was hoping for something that only calculates the meshShape collision if a dynamic object is within the high poly staticBody bounding box, but that mesh optimiser sounds promising, too.
Thanks.

betajaen

18-03-2007 17:33:11

I assume PhysX does so already, but it wouldn't hurt if the meshes are optimised.