OMAR Posted March 29, 2016 Share Posted March 29, 2016 Hi everybody! I was wondering about which properties of particle systems are most resource-consuming and how we can optimize particle systems in general? Thanks... Quote Link to comment Share on other sites More sharing options...
jerome Posted March 30, 2016 Share Posted March 30, 2016 the fastest code is no code the fastest particles are no particle 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 Quote Link to comment Share on other sites More sharing options...
OMAR Posted March 30, 2016 Author Share Posted March 30, 2016 @jerome sorry it was too general 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 Quote Link to comment Share on other sites More sharing options...
jerome Posted March 30, 2016 Share Posted March 30, 2016 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 Quote Link to comment Share on other sites More sharing options...
OMAR Posted March 30, 2016 Author Share Posted March 30, 2016 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 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted March 30, 2016 Share Posted March 30, 2016 2 hours ago, OMAR said: We also wouldn't want a rise in sale of fire extinguishers because of the poorly implemented particles systems 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. jerome 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.