Sudden Lag, Why?

Hello,

I’ll get right to the point.

I modeled this really cheap environment and cheap Actors for the purpose of testing out what Panda is made of.

The fps was perfect with just the environment and several Actors Not moving.

The moment I made the Actors start animating in place and made one of them move around, the fps started going down hill.

Keep in mind, when the actors where still, there wasn’t an fps problem, so I’m guessing the issues has something to do with multiple animations playing while the screen is moving (or scene is redrawing).

Why are the animations causing such a slow down? There’s only one looping animation per Actor. Again, everything is modeled cheaply, so it’s not a polygon count issue (plus the fps is fine when actors are not animating or moving).

You can pinpoint the problem using the pstats program.
Put the following code at the top of your script:

from pandac.PandaModules import loadPrcFileData
loadPrcFileData('', 'want-pstats 1')

Then load pstats.exe (in Panda’s bin directory) then your game.
This will let you know if the time is being spent animating the bones, moving the vertices, or something else entirely.

The problem probably is that you’re staring at the FPS count. The ease of dropping FPS is more or less inversely proportional to the amount of FPS you have. So for example if you start with 1000 FPS it takes proportionally “less” to get it to drop to 500 FPS than what it would take to go from 20 FPS to 10 later on. For a more technical explanation see this for example.

The animations are calculated on the CPU so that can become somewhat of a bottleneck at times, but since you’re using only several actors (instead of something like a hundred) this probably isn’t the issue here.

So in short, what you’re seeing is not only to be expected, it is unavoidable. Although you didn’t give any precise numbers or provide the scene and code for testing, I’m guessing this is just a simple misunderstanding that almost everyone makes in the beginning.

fps goes from perfect 60 down to 38 at times. It’s hard to see that as normal; and only while animations are playing. I could stop all animations and watch the fps jump to 60 again.

All games I’ve played on the same machine I’m using play smoothly at max fps with high details and high polygon characters.

What Panda is doing looks like an Engine problem that deals with animations. Either that or my Graphics Card is having a hard time pushing out the Frames, but most GCs on modern PCs are enough to handle most games.

Without seeing the code or models, and no performance analysis, we are only able to guess at the problem and possible solutions.

Not code and not the models. There’s barely anything modeled and not much code going on either. It was all a test setup to see if Panda could handle a few Character instances on screen, together. Most graphic cards push in the Millions of Polygons a Sec now, with high fill rates and so on.

The focal point of the issue is obvious, given the fact there is no lag when the Actors are not animating or moving, and the moment they animate (without even moving) the fps suffers.

The worst part about it is, I’m using a Quad Core 3.0 ghz, 8gb RAM with a Navida Cuda Core tech Graphic Card.

I even played the Pirates of Car Online, which was made with Panda, just to see if I was smoking crack rock. Turns out, that online game played the same way on my machine…droping frames all over the place.

Even WOW doesn’t drop fps like that, nor PWI. All my single player games’ fps are way over 100 most of the time; even when the screen is filled with enemies.

It’s not unfair to conclude, Panda3D is looking like one of the engines on the lower level of commercial quality.

Pirates of Car Online even had super on super low poly Actors and the Performance dropped. From what I can see, Panda would be a good engine for making games that have objects or models that do not change geometry, but maybe rotate; e.g. a flying space ship.

Maybe a shooter, but the targets would have to be very low poly and cheesy. Racing games would be good for this Engine as well.

I don’t see anything serious coming from this engine…like a Devil May Cry (PC), or a Resident Evil 4 (PC).

Pstat is showing a high amount of thread blockage.

Oh that might be pstats itself causing that, try also adding

loadPrcFileData('', 'pstats-max-rate 15')

Okay, looks like this needs some more detailed chopping up.

Similar quad here and a similar GPU. I can have about 50 actors running around without ever getting my FPS drop as far as you described. You still haven’t provided the scene and code you used so that we might see what we get so a direct comparison is impossible.

While I can understand the frustration in you talking, this is simply not true. While Panda3D can’t directly compete with big specialized commercial engines (CryTek, Unreal Engine etc.) that have a yearly budget that numerically probably exceeds the amount of views this site has received during its entire lifetime, Panda3D’s full potential can only be unlocked by people with sufficent skill and experience. In fact, I’m tempted to challenge you to name a free engine (BSD license or almost equivalent) that matches Pandas legion of features and maturity.

Since Panda3D is not a specialized engine either of these are possible, lowpoly or not.

I’m sorry, but I kinda vomited mentally at this point. Resident Evil 4s original PC port was utter garbage from a technical standpoint. Only after a patch and with some modding is it in any way decent and still doesn’t look much more impressive than it’s GameCube parent.

Perhaps you were thinking about RE5? That too could be achieved with Panda, although it would probably require some hard work with the more special features like the Uroboros worms flowing on models etc. but I can’t think of an engine that would do stuff like that for you “out of the box”.

I apologize if this seemed hostile in any way, shape or form, but some of us are tired of hearing people making this kind of ill-informed conclusions.

I see a lot of activity in the Actor Skeletons. When facing the Actors, while they animate, Skeleton data jumps much higher. When moving away from the Actors, while they’re still animating, but not in view, the Skeleton data drops back down to nothing.

I figured the lag was in the Animation. I wonder if having the same Skeleton for all Actors is a bad thing?

Right now I’m thinking about not using Skeleton Animation for Actors other than a Main Character. Graphic Cards can handle the Geometry data now, so why not add more on that side…? I’m guessing the Skeleton data is more of a CPU thing and for some reason it’s killing my fps.

