The spawner evolver allows you to create particles that will spawn other particles, when moving around, or when enough time has passed. It is typically used to create trails.
See the Trails tutorial for more details on how to use this evolver.
Unless you are moving the particles by hand, usually to work correctly, all spawner evolvers in a given state must be located _after_ the Physics evolver.
NOTE : In PK-Editor v1.5.2 and below, the spawner evolver needed another evolver to fill the 'PrevPosition' field for him, usually the Physics evolver. This is no longer the case in v1.5.3 and above, everything is done automatically.
NOTE2 : In PK-Editor v1.4.2 and below, when creating a new spawner evolver, no particles will be visible, you will need to manually create a renderer, and a state, by right-clicking on the particle layer > new state, and on the 'renderers' node > new renderer.
Controls what metric the evolver should look at to decide when to spawn a particle.
Distance : will spawn a child particle when the parent particle has travelled 'SpawnInterval' world units
Time : will spawn a child particle every 'SpawnInterval' seconds
Custom : will read the <float> value of the parent particle's 'CustomSpawnMetricField' field, each frame, and spawn that number of child particles
Interval between two consecutive spawns. if 'SpawnMetric' is set to 'Distance', this will be the distance in units the parent particle has to travel before it spawns another child particle, if set to 'Time', it will be the time in seconds between two consecutive spawns.
Tells wether or not child particles should inherit the source particle's coordinate frame, defined by the optional 'ForwardAxisField' and/or 'UpAxisField'.
Time offset in the [0,1] range that controls when the child particles are spawned. A value of 0 will make the evolver spawn a child particle right when the source particle is born. A value of 1 will offset it forward in time to the next child spawn.
If set to 0, the first particle is spawned at t=0, and the last at t=duration - duration/spawnCount.
If set to 1, the first particle is spawned at t=duration/spawnCount, and the last at t=duration.
More generally, t0 = spawnDelay * duration/spawnCount
Number of times the flux function will repeat itself across the life of the source particles. (you can see this as the "tiling" of the flux function)
If true, spawn interpolations beetween frames will be localspace.
If this field is declared as a <float3>, it will be used to compute the trajectory trajectory and spawn the child particles.
If this field is declared as a <float3>, when using oriented spawn matrices, if will be used as the 'FORWARD' axis of the child spawn-matrix.
If this field is declared as a <float3>, when using oriented spawn matrices, if will be used as the 'UP' axis of the child spawn-matrix.
Used only if SpawnMetric is set to Custom. If this field is declared as a <float>, will be used to grab the spawn metric value each frame.
For example, a value of 5.5 means \"spawn 5 and a half particles this frame\". The evolver will emit 5 particles, remember the half particle and take it into account next frame.
If this field is declared as a <float>, will be used as a dynamic multiplier to the spawn metric. Can be seen as a spawn-count multiplier. 0.0 produces no particles. One produces the normal amount of particles. 10.0 produces ten times more particles.
If this field is declared as a <float>, will be used as a dynamic multiplier to the spawn interval.
the FirstSpawnDelay property can seem a bit shady at first, its use not being really clear.
You can check out this small video illustrating it:
The spawner evolver automatically creates, if they don't exist, the following particle fields:
self access to field
Private fields used internally:
The spawner evolver
Spawns other particles
Writes to the 'CustomPartialIntervalAccumulatorField'
Like regular particle spawners, trail spawners support flux functions. To create a new flux function, right-click on the evolver, and select 'New Flux Function'
A "Flux Function" entry will be added in the treeview:
When selecting the Flux Function node, you can change the curve to control the particle flux:
Default flux function. Constant flux = 1.0
Simple flux function. Starts with a low flux, ends with a high flux. Particles start wide apart and end close together
Complex flux function. Drops to zero at multiple places.
Velocity-oriented spawn matrices
the 'UseVelocityOrientedSpawnMatrix' property controls the spawn transform space of the child particles.
Up axis : World
Up axis : Velocity-oriented
These two screenshots draw a per-particle float3 'Up' axis setup as follows in the spawn script:
Up = float3(0,1,0);
In the first screenshot, 'UseVelocityOrientedSpawnMatrix' is unchecked, and the 'Up' particle field only gets transformed by the original effect instance transforms.
In the second screenshot, it is checked, and the 'Up' particle field gets transformed by the local per-particle transforms that are computed using the 'velocity' property.