Example Of Using Pstats

I upload some Pstats data shots of a typical (test) game scene. Full environment with animated characters.

Being as new that I am to Panda3D, I was wonder if some of you veteran users could point out a bottle neck by analyzing the screenshots.

Frame rate seems to drop mostly when more characters are loaded. Frame rate is 40ish with five characters. Looking at the data, I’m think collisons.

I doubt there’s one single bottleneck, but I do agree it seems like your collisions are on the heavy side. Note that you can scale the PStats graph vertically by clicking and dragging within the graph area, if needed, to see the top of a big graph, or to make more detail visible in a small graph.

Seems like you’re testing an awful lot of collision volumes. That means you would probably benefit from running egg-octree on your collision mesh, and/or reducing the complexity of your collision mesh.


The chicken exporter has two options. Make Octree and Collision Octree. I’m guessing you’re refering to the Make Octree?

I wish you could do it from the command promp, directly on the egg file instead of re-exporting.

[size=150]Does anyone know if objects serving as collisions are calculated even if they are detached from the scene graph?[/size]

That question could mean a lot of things. Let me answer two of them and see if I guess your question correctly.

(1) “Into” objects will only be tested against if they remain in the scene graph. However, hide() does not remove them from the scene graph, it only stops them from being rendered; they are still available to collisions. You can use detach() or stash() to both remove them from collisions as well as making them invisible.

(2) “From” objects–objects that you have added to the CollisionTraverser–will always be tested against, whether they are in the scene graph or not. You have to explicitly remove them from the CollisionTraverser to disable them.