Optional. Creates a child particle system for each particle, at its birth or at its death. It updates after the render component. See VfxChildComponent.
VfxComponents
Class Documentation
Edit documentationThe component graph of a component emitter: one object per slot for lifetime, physics, rendering and geometry, an optional child component, and a list of extra components. A component emitter has almost no properties of its own. Everything that a complex emitter carries as properties - emission, lifetime, motion, material and primitive - comes from the components in these slots.
Required slots. When the system is prepared, the client builds the emitter only if
LifetimeComponent, PhysicsComponent, RenderComponent and GeometryComponent are all
set, and the geometry component resolves to a primitive. A graph that misses any of them
drops its emitter without a message. ChildComponent and components are optional.
Preparing. The lifetime, physics and render components and every components entry
reserve the random values and driver storage that their drivers need. The client loads the
meshes that the geometry component's primitive names, the same way
VfxMeshDefinitionData describes. The render component
then builds the emitter's draw setup from the primitive, those meshes and the emitter's
name.
Creating. When a system instance creates the emitter, every component creates its
running part, an IVfxRuntime object, in this order: lifetime,
physics, render, geometry, child, then the components entries in list order. Each
running part declares the per-particle values that it stores.
Each update. In every substep of a system update, the component emitters update before the complex and simple emitters. For each component emitter the lifetime component first advances its state machine, see VfxLifetimeStateBehavior. Then the emitter runs one step:
- Particles die. A particle dies when its age reaches its lifetime. When the lifetime component reports that the emitter is finished, every particle dies.
- The lifetime component stores the step's time delta on every live particle.
- The render component starts its frame.
- If the lifetime component is still emitting and emission has not been stopped, it returns how many particles to spawn in this step, see VfxSpawnBehavior. The primitive can lower that count to its capacity. The new particles are spawned and every component is told about them.
- The lifetime component ages the particles.
- The physics, render, child and geometry components update, then every
componentsentry in list order. - The client sets the emitter's UV animation time: the time since the start delay ended, wrapped to the material's animation length. For an attached-mesh primitive it also stores the attachment transform.
A step with the same time as the previous step does nothing.
Stopping. When the particle system stops emitting, its component emitters spawn no more particles and their lifetime state machines move to the outro. The system counts as finished only when every component emitter is finished. When the system is destroyed, the running parts are deleted without a particle death hook for the particles that are still alive.
Shipped data. Component emitters ship in Summoner's Rift map data and in
Global.wad.client. Every shipped graph fills the four required slots with
VfxLifetimeComponent,
VfxModularPhysicsComponent,
VfxMaterialRenderComponent and
VfxGeometryComponent, and leaves ChildComponent empty.
Nearly every shipped component emitter sets disabled, and a disabled component emitter is
never built.
Properties
Type history (2 revisions)
- 15.22 - 16.5
Pointer<VfxGeometryComponent> - since 16.6
Pointer<VfxGeometryComponentBase>
Supplies the primitive that the particles are drawn as. Required, and it must resolve to a primitive. See VfxGeometryComponentBase.
Runs the emitter's state machine and decides when particles die and how many particles spawn in each step. Required. See VfxLifetimeComponentBase.
Moves the particles once per step, after the spawn. Required. See VfxPhysicsComponentBase.
Builds the emitter's draw setup when the system is prepared and the render data in each step. Required. See VfxRenderComponentBase.
Type history (2 revisions)
- 15.10 - 15.12
List2<0x79448c20> - since 15.13
List2<VfxComponentBase>
Extra components beyond the five named slots. Each entry reserves its driver storage when the system is prepared and creates its running part when the emitter is created. From then on it is told about each spawn and each particle death, and it updates after the five slots in every step.
Three component classes are made for this list:
| Class | Effect |
|---|---|
| VfxLightComponent | A point light for the emitter. |
| VfxEffectorComponent | An environment effector for the emitter. |
| VfxAudioComponent | Sound events at spawn, at the start of emission or for the life of a particle. |