Single surface stress test,... 10,000+ particles

Community Forums/Showcase/Single surface stress test,... 10,000+ particles

Pongo(Posted 2008) [#1]
Download it here!


5000 particles running at 200 fps



Here is a single surface stress test mentioned in another thread. I'm interested in knowing what kind of framerates some of you get with this. I have posted some results for extreme tests (20,000 particles) below.




Below is the readme included with the .zip
____________________________________________

This is a stress test for a single surface particle system written in Blitz3d.

controls:

Space - toggle FPS lock
a/z rotate sprites
s/x scale sprites
mouse to move the camera
mouse wheel to zoom in and out.

When you run the program you will be prompted to enter a number of particles. Polygon count will be twice this, since each particle is made up of 2 triangles.

You can toggle the locked frame rate by pressing the space bar This will toggle between 60 fps and whatever speed your computer can handle. This engine does not do frame skipping so if it can not maintain 60fps it will dip below that. Fortunately it takes thousands of sprites before the frame rate dips this low.

Every particle is updated every frame as you can see by the texture animation playing.

You can see what happens when a transform is applied by pressing a/z to rotate every particle, or pressing s/x to scale every particle. In my tests, the frame rate remains constant.


Here are my results on my "fast machine"

1000 particles
locked framerate: 60 fps
unlocked Framerate: 750 fps

5000 particles
locked framerate: 60 fps
unlocked Framerate: 200 fps

10000 particles
locked framerate: 60 fps
unlocked Framerate: 67 fps

20000 particles
locked framerate: 29 fps
unlocked Framerate: 29 fps


I don't have the numbers for my "slow machine", but I am still able to get 30 fps with 10,000 particles on screen,... this is far more than I will ever need in my game. Running several thousand will result in frame rates of a solid 60 fps (Which is locked by the game engine)


chwaga(Posted 2008) [#2]
nice particle engine. 50000 particles: 9FPS (though that means nothing since my computer is L337)


MGE(Posted 2008) [#3]
For 5000 objects I get 12fps which is pretty much indentical to my Blitzmax engine running a similar demo.

However, I forget the name of the forum member, but he is coding 3D screensavers with B3D and I remember one of his demos had something like 20k sprites (he was claiming pretty much unlimited number of sprites with hardly any slow down) and he was achieving frame rates in B3D that I could not match in BMax. (Boiled something??)


Stevie G(Posted 2008) [#4]
I get 60fps unlocked for 10,000 quads.

I think Boiled Sweets may have used the fasttext library or possibly a .dll? I can't see a single surface system getting any faster than this natively.


Pongo(Posted 2008) [#5]
MGE- what speed computer are you running? Did you mean 50,000 instead of 5,000?

The system that put up the numbers I listed above is my workstation at work, and I would put it right near the top of what is available, but even my home machine which is quite old can handle 10k at 30fps


I'm surprised that Blitz max isn't faster for this, but I guess at some point it's all about hardware speed.


Yan(Posted 2008) [#6]
Unfortunately it continually zooms in for me. :o/

I did, however, manage to get...

20000 - 19FPS
10000 - 36->37FPS
5000 - 69->71FPS

...before my scroll wheel finger burst into flames. ;o)


GfK(Posted 2008) [#7]
5,000 - 34FPS
10,000 - 19FPS
50,000 - 4FPS

Intel GMA X3100


Duckstab[o](Posted 2008) [#8]
getting 11 Fps with 60000


Snixx(Posted 2008) [#9]
100000 15 - 20ish fps , not bad

edited as you need spec I guess,

Vista Home Premium x64 SP 1
Intel Core2Quad 9450
4gig ram
9800gtx
*snip*

probally all ya need really,


MGE(Posted 2008) [#10]
5000 sprites, 12fps
Intel 82845G Integrated GPU
Intel Celeron 2.93GHz

I don't dare develop on high end systems like you guys have. ;)


Pongo(Posted 2008) [#11]
Thanks for all the numbers. I guess there is a good reason I avoid the intel graphics and stick to Nvidia!

Other than those chipsets, the results are what I was hoping for though. My game is limited to only around 2-3000 particles, but it was fun to see how many of these the system could push through.


MGE(Posted 2008) [#12]
"I guess there is a good reason I avoid the intel graphics and stick to Nvidia!"

If you're creating a 2D game, I would disagree. ;) :)


Ked(Posted 2008) [#13]
72FPS for 1000
21FPS for 5000

WinXP Home ; ATI Radeon 9250 ; Mobile AMD Athlon XP-M +1700 ; 1.47 GHz, 512 MB RAM


Grey Alien(Posted 2008) [#14]
10000 @ 37FPS.

P4 3.2GHz, Radeon 9800XT, 1GB RAM, XP Home. My video card and PC are about 4 years old but were considered very good back then.


TartanTangerine (was Indiepath)(Posted 2008) [#15]
This is not really single surface is it. I see that you have four textures representing the four shapes - that's four surfaces not one. Try putting all the textures into one larger texture. You may also want to attempt using a single triangle instead of two but the extra texture memory is a trade-off.


Grey Alien(Posted 2008) [#16]
Oh I assumed form the title that all the 4 images were on a single surface. Weird that they are not...


Pongo(Posted 2008) [#17]
Indiepath- That is correct. There are as many surfaces as there are textures.

I'm ok with that though,... the speed is there and I'm using 4 surfaces instead of 5000 surfaces.


I also tried the single triangle particles, but it's not worth it for me. In order to make it work the triangle has to be drawn much larger to fit the square texture on it. when you do that you get slowdowns because you are drawing overlapping alpha due to the extra size on the particles.


Grey Alien(Posted 2008) [#18]
Is it faster if you put all those 4 different particles on a single surface though so there's 100% no surface change states going on with the GPU?


ImaginaryHuman(Posted 2008) [#19]
It would be faster yes, so long as the texture is big enough to hold all your images. It would be ideal to put your entire game graphics on a single texture. If not you have to be careful that you group or batch your objects so that you switch textures as infreqently as possible.

On my iMac running Vista, which is a an Intel Dual Core 2 @ 2GHz with ATI X1600 graphics, I had to adjust to about 8000 particles to get 60fps. It bombed out when I tried 100,000, but 50,000 worked at a few frames per second. Somehow I am thinking this is still slow compared with what I've seen in OpenGL.

I also agree triangles are probably not much benefit compared to quads - your triangle has to cover as much space as 2 quads in order to fit the same-sized quad inside it, which means more alpha tests/overdraw.


TartanTangerine (was Indiepath)(Posted 2008) [#20]
Yeah, I mentioned the triangle thing as the trade off is not worth it - it's good to know you tried though :)

1 Texture is always going to be the fastest - there are some really great texture packers on the market too that will do all the hardwork for you.


Stevie G(Posted 2008) [#21]
You won't get a huge speed boost by using a single texture for 10,000 quads. The biggest overhead with single surfaces system in Blitz is that vertex manipulation is costly. IIRC each single vertex change is sent to your card as a state change.