[sldev] Reviewing/Fixing the Particle System

Nicholaz Beresford nicholaz at blueflash.cc
Wed May 23 12:39:05 PDT 2007


> I'm with Strife here. "Zero" means indefinite as in "this particle 
> system never terminates while in view". It doesn't mean "60 seconds".
>
> It doesn't matter if the particle system code was rewritten in 1.15 or 
> not, if it doesn't implement what was previously documented that's a 
> bug... this is not behavior that can be changed. There are millions of 
> particle systems in second life that this would completely break, PLUS 
> coming up with workarounds for this restriction if it was implemented 
> would cause more sim and network lag.
Understood ... I'm not religious about that ... I just thought the 
documentation was more right than the code.

>
> I have been following your other code changes, and most of them look 
> good to me. It looks like the real problems are the memory and 
> particle system leaks you located, not the indefinite particle system 
> lifetimes.
>
The problem is that those leaks I saw were not the source of the 
problem.  They just lost memory but, as far as I can tell, were removed 
from the list of active emitters.  In fact I'm running with that fix now 
and the particle system still fills up to the brim.

The problems I'm seeing from source and debugging is, that:

1) the system generates excess amounts of particle sources with lifetime 
0 that I can see no actually source for (I mean 200 high frequency 
emitters should be visible somehow?)
2) many of these systems generate progressive particles, meaning they 
generate more particles than particles die ... e.g. creating 200 
particles per second (pps) with a particle lifetime of 2 seconds meaning 
that when the first wave has died two times the amount have been 
generated, etc. I've seen situations with over hundred of those active.

Meaning: Even a single progressive particle emitter will eventually fill 
up the max particle count if it runs long enough.   And at that point, 
it's almost entirely random who gets through to creating new particles.

Well, I'm currrently assuming that both (1) and (2) are correct 
(although the question remains why this seems to have started with 
1.14/1.15), I'm currently working on code to throttle the high frequency 
emitters stronger than the low-frequency ones, operating under the 
assumption that a low frequency emitter is more meaningful (and one 
100pps emitter can drown out 100 emitters that emit one particle per 
second).

I'll put up code about this for discussion shortly and also logs to 
indicate what is happening.


Nick


More information about the SLDev mailing list