Particles Question...
Miscellaneous Forums/General Discussion/Particles Question...
what general technique would you use to maintain a constant particle flow rate for 5 or 10 emitters, that would give the same rate as for one emitter...
my problem is that whenever i add more than one emitter, the particle flow rate increases noticeably, ruining the effect...
thx
--Mike
Sounds like youve made a mistake in your code. if you've done it right, adding another emmitter shouldn't change the rate of other emmitters. Perhaps theres a global/local set incorrectly, causing some code to be run too many times on each update?
If I'm reading this right you want say 100 epps (emitted particles per second) no matter how many emitters you have. Could you just divide the total by the total number of emitters. so 100 epps/4 emitters = 25 particles per second per emitter. Something like that?
thx guys... looking into both suggestions now...
--Mike
hmm, If you are indeed wanting a constant number of emmited particles in total, and not a constant number of emmited particles per emmiter, then you just multiply the emitter-rate by the number of emitters. this way you can do it dynamically rather than calcing it when creating the emmiter as scott's method.
looking to get a constant number per emitter...
ok, i think i've got someething... Cyg, you were on the right track... all particles of the same type were being lumped into a big pool of particles, and updated together whenever the function was called...
i wound up associating a single pool into the emitter type, and passing the emitter to the update function... this way the big pool is now a small pool associated with each emiiter...
in short, i think i'm on the right track... and BIG THANKS to both... this was wracking my brain all of last night and into this morning...
sometimes it takes another set of 'eyes' to actually see the problem...
--Mike
the only time i ran into speed problems was accessing types and functions within nested For/Each loops.
it's not so much a speed problem, everything is running at an acceptable speed... its more of a consisency problem...
consistency of the particle flow whether you have 1, 2 ,3 ,4 or 10 emitters all spewing out bow wake particles is where i'm having problems... i forsee where i might have 8 ships 3 subs, 4 ships burning, and a plane or two on fire... these all are gonna need some sorta particles support, and will appear on and off the screen at random times... the code i had in place didn't fully take this into account... when i added three subs this morning, the wakes were very different from when i only had a single sub in there...
i think Cyg and Scott got me pointed in the right direction... it appears to be working now... still testing...
--Mike