Panda3D Manual: Performance Issue: Too Many MeshesIf you have too many nodes/meshes in your scene, this might result in slow performance. You can check your Geom count in PStats, or by calling Panda3D provides a function to reduce the mesh count: NodePath.flattenStrong(). This will reduce the NodePath to only one node. Be careful with this function: Usage without care might cause your game to crash, since you will not be able to move individual subnodes of a flattened node around anymore. Also note that flattening your whole world like this is a bad idea, as you will break culling, which will cause your whole world to be rendered even if your camera is rendering only a small part of it. You will need to find a balance. NodePath.flattenMedium() and flattenLight() are not as rigorous NodePath.flattenStrong(), but may be worth considering. Though, if you have multiple independently-moving rigid nodes, the flattening functions might not suit your needs, because, since the flattening functions flatten everything to one node you won't be able to move individual sub-nodes around. An alternative is the Rigid Body Combiner, which can combine multiple nodes while you can still change the transforms on the sub-nodes. If you are using the GeoMipTerrain for terrain rendering, that might also result in a large mesh count. (You can check the block count by calling © Carnegie Mellon University 2010 |