S3O Drawing efficiency. 56K BEWARE.

S3O Drawing efficiency. 56K BEWARE.

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

S3O Drawing efficiency. 56K BEWARE.

Post by Argh »

Okie doke devs... I now have explosions for S3O, so I've been doing some simple comparasion testing.

People have been complaining about the performance of NanoBlobs since 0.3 was released.

I am running Spring on a machine with a nVidia GeForce 7800... and even with all settings turned DOWN to the lowest settings, I get about 10 FPS when we pass the 300 unit mark or so. But the CPU meter says that the load is only about 50%, maybe 60% when a huge battle is taking place. So it's not the CPU.

I never have more than maybe 40 models on the screen at once- maybe 60,000 polygons, trivial by today's standards... no reflections, no shadows. Sure, I'm running at a high rez, but that shouldn't be doing it.

So, what's dragging down the FPS? I get 72 with just a Lord, even if I have dynamic water on... I get 10 FPS with 400 units, even if the CPU load is 50%, I have plenty of RAM free, and I am zoomed in as far as I can go, in a quiet area of the map.

Can anybody explain what's going on here?
Last edited by Argh on 06 May 2006, 08:26, edited 1 time in total.
User avatar
Das Bruce
Posts: 3544
Joined: 23 Nov 2005, 06:16

Post by Das Bruce »

Check the %'s for the 'b' overlays.
IMSabbel
Posts: 747
Joined: 30 Jul 2005, 13:29

Re: S3O Drawing efficiency.

Post by IMSabbel »

Do you per chance have a hyperthreading cpu (i.e. a p4)?
Because then 50% cpu load would mean 100%
User avatar
Drone_Fragger
Posts: 1341
Joined: 04 Dec 2005, 15:49

Post by Drone_Fragger »

That would explain why my pc never goes above 50-ish %.

And it might just be the collisions. They usually causes the lag I find.
User avatar
Zenka
Posts: 1235
Joined: 05 Oct 2005, 15:29

Post by Zenka »

well, I'll test my results later this evening.
But when I loaded your sheep, I was kinda shocked about the number of poligons, taking in account you are going to have 100-300 of them a player. And the other models shouldn't be very low poli as well. (the lord may ofcourse, since you only have one. and a players doesn't have a legion of square rooks or factories).

Aslo, how large are the textures? They arn't slowing the FPS, but do cause the slight chop you have wehn first placing a unit.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

hmm, XE8 on nanoarena v2 can produce about 8 squarerooks in the space of a minute around the 10 min mark if it isnt stunted by the 3 other XE8's in competition with it close by.... And it does it very quickly too, I'm sure it'd go faster but then the buildtree switches to archers striders and demons... And it sends them out enmasse
User avatar
krogothe
AI Developer
Posts: 1050
Joined: 14 Nov 2005, 17:07

Post by krogothe »

AF wrote:hmm, XE8 on nanoarena v2 can produce about 8 squarerooks in the space of a minute around the 10 min mark if it isnt stunted by the 3 other XE8's in competition with it close by.... And it does it very quickly too, I'm sure it'd go faster but then the buildtree switches to archers striders and demons... And it sends them out enmasse
whats that got to do with S3O??
User avatar
FizWizz
Posts: 1998
Joined: 17 Aug 2005, 11:42

Post by FizWizz »

well, nanoblobs uses .s3o models, and NTAI works on Nanoblobs, duh!!! :wink:
just joking, it's more likely that AF saw that NTAI hadn't been mentioned/plugged in this thread yet, and felt it necessary to rectify that
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Ok, I've converted every model in NanoBlobs to use DDS files, now that I've found out how to not have them draw black in the game engine. I was hoping for a big improvement... and got a smallish bump. Ah well.

Here are the practical results. These are all at 1600/1200 resolution, shadows 2048, mirrored units, etc. Yes, I have a pretty nice video card, although my processor's starting to look crappy :P

