GenApproxRate
Generator. Produces particles at an approximate rate with natural variation in timing.
The rate sets how many particles are produced on average. The moments of emission are random: two particles may come close together, then a pause may follow. Over a few seconds the count matches the rate, while the number of particles per frame varies around its average. This makes the stream look organic and is best suited for large quantities of particles where exact timing is not critical. For an even stream use Periodic (CPU) or EvenRing.
The generating rate can change over time via external input. Like the other percentage-based generators, pick the rate from the particle life: rate = 100 / mean life (2-second particles → 50%).
When the capacity is full. A particle that would be produced while every slot of the emitter is taken is not produced, and it is not made up for later: the generator simply keeps its average rate. A particle that dies in a frame frees its slot before the generator produces the new particles of that frame. Because the emission is random, at rate = 100 / life the emitter usually holds a little fewer particles than its capacity — some slots stay free for a moment while others would be needed. Raise the capacity a little if you need the full count on screen.
CPU and GPU. Since issue #425 the CPU preview of the editor and the JavaScript 1.1 and C# 1.2 exports produce particles the same way as GPU33 (random moments, the same average). The exact particles differ between the backends, while the character of the stream and its average rate match. Differences remain when the capacity is nearly full (GPU33 fills the last free slots more eagerly, which is noticeable with a small capacity) and around Delay and the time limit (GPU33 applies them to whole frames). Effects exported earlier to JavaScript 1.1 keep their even stream until they are exported again; C# 1.2 effects get the new behaviour with the updated runtime package.
In the Emitter Guide every numeric parameter of this generator is a value of its own (a fixed number, an emitter property, a graph over time …), wired to the matching input; switching the generator type carries the shared parameters along. See Linking the rate to particle life for keeping the rate in step with the particle life.
Properties & inputs:
- Rate per second (%) (input | property): Approximate amount of particles generated per second, in percent of the emitter's capacity. Values above 100% are allowed.
- Particle average life (property): Helper field to calculate the correct rate from average particle lifetime.
- Delay (input | property): Delay in seconds before the generator starts producing particles.
- Enable shots limit (property) and Time (input | property): despite the checkbox label, this is a time limit — when enabled, the generator stops producing particles after Time seconds since the emitter started.