GenEvenRingManual
Generator. Shoots exact numbers of particles at manually specified time points, into a ring of emission slots. It works like GenApproxManual — the same keys on a working period, the same delay, interval and looping, the same timeline editing — but a key of 2 shoots exactly two particles, on every backend. In the Emitter Guide it is the EvenRing Manual Keys mode of the Generation section.
What a key's amount means. The Count mode decides:
- Exact — the amount is the number of particles to shoot (2 shoots two particles).
- % of capacity — the amount is a percentage of the emitter's capacity (Max. num. particles), as in GenApproxManual. With a capacity of 20, a key of 10 % shoots 2 particles and a key of 12.5 % shoots 3.
Amounts are rounded to the nearest whole particle (a half rounds up) and never exceed the capacity: a key never asks for more than the whole ring. Nothing carries over from one key to the next.
Switching the count mode keeps the effect. When you switch between Exact and % of capacity (in the Emitter Guide or in the Properties window), the editor rewrites the key amounts in the new unit, so every key keeps shooting the number of particles it shot before: with a capacity of 20, a key of 12.5 % becomes an exact 3, and an exact 3 becomes 15 %. This is exact for capacities up to 100,000. Above that the export keeps amounts to six significant digits, so a converted amount may shoot a somewhat different count — with tens of millions of particles, a few dozen particles more or fewer. An amount fed from an input is not rewritten — after the switch it is read in the new unit. Changing Max. num. particles later converts nothing: a percentage stays a percentage, an exact amount stays a number of particles. One undo reverts the switch together with the rewritten amounts.
The ring of slots. As in EvenRing, each particle has a slot of the emitter's capacity. The particles take the slots in turn, in the order of their key times: the first key's particles take slots 0, 1, …, the next key continues where it stopped, and after the last slot the ring starts over at slot 0 — also across working periods. A particle whose slot is still held by a living particle is skipped; the ring goes on as if it had fired. So for every key to shoot in full, a particle must die before the ring comes back to its slot: a whole capacity of particles later.
Keys out of time order. The ring follows the key times, not the order of the keys in the table. Keys at the same time follow their order in the table, and a key at the very end of the period comes before the next period's key at 0. The order is fixed on export, so the exported effect only looks the keys up — however many keys the table holds.
Fast schedules. When a single frame holds more particles than the capacity (a very short period, or a huge key), every slot keeps only the latest particle of that frame; the earlier ones are not shot.
Shots on different backends. Every backend (GPU33, JavaScript 1.1, C# 1.2 and Unity) uses the same ring and the same counts. Constant amounts are counted by the editor on export, so every backend fires the same numbers. The older exporters (JavaScript 1.0, C# 1.0 and 1.1) do not support this generator and report it on export. Capacities above 67,108,864 particles, or a table whose number of keys times the capacity reaches 2,147,483,648, are outside the supported range: such a generator shoots nothing, and the editor marks the block with a warning on export.
Reflected emitters. On a reflection the count mode and the burst pos mode always follow the source: the key amounts are synchronized as numbers, so their unit must be the source's. Switching the mode on the source converts its amounts, and the reflection takes both. A reflection with a different capacity then shoots its own share of the percentages, or the same exact counts.
Key times are constant. A key's time cannot come from an input: the order of the keys is fixed on export. If an older effect has a key time fed from an input, the export reports an error on the block — switch that key time back to a value in the block's properties.
Amounts may come from inputs and may change. An amount fed from an input is counted again on every frame. When it changes, the keys after it continue the ring from a different slot, so a living particle may make one of them skip its slot. Feed amounts from emitter-level values (emitter or system parameters, time and expressions of them): GPU33 reads the input for each particle slot, so a per-particle value such as Random gives every slot its own amount, and an amount that changes within a frame may be read at slightly different moments on the CPU and GPU backends.
Delay, Period and Interval must remain constant over time, otherwise generating glitches may occur. An "On terminate" attached emitter starts its schedule where its parent dies.
The generator has no rate, so the Emitter Guide's life link does not apply to it.
Properties & inputs:
- Delay (input | property): Initial delay before the first working period.
- Period (input | property): Duration of the working period. All shot keys must be within this range; a key outside it is ignored.
- Interval (input | property): Pause between consecutive working periods.
- Looped (property): Whether to repeat working periods.
- Count mode (property): What a key's amount means: Exact (a number of particles) or % of capacity. Switching it converts the constant amounts (see above).
- Burst pos mode (property): Controls how the Burst Pos. output is spread across the particles of one key. Normalized (default) runs the first particle to 0 and the last to 1 (index / (count − 1)). Linear runs the first particle to 0 and the last to 1 − 1/count (index / count).
- Shots (property): Number of shot keys within each working period. Each key has a Time (property) inside the period, always a constant, and an Amount (input | property).
Outputs (each key is one burst):
- Burst Amount (float): Number of particles the key shoots.
- Burst Pos. (float): Position of a particle within its key, by its place in the ring order: a skipped particle keeps its place, so the others keep their values (0 for a key of one particle).
- Shots Made (float): How many key occurrences came before this particle's key — 0 for the first key of the first period. Every key within the period counts, also a key with no particles and keys whose particles were skipped; with 3 keys per period, the first key of the third period reads 6. In the Emitter Guide the same values are available as the Gen burst position and Number of shots value types. Above 16,777,216 the count is no longer exact (it is a float).
Shot keys are edited on the timeline as for GenApproxManual. In Exact mode a key bar shows the number of particles, and its full height is the whole capacity.
Switching the Emitter Guide between Approx Manual Keys and EvenRing Manual Keys keeps the key table, the period and the start time. Keys coming from Approx Manual Keys arrive in % of capacity; going back, exact amounts are converted to percentages.