I find that hard to believe. (Especially if Disney couldn’t do it).

I understand you’re a Panda lover and will defend it no matter what. WOW players do that for WOW. lol. So I’m not even going to comment on it really.

It’s what I expect out of you. Until I can play hands on, a panda program the pushes 100 Actors of good detail in a good detailed ENV, without a fps drop, I won’t believe it can.

If you go down deeper how is the time spent between the “Joints” and “Skinning” categories?
Things that might have an impact are the frame rate of the animations, and if you’ve enabled the frame blending on the actor that can also be a performance hog.
There is some support for doing animation on the video card, but I have not been able to use it, it does not work when using custom shaders as far as I have read. You can try it out with

loadPrcFileData('', 'hardware-animated-vertices 1')

Some other options that did give me a performance boost are

loadPrcFileData('', 'display-lists 1')
loadPrcFileData('', 'display-list-animation 1')

Okay, I guess I can understand certain skepticism, but you have to remember a few things first.

  1. Pirates is old.
  2. MMORPGs are designed to be accessible to as many people as possible. This means certain technical compromises have to be made when it comes to art resources.
  3. Pirates doesn’t target hardcore gamers etc. who would demand top notch visuals.
  4. While Disney is a big company, I doubt their game studio employed/employs anything even close to Blizzard’s WOW team or graphical talent with Pirates.
    I’m sure you can agree on the points above which help to explain why Pirates doesn’t look like much.

Now, as for multiple actors running around, here’s something I made a couple of years ago. It’s not pretty as it mostly consists of quickly modelled characters for performance testing very similar to what you’ve tried yourself, but I think I had 40 or 50 of them there. It’s also using ODE physics for collisions to prevent them from going inside each other. The FPS is capped by the video capturing software (I couldn’t figure out how to capture good FPS without actually recording video at that same rate). Bear in mind this is the work of someone who doesn’t know squat about really optimizing his code or scene.

And no, I’m not a “Panda lover”. There’s lot of stuff about Panda that I HATE, but it’s still the best free option available. In fact as a rule of thumb, I hate fanboys of any kind. As for the rest of your skepticism, well, since no one has bothered to do the kind of demo you want there’s nothing that can be done about it.

Not much proof there in that video; wouldn’t call those Game Ready Characters either (if they are true individual IDs to begin with, don’t look like it).

And not really knowing the Video Card’s specs …that’s why I like hands on proof.

Please note, FF11 is very old too, and the fps stays up. lol!

Anyway, I’m going to try this new Idea, which might work with real individual IDs. Panda isn’t the first Engine I’ve seen with Skeleton issues.

If you’d join the IRC channel we could discuss this in real time, although leaving this here for posterity has its advantages.

No, the models were somewhat final models (I was planning a hack’n’slash with lots of foes that weren’t supposed to be seen much closer than in the vid), but granted they’re not technically particularily demanding. However, the vid does address your original point. FYI, my GPU is a GF8800 GTS 512, although there was probably nothing in the scene that was GPU limited. And yes, you can test one variant of the scene with this. There’s 40 (41 if you include the player) completely individual characters (using the same model file obviously) there, powered by bad excuse of an AI by me.

Like I said before, we don’t have anything that caters to your more recent request at this time so you’ll have to make do with what’s at hand. Your original point was that Panda can’t handle several animated actors at once. That has been thoroughly debunked. You have yet to provide your particular scene for our testing so we can’t even rule out some bizarre hardware incompatibility or user error.

Dude, you have a video with Meshes that look Geometry driven instead of Skeleton Driven, no real texturing, no real anything.

Your view is fixed…that’s another thing.

I would hope your performance would be up with something so…vague.

PS, nice Graphic Card.
[/quote]

I gave you the scene so you can confirm yourself they are indeed using skeletal animation. Whether they are textured or not is not really relevant to your original point. You are just moving the goalposts. I sincerely doubt adding textures or even fairly complex shaders would affect the performance significantly there since it’s not GPU limited like I wrote before.

Yes it is relevent, Dude. Everything goes into a scene and character when designing on a more professional level. I just put your Mesh back together again from a .x file and it’s indeed “humpty dumpty.”

No wonder you had some performance (along with the screen not redrawing the BG, which is huge on performance too)…with an empty capsule like that for an Actor, I could probably get 200 on screen. Hell, POC Online had better Models. :laughing:

You haven’t proven Panda can play Big, you just proved how limited Panda really is. When someone launch a Halo with Panda, then I’ll reconsider.

PS, your Frame Rate Dropped!!!

The aim wasn’t to prove it can play big, the aim was to prove your original claim regarding several actors as wrong. Having discussed this with some other active members I’ve decided to stop replying since it is clearly a waste of time as you continue to ignore half the points made here and refuse to concede to anything and continue moving the goalposts around. While I seek to aid anyone who asks, continuing here would be akin to feeding a troll (if this is indeed not the case). So “dude”, perhaps the others will play this game with you, but I will not :unamused:

Great…stop, because my issue is related to Depth Detailing, which you do not have in your little “thingy” test.

You lacking some knowledge about Gaming as well because when a screen stays fixed like that, and the only thing that redraws are a bunch of cheapos, you get good redraw time. When the entire level or world has to redraw in each step, with details, you get a poor redraw time.

Nice chatting with you, Dude…later.

Gater. :laughing: