Skip to content

VfxLegacyLifetimeComponent

15.19

Inheritance 2 ancestors · 1 sibling

Class Documentation

Edit documentation

A lifetime component that uses the emission and lifetime rules of a complex emitter instead of phases. Its properties mirror the emission and lifetime properties of VfxEmitterDefinitionData; that page gives their shared meaning, and this page states where they differ. The client creates this component only when a bin declares one. It does not convert a VfxEmitterDefinitionData into one.

Times below are emitter time, in seconds since the emitter was created.

Emission

In each simulation step the emitter spawns nothing if any of these holds:

  • IsBurstEmitter is set and the emitter has already spawned.
  • Emitter time is below EmitterTimeOffset.
  • EmitterLifetime is set and emitter time is past it.
  • emitter time mod EmitterPeriod is not below EmitterTimeActiveDuringPeriod.

Otherwise the count is built in this order:

  1. The rate is EmissionRate plus the FlexEmitterRate contribution. When EmitterRateByVelocity is not (0, 0), it replaces both, capped by MaximumRateByVelocity.
  2. The rate is multiplied by the importance emission-rate multiplier for the current EffectsQuality. A negative result counts as 0.
  3. The count is the rate times the time since the later of the last spawn and the start of the current period, truncated. One step spawns at most the rate times 0.33 plus 1.
  4. On the first spawn, a count of 0 becomes 1 unless HasVariableStartTime is set. With IsBurstEmitter the count is the rate, truncated, and at least 1.
  5. The primitive of the geometry component can lower the count to the number of particles that it can still hold.

End of the emitter

Spawning is done when emitter time passes EmitterLifetime, or emitterLinger while the particle system is stopping. With IsBurstEmitter, spawning is done once the emitter has spawned. The linger rule of particleLingerType starts when spawning is done. The emitter is finished when it has spawned, emitter time is past EmitterLifetime and every particle has expired.

Properties

0x2f61e63c

Embed<0x54a1b7a6>
16.21
Default value
{
  "medium": 60,
  "VeryLow": 20,
  "High": 100,
  "Low": 40,
  "VeryHigh": 100
}
Edit documentation

A spawn percentage for each EffectsQuality level, in the fields VeryLow, Low, medium, High and VeryHigh. The client build that was read does not register this property, so the client skips it when it loads the bin.

DoesParticleLifeScale

Flag = false
15.22
Edit documentation

Multiplies each particle's lifetime at spawn by the lifetime scale factor of the particle system instance.

EmissionRate

Embed<ValueFloat> = { "constantValue": 0, "dynamics": null }
15.22
Edit documentation

Base emission rate, in particles per second. Only its value at time 0 is used, so a curve in dynamics contributes its first value and no change over time.

EmitterLifetime

Option<F32> = null
15.22
Edit documentation

End time of emission, in seconds of emitter time. Unset means the emitter has no end.

EmitterPeriod

Option<F32> = null
15.22
Edit documentation

Length of the emission cycle, in seconds. The emitter spawns only while emitter time mod EmitterPeriod is below EmitterTimeActiveDuringPeriod. Time spent outside the active part of a cycle does not count toward the next spawn.

EmitterRateByVelocity

Embed<ValueVector2> = { "constantValue": [0, 0], "dynamics": null }
15.22
Edit documentation

A pair (x, y) that, when not (0, 0), replaces the emission rate with speed * x + y, where speed is the emitter's speed in world units per second. EmissionRate and FlexEmitterRate are not read in that case.

EmitterTimeActiveDuringPeriod

Option<F32> = null
15.22
Edit documentation

Seconds at the start of each EmitterPeriod during which the emitter may spawn. Unset means always.

EmitterTimeOffset

F32 = 0
15.22
Edit documentation

Emitter time, in seconds, before which the emitter does not spawn. The emission progress of the emitter also counts from this time.

FlexEmitterRate

Pointer<FlexValueFloat> = null
15.22
Edit documentation

Adds flex * mValue to the rate, as flexRate does on a complex emitter. Not applied when EmitterRateByVelocity is in use.

HasVariableStartTime

Flag = false
15.22
Edit documentation

Removes the guaranteed first particle. Normally, when the first emission computes to zero particles, one is spawned anyway. With this flag it is not.

IsBurstEmitter

Flag = false
15.22
Edit documentation

The emitter emits once: a single burst of the rate, truncated and at least one particle, at its first spawn, and never again.

MaximumRateByVelocity

Option<F32> = null
15.22
Edit documentation

Upper limit of the rate produced by EmitterRateByVelocity, in particles per second. Unset means 300.

emitterLinger

Option<F32> = null
15.22
Edit documentation

Emitter time, in seconds, at which spawning ends while the particle system is stopping. It is capped at EmitterLifetime + 10.

particleLifetime

Embed<ValueFloat> = { "constantValue": 3, "dynamics": null }
Edit documentation

Lifetime of each particle, in seconds, evaluated at spawn. flexParticleLifetime is added and DoesParticleLifeScale can scale the result. A negative result means the particle never expires.

particleLinger

Option<F32> = null
15.22
Edit documentation

Linger time, in seconds, applied to the live particles once spawning is done, by the rule of particleLingerType. It is capped at particleLifetime + 10, and unset takes the cap.

particleLingerType

U8 = 0
15.23
Edit documentation

How particleLinger (L) is applied once spawning is done.

Value Starts when Effect on each live particle
0 spawning is done and the system is stopping Every step its lifetime is cut to at most L, counted from its birth.
1 spawning is done and the system is stopping Once: its lifetime becomes its current age plus L.
2 spawning is done, stopping or not The same rewrite as 1.

timeBeforeFirstEmission

F32 = 0
16.13
Edit documentation

Start time that the animation clock of the emitter's material counts from, in seconds. It does not delay spawning, unlike the property of the same name on a complex emitter. EmitterTimeOffset delays spawning.