I am sorry in advance for the huge file sizes here, but I want it clear that these aren't edited shots. The results were interesting- the engine's culling of off-screen objects has apparantly improved dramatically over the last version, based on my previous tests (which, alas, I didn't think to document properly).

The big surprise is the gigantic drop that occurs at the end of the unit explosions. In theory, no more polygons are being drawn in that shot, nor particles- I would think that most of the particles have already spawned in the first explosion shot. But the scars are now being drawn, and I wonder how big a factor this is.

I deliberately picked Ashap because it has no grass, trees, or water. I do not know how much FPS is eaten by the spheres, because there doesn't seem to be a FPS counter that can run without showing them, but I assume they're very efficiently rendered.
Image
33 S3Os exploding.
Image
64 S3O units all moving/pathing. Note the 8FPS drop, even though my video card is obviously not what's taking the hit here- I seriously doubt the complexity of the transforms has increased by that much.
Image
All units off-screen, not moving at all. Remarkably good culling there.
Image
83 S3O units, sitting still.
Image
19 S3O units. Still above the FPS my flatscreen can actually deliver.
Image
10 S3O units.
Image
1 S3O unit.
Image
This is a good shot of the FPS bottoming out during the tail end of the explosion event. The lag was there before the new explosion code was put in- this is what people are complaining about in terms of laggy gameplay.


Last but not least- I have seen (but thus far been unable to screencap) something that looks like geometry being drawn but "flying by" the screen. Also, as anybody who's played NanoBlobs 0.3+ can tell you, unfinished units that are abandoned in mid-build tend to end up "floating" around the battlefield, with really weird results. Dunno whether this has anything to do with performance in general.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

After more tests... hmm... gotta question... why doesn't an explode type SHATTER; work? SHATTER | FIRE | SMOKE | EXPLODE_ON_HIT works just fine, but plain ol' SHATTER doesn't.

Also, having shadows on is a super-duper big drain during particle events. Those darn shadow-casting smoke trails are a big part of the laggage. That, and many of them are creating far too many particles for their own good. I fixed that stuff up where I could in NanoBlobs, by tweaking the missile trails really extensively, but I can't do a thing with the explosions, except not have them.
User avatar
Zenka
Posts: 1235
Joined: 05 Oct 2005, 15:29

Post by Zenka »

Well, all I can say is that the shadows are inmense slow in Spring.
I think they are ray traced and not optimised. It turn my shadows off for a normal game, that gives me 3 times more FPS then with shadows on.
User avatar
Targ Collective
Posts: 202
Joined: 12 Nov 2005, 14:16

Post by Targ Collective »

Units under construction are vulnerable to knockback unless built in factories... This could be a factor.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

knockback? You mean the pushign aside to get through thing? I did a post about all the bugs I see regularly because of untis pushign each other out fot eh way in the mailign list and it's been changed nwo so that unfinished untis have a huge mass value so they dont get shoved around.

But thqat isnt the cause, I have that happening to em a lot and I can run nanoblobz just fine, th problem came when I turned on decals and noted everythign was a little mroe sluggish.

I also mentioned NTai because of what someone said about square rooks and not being seen that often, whcih contradicted my experience with AI tests.

Particles, especially nanospray has a much higher lagging effect than say smoke in nanoblobz atm for me, 300 knights on my screen is faster than 20 sheep building
User avatar
Zenka
Posts: 1235
Joined: 05 Oct 2005, 15:29

Post by Zenka »

what someone suggested that you don't have a LEGION of square rooks.
meaning, how often do you have more then 100 square rooks a player?
As much change as you have more then 100 bulldogs or gollies in AA?
So they can be higher poli then sheeps for example.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Here's a shot showing misplaced origins for shooting. I don't think this is unique to S3O models- it's just a bug somewhere in Spring's aiming code. But it shows up in weapons with Accuracy > 1, and is worse the larger the number is.

Image
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

Post by Neddie »

Is that the really cool spider thing I saw being discussed a few weeks back?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Are the megasheep and striders amphibious? Or is it just the map and shallowish water?
User avatar
Guessmyname
Posts: 3301
Joined: 28 Apr 2005, 21:07

Post by Guessmyname »

That water is realistic I fell like jumping in...
User avatar
NOiZE
Balanced Annihilation Developer
Posts: 3984
Joined: 28 Apr 2005, 19:29

Post by NOiZE »

On topic please
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

<laughs> Sorry, wasn't trying to make a promo screen there, just demonstrating that the off-origin behavior of shots does occur.

I'm going to try to get a screenshot made of the "doubled-up models" when I run the Explode event. I have this weird feeling that either S3Os are being doubled in polycount and drawn double-sided, but seperate into two clones during FALL events (and probably SHATTER, but it's hard to document), which a complete waste of resources, and would explain the perplexing fact that S3Os should be higher performance than 3DO for the same polycount (sure, you have to transform two textures, but half the polygons per render pass) ... but aren't. Maybe I'm just too stupid about how 3D works, but I would think that doing transforms on multiple squares from a single, 2048/2048 texture would perform more slowly than transforms on two 512s... and, in fact, I have seen almost negligable performance gains if I shrink the texture sizes further, suggesting that this is not a major performance problem...
Post Reply

Return to “Engine”