CParticleEvolver Spawner
! IMPORTANT ! This is a PopcornFX v1 page. PopcornFX v2 documentation can be found here |
---|
Last update: v1.9.0 - Main page :
Particle evolvers
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.
Contents
Node properties
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:
Auto-fields
The spawner evolver automatically creates, if they don't exist, the following particle fields:
Name | Type | Footprint | TransformMode | self access to field |
---|---|---|---|---|
Position | float3 | 16 bytes | Transform | read |
Private fields used internally: | ||||
PrevPosition | float3 | 16 bytes | none | read |
SpawnerID | int | 4 bytes | n/a | read |
SelfID | int | 4 bytes | n/a | read |
PartialIntervalAccumulator | float | 4 bytes | n/a | read/write |
Side effects
The spawner evolver
- Spawns other particles
- Writes to the
'CustomPartialIntervalAccumulatorField'
Flux functions
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.