November 21, 2019, 09:36:44 AM

Author Topic: Fun with half a million particles  (Read 1065 times)

Offline GaborD

  • Sr. Member
  • ****
  • Posts: 321
Fun with half a million particles
« on: June 02, 2018, 03:01:07 PM »
Finally found some time to keep working on my AGK particle system.
Still a lot to do, but it's slowly getting to a usable state. Time to motivate myself with a worklog.

Yesterday I added quite afew things.

- First up, variable particle counts, which get grouped to their respective emitter groups so that we can streamline everything on the GPU. This is necessary to reach high speeds once we get to extreme particle counts.
For now I added 4K, 16K, 256K, 512K, 1M, 2M group types. (the last two are just for fun, haha. But they do work.)

- Improved particle handling. Each particle gets simulated on it's own, if needed (due to high particle counts) calculations get distributed across several frames. This is only necessary at 1M+ particles, the simulation is actually really fast, most of the performance needed is for rendering. (due to all the overdraw fillrate can get crazy with 1M+ alpha'd polies)   

- Added more turbulence and noise types. This allows for more organic disturbances that look almost flame/fire/plasma like.

- Added attractors (x,y,z separable)

- Added better gravity control (x,y,z)

- Added axis aligned circular wind, it basically pushes particles in a circular motion around the defined axis

- Improved spawn control. The system can now handle high spawn counts all the way up to the particle count. Thus it's possible to spawn hundreds of thousands of particles in a single refresh, without any performance impact.

Here is a quick video of half a million particles. It's just one emitter, I change the emitter settings at runtime to get different effects.



More updates soon :)

A screen or two to show framerate with 500K:







Offline GaborD

  • Sr. Member
  • ****
  • Posts: 321
Re: Fun with half a million particles
« Reply #1 on: June 02, 2018, 03:06:57 PM »
Just for fun, shots with 1 million particles. All the overdraw starts hurting the speed. :)
This uses no textures other than a 32x32 smooth dot as particle texture. All the flamy structures are randomly formed by the particles moving through turbulence.








Short vid with a 1 mil particle plasma effect:


Offline Qube

  • Administrator
  • Hero Member
  • *****
  • Posts: 2199
Re: Fun with half a million particles
« Reply #2 on: June 02, 2018, 03:47:41 PM »
Very impressive :)

Are you aiming to sell the system or is it just for private use?
Until the next time...

Offline GaborD

  • Sr. Member
  • ****
  • Posts: 321
Re: Fun with half a million particles
« Reply #3 on: June 02, 2018, 04:26:56 PM »
It's for a project, but I would like to make an easy to use addon out of it afterwards.
But, because it's AGK it will have to support mobile too, so that will be a challenge. :D

Offline Qube

  • Administrator
  • Hero Member
  • *****
  • Posts: 2199
Re: Fun with half a million particles
« Reply #4 on: June 02, 2018, 04:29:15 PM »
It's for a project, but I would like to make an easy to use addon out of it afterwards.
But, because it's AGK it will have to support mobile too, so that will be a challenge. :D
Sweet, look forward to it. Ack, don't worry about mobile, it's not a requirement to support every platform, so if your system suits desktop targets better then just aim for those :)

Besides, you could always do a cut down version for desktop and mobile if needed.
Until the next time...

Offline c0d3r9

  • Full Member
  • ***
  • Posts: 143
Re: Fun with half a million particles
« Reply #5 on: June 02, 2018, 04:38:45 PM »
Quote
Sweet, look forward to it. Ack, don't worry about mobile, it's not a requirement to support every platform, so if your system suits desktop targets better then just aim for those :)
Indeed...
Atm i play around with particles with AGK and its quite fun.
Laptop: Win10@64bit - i3 2x2Ghz - 8GB Ram - 1TB HDD
Desktop: Win10@64bit - AMD Ryzen 5 2400G - MSI B450 Tomahawk - 8GB Ram - 240GB SSD

Offline peteswansen

  • Jr. Member
  • **
  • Posts: 54
Re: Fun with half a million particles
« Reply #6 on: June 02, 2018, 06:05:34 PM »
There is a growing movement to use custom computer programmed and "hardware video/audio synthesizers" projected  "light shows" with amateur and semi pro music events here in Seattle, (and worldwide no doubt)- I have been to multiple events lately and the graphics are very nice! So your particle system would fit in very nicely displayed by a projector... 

Offline GaborD

  • Sr. Member
  • ****
  • Posts: 321
Re: Fun with half a million particles
« Reply #7 on: June 02, 2018, 10:46:46 PM »
@peteswansen That would be an interesting use for it. Being realtime would allow for instant manipulation, adding forces, swipes, wind, etc. in reaction to the music and the crowd.

Just for the fun of it, I added a flamethrower style setting, took about 20 seconds. Just some slow oscellation for the spawn direction and a steady low spawnrate particle stream and some updraft. Would be a cool graphical addition to a twinstick shooter :)

Video here:


It's really fast too if particle count is kept in a more reasonable range (still 250K  ;D ):