Jump to content

Particle System Optimization


OMAR
 Share

Recommended Posts

the fastest code is no code

the fastest particles are no particle :P

General question, general answer ;)

 

But we'll be happy to help you to optimize one of your real particle case if needed... each case has its own optimization

Link to comment
Share on other sites

@jerome sorry it was too general :P 

Well I was looking for some kind of an article or at least something like that regarding general optimization techniques which can be applied to particle systems. Something like this:

Ok kids, today we will learn how to optimize your particle systems and not go full mad scientist and put your CPU on fire!

Number 1: Keep your number of particles as low as possible!

Number 2: blah blah blah

blah blah blah blah blah blah...

Maybe something like this? This could be real helpful because some developers may also target mobile devices for their games and well, those things don't really have those "fast" CPU's compared to PCs. We also wouldn't want a rise in sale of fire extinguishers because of the poorly implemented particles systems :D 

Link to comment
Share on other sites

ok, I'm not aware of this kind of article existing for BJS particles, but maybe it exists somewhere.... no idea, sorry

Basically, animating particles is just iterating over a big array and setting the particle properties. So the perf is really related to the global number of particles. Just remember that having 8K particles instead of 12K or 20K will not make a real difference for a human eye, but will make a real difference for the CPU handling twice less objects.

Keep also in mind that the iteration is done over all the particles to set their properties, even if they aren't currently in the fustrum. So it's better to keep a decent visible amount of particles and make sure to manage only them (and not un-visible ones) : keep them in the fustrum, recycle them quickly, etc

 

Link to comment
Share on other sites

35 minutes ago, jerome said:

iteration is done over all the particles to set their properties, even if they aren't currently in the fustrum

Wow, now THAT'S some useful information! I actually implemented your idea quickly to my game (by reducing the life time of particles) and now the "beauty of the scene" - I shall say, didn't change at all, yet now the number of particles in the scene halved. I believe this should be put into the docs too...  I honestly didn't know about the way CPU handles these particles and even more important, it handles them even they are NOT in the "view area" so thanks :) 

Link to comment
Share on other sites

2 hours ago, OMAR said:

We also wouldn't want a rise in sale of fire extinguishers because of the poorly implemented particles systems

:D

Omar, if you need particle optimization, then perhaps... you are using an under-powered mobile device.  Let me show you what a MANLY mobile device looks like...

http://cdn.satellitetoday.com/wp-content/uploads/2015/01/Sattruck.jpg

"Particle optimization" then means "How many godrays and special effects can we add to each particle?"  ;)  Good performance = "putting-on a good show", right?  Yep, with an ingenious custom update function and some particle effects, we can get great performances.  I suspect... we can add about 100 different particle effects onto a 10-sec particle lifetime.  heh

Ball-balancing trained seals... eat your hearts out.  Very few circus acts can match the wonderful performances of our particle systems.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...