Panda3D 1.4.0 slower than 1.3.2

I installed Panda3D 1.4.0 on my laptop and it runs slower than 1.3.2. For example:

Roaming Ralph
1.3.2: average is about 49 to 50 fps, slow points 46 fps
1.4.0: average is about 31 to 33 fps, slow points 21 fps

There are some performance decreases in other sample programs, like Airblade but it was not as apparent as Roaming Ralph.

The laptop is a few years old (1.6 GHz Pentium M, 32 MB ATI Radeon, 512 MB RAM), but I’ve noticed a similar trend on my PC. I was just wondering if anyone else has noticed this performance drop :confused:

Hmm, that’s disturbing. In general, 1.4.0 includes several performance enhancements, and in fact the latest Panda does run measurably faster on our own games here within Disney. I haven’t done a side-by-side on Airblade or Roaming Ralph, though. I’ll look into it.


run faster here too

Would it be possible to try testing Roaming Ralph on the two versions? Maybe its because I have an old video card on both my PC and laptop.

v1.4.0 has a serious collision performance drop :

Indeed, collision system has dropped frame rate very noticable. :frowning:

Saw your post yhjh_jo about your menu and the 1.4.0 performance drop.

I was worried about these kinds of problems and didn’t upgrade to 1.4.0 until yesterday. Running my main project- I haven’t seen any performance drop (yet). I use a lot of collision spheres and haven’t seen any issues. Are you using collisions spheres or other types of collision solids?

On average in my program I have about 20 ‘from’ colspheres and probably 150 ‘into’ colspheres.

After some more tests- I confirm the same frame rate drop. Guess, I’ll be going back to 1.3.2

I just tested Roaming Ralph and I too get the same drop in frame rate.

1.4.0: 13-15 fps

1.3.2: 25-30 fps

Atleast I am not the only one experiencing this drop in frame rate… Is there any way this problem can be addressed and fixed in the next version, say a 1.4.1 or something?

I would rather upgrade to the latest version instead of having to use 1.3.2.

Wellllll… thats what the x.y.0 Versions are for - testing. ^^

Seems like you did a good job. Hope, Josh, David and folks can fix it in the upcoming 1.4.1.

If not, I would expect to see an 1.4.2 somewhen in the not-so-far future addressing it :smiley:

Regards, Bigfoot29

It seems very likely that it will be fixed in 1.4.1 or 1.4.2. (These little bugfix releases usually come pretty soon after the major release).

But really, panda 1.3.2 is still quite recent, and very stable.


Do you know if this was addressed in the new 1.4.1?


Yes, it’s supposed to be. But David has also told me that there’s a different way of doing collision against geometry — you convert the geometry to “collision geometry” by putting a special tag in the egg file. Doing this makes the detection vastly faster, since collision geometry is optimized for this sort of thing. This is the way it’s supposed to be done. I’m going to eventually fix the roaming ralph sample to do it the right way.


Any idea how to do that programatically? I use dynamically updated terrain…

Unfortunately not. However, if all you’re trying to do is keep Ralph at the right elevation (which is what Roaming Ralph is trying to do), then I would just use the original heightfield to fetch the elevation.

In the long run, I think we’re going to need a subroutine that converts standard geometry into collision geometry.

If you were to add “collision geometry” to roaming Ralph, what would be the procedure? Can it be down to the egg as it is now or does a completely new egg file need to be created?

The procedure would be to add a few words to the egg file indicating that a certain collection of polygons are collision geometry, not regular geometry. I don’t remember the magic words - I think it might be { Polyset } or something like that. To find the actual incantation, I’d have to read the eggSyntax.txt document. You can find a link to this document by reading the panda manual under egg importing and exporting.

to convert Geom into CollisionPolygons, you need to do :

  1. create CollisionNode
  2. for every triangle, create a CollisionPolygon and add it to the CollisionNode

taken from my polygonal button :

  def convertGeom2CollPoly(self):


      # create vertex reader
      # set the start position for reading the vertices,
      # begin reading at column 0, which is vertex position
      for prim in range(geom.getNumPrimitives()):
          # decompose high-order primitive
          for i in range(0,collFaceData.getNumFaces()*3,3):
              collvtxreader.setRow( collFaceData.getVertex(i) )
              collvtxreader.setRow( collFaceData.getVertex(i+1) )
              collvtxreader.setRow( collFaceData.getVertex(i+2) )
              cn.addSolid( CollisionPolygon(vtx1,vtx2,vtx3) )
      # remove the temporary Geom
      # put the collision node to be the visible geometry's child

In there, I simply make a copy of the geom and flatten the transform, since I don’t need any fancy structure for buttons.

PS : I haven’t tried v1.4.1 yet

Thanks ynjh_jo! I’ll implement this into my terrain system.