Fun with half a million particles

Started by GaborD, June 02, 2018, 15:01:07

Previous topic - Next topic

GaborD

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.

https://www.youtube.com/watch?v=Wr2w9y1ejTU

More updates soon :)

A screen or two to show framerate with 500K:







GaborD

#1
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:
https://www.youtube.com/watch?v=7NVQo4wCGEI

Qube

Very impressive :)

Are you aiming to sell the system or is it just for private use?
Mac Studio M1 Max ( 10 core CPU - 24 core GPU ), 32GB LPDDR5, 512GB SSD,
Beelink SER7 Mini Gaming PC, Ryzen 7 7840HS 8-Core 16-Thread 5.1GHz Processor, 32G DDR5 RAM 1T PCIe 4.0 SSD
MSI MEG 342C 34" QD-OLED Monitor

Until the next time.

GaborD

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

Qube

Quote from: GaborD on June 02, 2018, 16:26:56
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.
Mac Studio M1 Max ( 10 core CPU - 24 core GPU ), 32GB LPDDR5, 512GB SSD,
Beelink SER7 Mini Gaming PC, Ryzen 7 7840HS 8-Core 16-Thread 5.1GHz Processor, 32G DDR5 RAM 1T PCIe 4.0 SSD
MSI MEG 342C 34" QD-OLED Monitor

Until the next time.

plenatus

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.

peteswansen

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... 

GaborD

@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:
https://www.youtube.com/watch?v=-mFefOM93xw

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