This section details all event-related nodes.
EventGenerator
Scope: Simulation graph.
This is an advanced node, we recommended you do not use it directly but instead use the EventMultiplier
or Trail
nodes to achieve multiple-events-per-frame emission.
The EventGenerator node is a generalization of the Trigger node, which is able to pulse multiple events per frame.
The EventMultiplier
and Trail
nodes from the core library both use the EventGenerator node.
Minimal setup of an EventGenerator node:
Input pins | Type | Description |
Accum | int2 | Dimensionless, initialized to int2(0) .See the EventMultiplier or Trail nodes on how to properly setup this value. |
Offset | float | How much to advance the spawn accumulator each frame. Valid range: [0, +∞[ |
Interval | float | Spawn interval size this frame. Valid range: ]0, +∞[ |
PulseWindowStart | float | Fraction in current time-window (frame) at which the events should start being pulsed.0.0 will pulse the event at the beginning of the frame.1.0 will pulse the event at the end of the frame.Valid range: [0, 1] |
PulseWindowEnd | float | Fraction in current time-window (frame) at which the events should end being pulsed.0.0 will pulse the event at the beginning of the frame.1.0 will pulse the event at the end of the frame.Valid range: [0, 1] |
Output pins | ||
Accum | int2 | Outgoing Accumulator. For the generate node to function properly, this should always be wired into a DiscretizationPoint node. |
Signal | event | Outgoing event. No payloads are added by default. |
+ all common properties |
When the node is disabled, no events are pulsed.
When the spawn accumulator plus Offset
reaches Interval
, the node emits one event.
It will emit as many events as necessary until the spawn accumulator becomes lower than Interval
.
For example, with an Accum
starting at zero, an Interval
at 2.5
, and an Offset
of 0.5, the first 4 simulation frames will produce no event, but the 5th will emit one event, followed by 4 frames with no events, etc…
With an Offset
of 10.0
, the first frame will spawn 4 events, the second frame will then spawn 4 events again, etc…
Logic:
Accum += Offset; EventCountThisFrame = int(Accum / Interval); Accum -= EventCountThisFrame * Interval; for (evid = 0; evid < EventCountThisFrame; evid++) PulseEvent();
EventGraphPortal
Scope: Simulation graph.
Experimental feature (undocumented, subject to changes), introduced in v2.8.
EventParent
Scope: Simulation graph.
This node gives access to the parent event wired into the current layer, which gave birth to the current particle.
It allows to extract any payload the event carried.
These payloads can only be extracted at spawn !
Output pins | Type | Description |
Signal | event | Parent event. Contains all the payloads sent over by the parent.This cannot be wired directly into an output node to “pass-through” the parent event. To do so, you must setup a passthrough layer that does a trigger(true) at spawn, then uses a payload copy node to copy the parent event into the new pulsed event, and output that event.The PopcornFX editor can do this for you if you insert a new layer on an existing event wire in the event-graph. (either hover the wire with the mouse cursor and hit Ctrl+Space, then type “Layer” in the node creation dialog, or right-click on the wire, select insert node, and type “Layer”. |
+ all common properties |
When the node is disabled, no payloads are present.
EventPayloadAppend
Scope: Simulation graph.
The PayloadAppend node injects a new payload into an event, or replaces an existing one.
Property | Type | Description |
PayloadName | String | Name of the payload data element. |
PayloadType | enum | Type of the payload data element.
|
PayloadKind | enum | Payload builtin kind
|
ForceOverride | bool | If enabled, no warning will be emitted when overriding a payload element of the same name and type. A warning will still be emitted when overriding a payload element of the same name but a different type. |
ForceTypeOverride | bool | If enabled, no warning will be emitted when overriding a payload element of the same name but different type. |
IgnoreWarningsUnused | bool | If enabled, no warning will be emitted if this payload element is unused by the layers it triggers in the layergraph. |
Input pins | ||
Signal | event | Event to process. |
Value | float-float4 int-int4 bool-bool4 orientation | Value to add to the payload of Signal . |
Output pins | ||
Signal | event | Processed event with the payload added. |
+ all common properties |
When the node is disabled, no payload is added to the incoming event, which is passed-through unchanged.
Troubleshooting: You cannot use this node in the event-graph ! If you want to append a payload to an event flowing through the event-graph, you will have to create a dummy passthrough layer (insert a “layer” node on the existing event wire) that will take care of re-triggering the event, copying the incoming payload from the parent event, and then append the new payloads you need to add.
EventPayloadAppendLinear / EventPayloadAppendCubic
Scope: Simulation graph.
The PayloadAppendLinear or PayloadAppendCubic nodes inject a new payload into an event, or replace an existing one.
They will use the time-fraction in the current frame at which the event was pulsed to interpolate the payload, using the start/end values, and the start/end tangents if any.
This allows to smoothly interpolate the spawn position within a trail, and to even get bent trajectories using the start/end velocity of the parent particle.
This is only an example, you can interpolate any payload value.
Values of type orientation
cannot use the cubic
interpolation mode, only linear
.
When you create the nodes in-editor, both the Linear and Cubic flavors of this node are in fact presets. There is only a single real EventPayloadAppendInterp
node which handles interpolated payloads, and allows you to switch between the different interpolation types.
Property | Type | Description |
PayloadName | String | Name of the payload data element. |
PayloadType | enum | Type of the payload data element.
|
PayloadKind | enum | Payload builtin kind
|
ForceOverride | bool | If enabled, no warning will be emitted when overriding a payload element of the same name and type. A warning will still be emitted when overriding a payload element of the same name but a different type. |
ForceTypeOverride | bool | If enabled, no warning will be emitted when overriding a payload element of the same name but different type. |
IgnoreWarningsUnused | bool | If enabled, no warning will be emitted if this payload element is unused by the layers it triggers in the layergraph. |
Interpolation | enum | Controls how the payload will be interpolated
|
HighQualityInterpolation | bool | When enabled, the orientations will be interpolated with a higher-quality algorithm. When internally represented using quaternions, SLerp will be used instead of NLerp. |
Input pins | ||
Signal | event | Event to process. |
ValueStart | float-float4 int-int4 bool-bool4 orientation | Value of the payload at the start of the time-window (frame). |
ValueEnd | float-float4 int-int4 bool-bool4 orientation | Value of the payload at the end of the time-window (frame). |
TangentStart | float-float4 int-int4 bool-bool4 | Tangent of the payload at the start of the time-window (frame). Set to ValueEnd - ValueStart to produce linear interpolation even when Interpolation is set to Cubic . |
TangentEnd | float-float4 int-int4 bool-bool4 | Tangent of the payload at the end of the time-window (frame). Set to ValueEnd - ValueStart to produce linear interpolation even when Interpolation is set to Cubic . |
Output pins | ||
Signal | event | Processed event with the payload added. |
+ all common properties |
When the node is disabled, no payload is added to the incoming event, which is passed-through unchanged.
EventPayloadClear
Scope: Simulation graph.
Erases one or all payload elements from the incoming event wire.
Property | Type | Description |
ClearAll | bool | If enabled, will remove all payload elements. |
PayloadName | string | Name of the payload element to remove. Ignored if ClearAll is enabled. |
Input pins | ||
Signal | event | Event to process. |
Output pins | ||
Signal | event | Processed event. |
+ all common properties |
When the node is disabled, the original Signal
event is passed-through unchanged.
EventPayloadCopy
Scope: Simulation graph.
Copies all payloads from one event wire to another.
Input pins | Type | Description |
Signal | event | Event to copy the payloads into. |
SignalB | event | Event to copy the payloads from. |
Output pins | ||
Signal | event | Processed event. If Signal and SignalB both have events with identical names, the events in SignalB will always be force-copied and overwrite the events that were in Signal initially. |
+ all common properties |
When the node is disabled, the original Signal
event is passed-through unchanged.
EventPayloadExtract
Scope: Simulation graph.
This node performs the reverse operation of the EventPayloadAppend node: It extracts a payload from an existing event.
This is usually used inside layers to extract the payloads sent by the parent event and wire them into the simulation computations.
Property | Type | Description |
PayloadName | String | Name of the payload data element. |
PayloadType | enum | Type of the payload data element. This is optional, you usually want to keep it to auto , the graph compiler will deduce the type if it finds the payload in the parent event.
|
PayloadKind | enum | Payload builtin kind. You can leave the payload name empty, and instead specify the kind of payload you want to extract. This allows you to always extract the XForm or EmittedCount payloads no matter how they’ve been named in the parent payloads. Useful when extracting those builtins from a generic template.
|
IgnoreWarningsMissing | bool | If enabled, no warning will be emitted if this payload element is not found in the input event link. Any numeric payload not found but still extracted evaluates to zero. |
ExtractEventMask | bool | If checked, overrides PayloadName , and the node will return the event mask (trigger condition), of type bool . |
RemoveFromPayload | bool | If enabled, removes that element from the payload. |
Input pins | ||
Signal | event | Event to process. |
DefaultValue | float-float4 int-int4 bool-bool4 orientation | Value to output in the output Value pin when the payload is not found in the parent event. |
Output pins | ||
Signal | event | Input event passed-through, with the payload removed if RemoveFromPayload is true . |
Value | float-float4 int-int4 bool-bool4 orientation | Value extracted from the event payload. |
Found | bool | true if the payload was found in the parent event, false otherwise.This is usually constant-folded at compile time, except when the current layer is triggered by multiple parent layers, some of which append the payload element, and some others don’t. |
+ all common properties |
When the node is disabled, no payload is extracted from the incoming event, the Value
pin behaves as if it was unplugged from whatever it is plugged in.
EventPayloadExtractLinear / EventPayloadExtractCubic
Scope: Simulation graph.
These node perform the reverse operation of the EventPayloadAppendLinear / EventPayloadAppendCubic nodes: They extract a payload from an existing event.
This can only be used to extract a payload from the same layer, coming from an EventGenerator node, so its use is limited.
It’s only useful to grab payload interpolation parameters that were added inside a template node you don’t have access to and can’t modify (ex: from the corelib, or from your studio’s template library).
Property | Type | Description |
PayloadName | String | Name of the payload data element. |
PayloadType | enum | Type of the payload data element. This is optional, you usually want to keep it to auto , the graph compiler will deduce the type if it finds the payload in the parent event.
|
PayloadKind | enum | Payload builtin kind. You can leave the payload name empty, and instead specify the kind of payload you want to extract. This allows you to always extract the XForm or EmittedCount payloads no matter how they’ve been named in the parent payloads. Useful when extracting those builtins from a generic template.
|
IgnoreWarningsMissing | bool | If enabled, no warning will be emitted if this payload element is not found in the input event link. Any numeric payload not found but still extracted evaluates to zero. |
ExtractEventMask | bool | If checked, overrides PayloadName , and the node will return the event mask (trigger condition), of type bool . |
RemoveFromPayload | bool | If enabled, removes that element from the payload. |
Interpolation | enum | Controls which interpolation parameters to extract.
|
Input pins | ||
Signal | event | Event to process. |
DefaultValue | float-float4 int-int4 bool-bool4 orientation | Value to output in the output Value pin when the payload is not found in the parent event. |
Output pins | ||
Signal | event | Input event passed-through, with the payload removed if RemoveFromPayload is true . |
Value | float-float4 int-int4 bool-bool4 orientation | Value extracted from the event payload. |
Found | bool | true if the payload was found in the parent event, false otherwise.This is usually constant-folded at compile time, except when the current layer is triggered by multiple parent layers, some of which append the payload element, and some others don’t. |
+ all common properties |
When the node is disabled, no payload is extracted from the incoming event, the Value
pin behaves as if it was unplugged from whatever it is plugged in, and the Found
pin outputs false
.
EventStart
Scope: Event graph.
Brings events pulsed from a Timeline into the event graph. One event will be pulsed out of the EventStart node for each event keyframe present in the timeline referenced by the node.
The pulsed event will contain all the payloads specified in the original timeline keyframe.
Property | Type | Description |
EventName | string | Name of the timeline track events should be pulsed from |
Output pins | ||
Signal | event | Outgoing event. There will be one event pulsed per keyframe in the timeline track. If a single simulation timestep has crossed multiple keyframes, multiple events will be emitted at the correct timestamps. Each event is emitted with the full payload defined in each timeline keyframe. |
+ all common properties |
When the node is disabled, no events are pulsed.
EventTrigger
Scope: Simulation graph.
The event trigger node takes a bool
condition, and pulses an event whenever it is true
.
It is evaluated every frame, meaning that if the condition is true
during multiple consecutive frames, it will trigger one event per frame, until the condition becomes false
.
When the Condition
input is a Spawn value, and the node is not forced to Evolve, the evaluation will happen only once at spawn.
It cannot pulse multiple events per frame, making it unsuitable for things like spawning trails.
To pulse multiple events per frame, use the EventGenerator node instead.
To pulse an event only once, use the TriggerOnce
node from the core library.
Input pins | Type | Description |
Condition | bool | Tells the trigger node whether or not to pulse an event. |
PulseAt | float | Time fraction within the simulation frame at which the event should be pulsed.0.0 will pulse the event at the beginning of the frame.1.0 will pulse the event at the end of the frame.Valid range: [0, 1] You can use this to pulse an event at a specific time.For example you can compute the exact time of a collision inside the frame by using the ratio between the intersection distance over the total raycast length, and the spawned child particles will evolve for the correct impact time up til the end of the frame, giving precise and robust lifetime management for short-lived particles, even at lower framerates. (Note that the “Physics” and “Collision” nodes from the core library already perform these kind of computations to ensure impact events are emitted with the correct timestamps) |
Output pins | ||
Signal | event | Outgoing event. The trigger node will emit either zero or one event per simulation step, depending on the value of the Condition input.No payloads are added by default. |
+ all common properties |
When the node is disabled, no events are pulsed.