Particle System Optimization!!

Started by
5 comments, last by ji yan 21 years, 11 months ago
Hi: I have implemented my own particle system that imitates the Microsoft sample code. I got a frame rate 35fs/s which is good. But i am just wondering that is that way the best for particle system? Is there any room for me to enhance the performance? Thanks for any advices!!
Advertisement
keep particles small, and keep th number of them down. particle systems are ussually fillrate limited.
Uhhh, actually, particle systems are usually geometry limited. The act of updating thousands of particles a frame kills the CPU -- and they''re physically very small, taking up very little of your available fillrate bandwidth.

-- John
Actually, you''re both right. If particles are big, you''ll have fill rate problems, if there are a lot, you''ll have CPU problems. How exactly are you doing these particles, using point sprites or quads? Reply and I''ll give yu further info. I''ve been working on an advanced particle system for over a month now and have it down pretty well.
VSEDebug Visual Studio.NET Add-In. Enhances debugging in ways never thought possible.
Actually, you''re both right. If particles are big, you''ll have fill rate problems, if there are a lot, you''ll have CPU problems. How exactly are you doing these particles, using point sprites or quads? How many particles at what size are you getting 35 fps and on what system? Reply and I''ll give yu further info. I''ve been working on an advanced particle system for over a month now and have it down pretty well.
VSEDebug Visual Studio.NET Add-In. Enhances debugging in ways never thought possible.
umm, thats why i suggested keeping the numbr down AND keeping them small. in most cases is the blending that kills the fillrate. i said ussually, as in most cases, not all the time. he did not mention how he was using them, nor how many, or the size. simply increasing the resolution from 800x600 to 1024x768 means an increase of 1.6384x more fillrate usage while cpu usgae is the same. add in many systems which leave trails, and it hits the fillrate pretty hard. while cpu can be limiting, this only occers on system of small particles rendering nothing but patricles on a really fast card.

granted more advanced systems increase the cpu usage, having trails will not incrase cou usage by much, but increase the fillrate usage by a lot. tell me how much cpu overhead is rendering 10 particles per each particle for trails? not much, but you increase fillrate by a factor of 10.
If you don''t need to render each particle by itself to streak it, don''t. Like the guys at Nvidia are always saying - batch! If you can group particles by texture, that can help as well. In my idea, you would create a new ''effect'' for each thing you want. Suppose I want a rocket trail, a spray of water and a group of sparks for a chunk of metal that is grinding on some other metal. Then I would create 3 ''effects''. Each effect has its own array of particles, created using ''new''. The size of the array of particles needed can be calculated from the number of particles in the effect and the maximum lifetime of the particles. You might want to take a look at this.

Moe''s site

This topic is closed to new replies.

Advertisement