General speed of Panda3D


I’ve been looking for some time for a suitable Open Source GDK, and Panda3D seems to come closest, there are a lot of OS rendering engines, but no game engines it seems.

I’ve been generally impressed with the way Panda3D is put together, but have just one overriding concern. Speed. I run AirBlade on my 3.6GHz Xeon, with a nVidia Quadro FX 3400, and it runs like a dog. When the enemies are on screen and I’m trying to shoot, I get framerates as low as around 3-4 fps!

Is there something I’m doing wrong, or is Panda3D really not very fast?



Airblade runs fine on my machines…including this p4 1.5ghz with a geforce2 GTS. Framerate is good on my laptop with gforce2go as well.

I don’t know what OS you’re using, but is Panda3D possibly using software instead of hardware?

How do other apps perform in OpenGL on your machine?

I’m assuming Panda3D is running in OpenGL of course.

It does sound like your drivers are falling back to software rendering.

On linux, it’s somewhat of a challenge to get the drivers installed right. I usually use “tux racer” (a little opengl game that comes with fedora core) to test if I did it right. If tux racer runs fast, then panda will run fast.

If you’re using windows, we’ll have to dig deeper.

In Linux, run glxinfo from a shell. It should dump output that you can browse through. If you see MesaGL anywhere in there, then you’re most likely stuck in software mode.

If you are using Linux and stuck in Software, give us more details and maybe we can help get you into hardware mode.

I’m also experiencing the same low performance with AirBlade.

I run the in windowed mode at 800x600 and get frame rates in the low teens for most of the game. When fighting the boss, it can drop to as low as 6 or 8 fps.

I’m have an Athlon XP 2600 (2.13 Ghz), 512 RAM and a Nvidia GeForce4 Ti running under Windows XP. My OS and drivers are up to date. I’m running Panda 1.0.3 and AirBlade 1.0.3.

I can run current professional games at good frame rates (including Half-Life 2 at 800x600).

I also like Panda3D, but am concerned about performance. Maybe I am running in software mode, but I haven’t change any settings. I simply installed Panda3D and AirBlade.

Many thanks for any help.


Would you be willing to help us diagnose the problem? I’d love to know what’s causing this.

The first thing I’d like you to try is flipping panda3d from OpenGL over to DirectX. Look in your panda directory for a file named “Config.prc” (it’s in the etc subdirectory). Where it says

load-display pandagl

change it to

load-display pandadx8

See if that makes any difference. Also, tell me which driver version you’re using.

I just spent some time looking at the performance of Airblade, too. The first thing I note is that toggling off textures (with the 2 key) makes a big difference in the frame rate.

I suspect that Airblade would benefit from running egg-palettize to consolidate textures and thereby reduce the need to switch texture state on the graphics card. There are some other tweaks that can be applied, too. Josh, if you have the original models, I can help you with that.

The bottom line: Airblade was made in a few weeks with very little attempt to optimize it. The fact that it’s playable at all is testament to Panda’s robustness–you can write a game and not have to think too hard about optimizing it for performance; it will work.

But when you are ready to squeeze every last drop of performance out of your hardware, Panda has the tools to do it.

For a more accurate idea of your frame rate when some effort has been applied, you might compare Toontown, which is a professional game written with Panda. You can download and play the free trial at Of course, Toontown won’t stress your CPU or your graphics card very much; but it’s designed to be playable on a P-II 233–about one-tenth of your CPU. On a machine that slow, there’s not much room for goofing off, and Panda has to be lean and fast to work at all.


Yes, we should do this. People are judging panda based on airblade. Unfortunate, but it’s the only game we have that doesn’t cost money or require some sort of motion-tracker or inflatable dome to play.

One thing that’s not obvious is how much time is being spent in python interpretation. Can pstats tell us?

Here’s a question: what does egg-palettize do with textures that wrap? Also, what does it do if the palette turns out to be larger than the largest legal texture size?

I do have the original airblade models. I am guessing that 90% of the problem is the city model itself. From my preliminary examination, it seems that they used mesh objects that contain only a few (8-9) polygons. They’re probably doing a texture switch every eight polygons. I’m also guessing that there’s no hierarchy to it. They’re probably culling every building independently.

The city model was created in Maya, but I don’t know maya at all. There’s no way I could fix this model myself. But, we could use this as a testbed for my current project: a pair of egg importers. Allow me to explain why I’m writing such a thing.

I’m maintaining this panda3d model collection, which is going to get quite a bit larger over the course of the next few months. I want this to become a really extensive, high-quality model collection.

The fact that half the models are in Max format and the other half are in Maya format essentially cuts the utility of the repository in half, right off the bat. Whichever modeling program I use, half the models are inaccessible to me.

There are tools to convert from Max to Maya, but they all require you to buy both Max and Maya, and they all require you to buy an expensive conversion program. It seems ridiculous to ask the users of a free software package to buy two expensive modeling programs, one of which they don’t even want, and to pay a half a grand for a file format converter as well.

One solution would be for me to do all the conversion here at the ETC, and to distribute the models in both formats. But that sounds like a maintenance nightmare for me. I don’t have time.

But the one thing all the models will have is an egg file. If I have a good egg importer for both max and maya, then the users will be able to read the egg files into their art program, and go from there.

So anyhow - let me finish the Max importer. I’ll use it to load up the airblade city model (which was created in Maya). From there, I can optimize the model in Max, with which I’m very familiar. What do you say?

Sure, that all sounds good. We’d like to have a Maya importer too, but we’ve never gotten around to writing it yet.

PStats excels at answering questions like “how much time is spent in Python?” In fact, the answer appears to be, not too much. Most of the time seems to be spent issuing state changes and draw primitives.

In fact, anyone who’s curious can run PStats on Airblade. It’s easy to do. All you have to do is start pstats.exe running, and then put “want-pstats 1” in Airblade’s Config.prc, and the docs for how to actually make sense out of the PStats readout are in the Panda3D manual.


I just realized I forgot to answer these questions.

egg-palettize can handle textures that repeat a little bit, once or twice for instance, by replicating the texture in the palette. If it repeats a lot, it will leave the texture alone. Also, egg-palettize will not make a palette image larger than a specified maximum; if the palette would grow larger than that, it will split it into two or more textures.


How easy would it be to move the eggpalettize engine into the main source tree so we can use it on the fly at runtime? How well would using it at runtime work?


That would be a bit problematic. egg-palettize is inherently slow and ponderous. It scrubs over the entire set of models and textures for a project and completely rebuilds the textures, adjusting the models and their UV’s accordingly. The whole process takes a while.

I guess a subset of egg-palettize’s functionality could be made available for runtime, but I’m not sure how useful it would be.