Particle System Operators

From Valve Developer Community
Jump to: navigation, search
English (en)中文 (zh)
... Icon-Important.png


Common Operators

Generally all particle systems need a movement_basic operator and a lifespan_decay. All particles need movement_basic in order to move at all. Also, without a lifespan_decay, particles will not be destroyed once their lifespan is up (the alpha_fade operator is an early operator that also includes lifespan_decay in it, so it also will provide the same function, thus a lifespan_decay isn't needed when used with an alpha_fade operator).

General Operations

Operator Fade In/Fade Out/Fade Oscillate - These are standard operators that work on all operators. Depending on the operator, the fade component may or may not work, but rather it may be a binary effect.

In and Out times are relative to the emitter lifespan, so an operator that fades in after 3 seconds does so relative to the emitters life, not the individual particle.

If an oscillation time is set, fade in and fade out times become 0.0 to 1.0 times relative to that oscillation time. That is if you wish your operator to oscillate in and out, setting an oscillation time of 4, a fade in of .25 and a fade out of .75 would mean that the operator has no effect for 1 second (one quarter the oscillation cycle time), works for 2 seconds (.25-.75), fades back out at 3 (three quarters of the oscillation cycle time), and then the cycle loops at the 4th second back to the start.

Operators

See Generic Operator Options for shared options.

Lifespan Decay

Deletes a particle when its lifespan expires. Takes no parameters. Without this or alpha_fade your particles will never expire.

Note that without a Decay operator of some sort (or one that, due to endcap settings, is never activated) that particles will never be killed. So even if a particle fully fades, scales to 0 radius, and has its life duration exceeded, without a Decay operator of some kind, those particles will continue to exist, costing memory and processing power. A quick way to ensure your particle system is correctly ending and cleaning itself up is to check the preview window in the editor. If your effect is looping there, it is functioning properly. If it appears to stop and never restart, it (or a child of it) lacks a proper Decay operator. For continuous or effects which use and EndCap, pressing the "Stop" button in the Particle Editor should cause it to play its EndCap and restart. The Particle Count is also a good indicator of whether particles are decaying or simply accumulating.

Alpha Fade and Decay

Fades a particle's alpha value to specified values over a specified time, then kills the particle.

start_alpha
The alpha that the particle will fade in from. It will fade to its initialized alpha.
end_alpha
The alpha the particle will fade out to.
start_fade_in_time
Time at which to begin to fade in (proportion of lifespan).
end_fade_in_time
Time at which to end to fade in (proportion of lifespan).
start_fade_out_time
Time at which to begin fading out the particle (proportion of lifespan).
end_fade_out_time
Time at which to end fading out the particle (proportion of lifespan).

Alpha Fade In Random

Fades a particle in from 0 alpha with random range of time in absolute or proportional time.

fade in time min
The minimum time the particle will fade in over.
fade in time max
The maximum time the particle will fade in over.
fade in time exponent
A bias to the random range which alters the distribution curve.
proportional 0/1
This allows the fade in time range to be treated as a fraction of the lifespan of the particle (1) or absolute seconds (0).

Alpha Fade Out Random

Fades a particle out from it's initial alpha to 0 with random range of time in absolute or proportional time. Proportion or absolute time is calculated from the end of the particle's lifespan. For example, a .25 setting in proportional mode will cause the particle to fade over the last quarter of its lifespan, while 2 in nonproportional would be the last 2 seconds of its life. --alpha_fade_out does not include a lifespan_decay--

fade out time min
The minimum time the particle will fade in over.
fade out time max
The maximum time the particle will fade in over.
fade out time exponent
A bias to the random range which alters the distribution curve.
proportional 0/1
This allows the fade out time range to be treated as a fraction of the lifespan of the particle (1) or absolute seconds (0).

Clamp Scalar

Restricts the target scalar parameter value to be in between these values.

output field
The scalar parameter to clamp. This can be radius, roll, etc.
output maximum
The maximum value the output parameter is restricted by.
output minimum
The minimum value the output parameter is restricted by.

Color Fade

Fades the color of a particle to a target color over a given amount of time.

color_fade
Color to fade to.
color_fade_time
Time over which to fade the color (seconds).
fade_start_time
Once this point in time is reached in the particles lifetime, the particle will be fully it's original color. If this value is greater than "fade_end_time" the particle will stay it's original color.
fade_end_time
Once this point in time is reached in the particles lifetime, the particle will be fully affected by the color of "color_fade". If this value is greater than "fade_start_time" then the particle will remain the color of "color_fade".

Cull when crossing plane

Prevents particles from existing beyond this plane. (Useful for killing particles that won't ever be seen, like in geometry)

Control Point for point on plane
Draws the plane at this control point.
Cull plane offset
Offsets the plane based on the plane normal. (negative values offset the plane "backwards"; positive values offset the plane "forwards")
Plane Normal
The orientation in which the plane should be drawn.

Cull when crossing sphere

Prevents particles from existing beyond this sphere.

Particles outside this sphere cannot exist
Control Point
Draws the sphere at this control point.
Control Point Offset
Offsets the spheres position.
Cull Distance
The size of the sphere from its control point.
Cull inside instead of outside 0/1
Prevents particles from existing within the sphere instead of outside the sphere.

Lerp Initial Scalar

Linearly interpolate to the target scalar value

end time
The progress in the particles lifetime to reach the lerp value
output field
The scalar value to affect
start time
The progress in the particles lifetime to start interpolating to the lerp value
value to lerp to
The scalar value to lerp to

Lerp Initial Vector

Linearly interpolate to the target vector value

end time
The progress in the particles lifetime to reach the lerp value
output field
The vector value to affect
start time
The progress in the particles lifetime to start interpolating to the lerp value
value to lerp to
The vector value to lerp to

Lifespan Maintain Count Decay

Similar to lifespan decay, but randomly selects particles to kill in order to maintain a set count. (Good for killing some particles prematurely, and works well in conjunction with emit_instantaneously.)

count to maintain
The amount of particles that will remain.
decay delay
The time it takes for the particles to decay completely.
maintain count scale control point
Blank image.pngTodo:

maintain count scale control point field
Blank image.pngTodo:

Lifespan Minimum Radius Decay

Kills any particles that reach below this radius.

minimum radius
The radius value to read.

Lifespan Minimum Velocity Decay

Kills any particles that reach below this speed.

minimum velocity
The speed to read.

Movement Basic

Allows for basic movement of the particle through space.

gravity
Gravity to apply to the particle.
drag
Drag to apply to the velocity of the particle.

Rotation Basic

A prerequisite for particles to rotate continuously.

Rotation Orient Relative to CP

Spins the particle in the given rotation field to orientate towards the target control point.

Control point
The control point to "look" at.
rotation field
Roll, Roll Speed, Yaw, Pitch
Rotation Offset
Offset the rotation by this many degrees
Spin Strength
The amount of "force" to use when orientating to the control point

Rotation Orient to 2D Direction

Spins the particle in the given rotation field to orientate to an infinite direction.

rotation field
Roll, Roll Speed, Yaw, Pitch
Rotation Offset
Offset the rotation by this many degrees
Spin Strength
The amount of "force" to use when orientating to the look direction

Rotation Spin Roll

Adds rotational spin to individual particles, including spinning down and minimum spin.

spin_rate_degrees
Rate at which to spin (degrees).
spin_stop_time
Time at which to be at the minimum speed (seconds).
spin_rate_min
Minimum spin to be at when the stop time is past (degrees).

Rotation Spin Yaw

Adds rotational spin to individual particle's yaw axis, including spinning down and minimum spin. Works just like the roll rotation spin.

spin_rate_degrees
Rate at which to spin (degrees).
spin_stop_time
Time at which to be at the minimum speed (seconds).
spin_rate_min
Minimum spin to be at when the stop time is past (degrees).

Radius Scale

Scales the radius of the particle over time.

start_time
Time at which to begin the scaling (second).
end_time
Time at which to end the scaling (seconds).
radius_start_scale
Scale value at the beginning of the scaling.
radius_end_scale
Scale value at the end of the scaling.
ease_in_and_out
Spline scaling curve.
scale_bias
Bias the curve towards either end (0..1).

Movement Rotate Particle Around Axis

Similar to Rotation Spin Yaw and Rotation Spin Roll, but rotates all active particles around a given axis (or axes).

Rotation Axis
Vector. Spin about X Y and/or Z axis. Can rotate around multiple axes at once, which can produce interesting patterns (especially when particles are given some speed on initialization).
Rotation Rate
Speed at which to spin, in degrees.

Movement Lock to Controlpoint

Forces the position of a particle to that of some control point on the emitter.

start_fadeout_min
Bottom range of time to start fading out the lock (leave the particle behind).
start_fadeout_max
Top range of time to start fading out the lock (leave the particle behind).
end_fadeout_min
Bottom range of time to end fading out the lock. Particle will be fully disengaged from the control points movement at this point.
end_fadeout_max
Top range of time to end fading out the lock. Particle will be fully disengaged from the control points movement at this point.
start/end exponents
Bias on the selection within the range.
control point number
Which control point to lock to
fade distance
Particles will detach as they approach this distance
lock rotation
This will update a particle relative to a Control Point's rotation as well as position.

Movement Lock to Bone

Lock to Bone works like the Position Lock to Control Point operator, but is used in combination with the random position on model initializer. Given a particle is emitted from a particular bone, it will update its position based on the specific movement of that bone. Excellent for player auras or burning players.

control_point_number
The control point that references the model in question.
lifetime start fade
The time at which to start fading the lock - relative to particle lifespan (0-1).
lifetime end fade
The time at which to end (fully detach) the lock - relative to particle lifespan (0-1).

Normalize Vector

Divides the specified vector's length into a Unit Vector.

output field
The vector parameter to normalize. This can be (Position, Color, etc).
scale factor
How much to scale by when normalizing the vector.

Oscillate Scalar

Oscillates a scalar output value at a certain rate and frequency. This can be used to creating flashing, glowing, pulsing particles or more subtle effects. The start and end timings are useful for creating an effect which occurs only once other operators have reached a desired effect, etc. Multiple oscillators of the same type can be applied to create multiple levels of effects (such as a particle which slowly pulses between small and large, but is also constantly minorly jittering in size as it does so).

Scalars are mapped to a sin wave oscillation. A few sample frequencies have been marked.
proportional
This bool sets whether to oscillate at the specified frequency over the lifespan of the particle (1) or per second (0)
oscillation frequency max
Top range of frequency of oscillation. Depending on whether proportional is set, this frequency will map to the lifespan of the particle or per second. A high frequency will cause the particle to strobe, while anything lower than .25 can be used to apply a more constant direction of the rate rather than an oscillating effect.
oscillation frequency min
Bottom range of frequency of oscillation. Depending on whether proportional is set, this frequency will map to the lifespan of the particle or per second. A high frequency will cause the particle to strobe, while anything lower than .25 can be used to apply a more constant direction of the rate rather than an oscillating effect.
oscillation rate max
Top range of rate of change applied. This defines how much the particular output field changes per frame. Some fields (such as alpha) will be automatically clamped from 0.0 to 1.0, while others, such as radius, are not capped.
oscillation rate min
Bottom range of rate of change applied. This defines how much the particular output field changes per frame. Some fields (such as alpha) will be automatically clamped from 0.0 to 1.0, while others, such as radius, are not capped.
oscillation field
What parameter is oscillated. This can be alpha, radius, roll, etc.
start time min/max
A range defining when to start applying the oscillation. Start/End proportional flag defines whether this is relative to the lifespan of the particle or a strict time in seconds.
end time min/max
A range defining when to stop applying the oscillation. Start/End proportional flag defines whether this is relative to the lifespan of the particle or a strict time in seconds.
oscillation multiplier
This is a simple multiplier for the oscillation rate min/maxes.
oscillation start phase
This is where on the sin curve oscillation begins.

Oscillate Vector

Oscillates a vector output value at a certain rate and frequency. This can be used to create weaving, squiggling particles and so forth. The start and end timings are useful for creating an effect which occurs only once other operators have reached a desired effect. Multiple oscillators of the same type can be applied to create multiple levels of effects (such as a bug particle which slowly weaves about on a large scale at random and squiggles constantly as it moves).

Scalars are mapped to a sin wave oscillation. A few sample frequencies have been marked.
proportional
This bool sets whether to oscillate at the specified frequency over the lifespan of the particle (1) or per second (0)
oscillation frequency max
Top range of frequency of oscillation. Depending on whether proportional is set, this frequency will map to the lifespan of the particle or per second. A high frequency will cause the particle to quickly move back and forth, while anything lower than .25 can be used to apply a more constant direction of the rate rather than an oscillating effect.
oscillation frequency min
Bottom range of frequency of oscillation. Depending on whether proportional is set, this frequency will map to the lifespan of the particle or per second. A high frequency will cause the particle to quickly move back and forth, while anything lower than .25 can be used to apply a more constant direction of the rate rather than an oscillating effect.
oscillation rate max
Top range of rate of change applied. This defines how much the particular output field changes per frame. Color will be automatically clamped from 0 to 255, while position is not capped.
oscillation rate min
Bottom range of rate of change applied. This defines how much the particular output field changes per frame. Color will be automatically clamped from 0 to 255, while position is not capped.
oscillation field
What parameter is oscillated. This can be color or position.
start time min/max
A range defining when to start applying the oscillation. Start/End proportional flag defines whether this is relative to the lifespan of the particle or a strict time in seconds.
end time min/max
A range defining when to stop applying the oscillation. Start/End proportional flag defines whether this is relative to the lifespan of the particle or a strict time in seconds.
oscillation multiplier
This is a simple multiplier for the oscillation rate min/maxes.
oscillation start phase
This is where on the sin curve oscillation begins.

Remap Control Point Direction to Vector

Remaps the angles of the targeted control point to a vector parameter

control point number
The control point to look for.
output field
The vector parameter to change. This can be (color, position, normal, etc).
scale factor
The rate at which the output field is scaled by.

Remap Distance Between Two Control Points to Scalar

Similar to Distance to control point, except a start and end control point can be specified.

control point
The control point to look for.
distance maximum
The maximum distance a particle can be affected by its control point.
distance minimum
The minimum distance a particle can be affected by its control point.
ending control point
The ending control point to look for
ensure line of sight 0/1
Should the line of sight to its control point be considered.
LOS collision group
The collision type to use when tracing.
LOS Failure scalar
Blank image.pngTodo:

Maximum trace length
The maximum length to trace for.
output field
The scalar parameter to write to. This can be (Radius, position, etc).
output is scalar of current value
Rather than overwriting the original value of the output field, the remapped value instead acts additionally to the current value.
output is scalar of initial random range
Rather than overwriting the original value of the output field, the remapped value is multiplied against the initial output field value.
output maximum
The upper end to map to.
output minimum
The lower end to map to.
starting control point
The starting control point to look for

Remap Distance to Control Point to Scalar

Determines the distance of a given control point to its particle to change a given scalar value. (Good for making particles that are closer to a control point smaller)

control point
The control point to look for.
distance maximum
The maximum distance a particle can be affected from its control point.
distance minimum
The minimum distance a particle can be affected from its control point.
ensure line of sight 0/1
Should the line of sight to its control point be considered.
LOS collision group
The collision type to use when tracing.
LOS Failure scalar
Blank image.pngTodo:

Maximum trace length
The maximum length to trace for.
output field
The scalar parameter to write to. This can be (Radius, position, etc).
output is scalar of current value
Rather than overwriting the original value of the output field, the remapped value instead acts additionally to the current value.
Note.pngNote: Make sure the item hierarchy for your operators is correct to get expected results!
output is scalar of initial random range
Rather than overwriting the original value of the output field, the remapped value is multiplied against the initial output field value.
output maximum
The upper end to map to.
output minimum
The lower end to map to.

Remap Scalar

Copy's the input scalar value to the output scalar value

input field
The scalar value to read from
input maximum
The maximum value to read from
input minimum
The minimum value to read from
output field
The scalar value to write to
output maximum
The maximum value to write to
output minimum
The minimum value to write to

Remap Speed To Scalar

Remaps the speed value of the particles to a scalar value. (Useful for making effects correlate to a particles speed)

input maximum
The maximum speed to read from
input minimum
The minimum speed to read from
output field
The scalar value to write to
output is scalar of current value
Rather than overwriting the original value of the output field, the remapped value instead acts additionally to the current value.
output is scalar of initial random range
Rather than overwriting the original value of the output field, the remapped value is multiplied against the initial output field value.
output maximum
The maximum allowed scalar value to be mapped to
output minimum
The minimum allowed scalar value to be mapped to

Movement Dampen Relative to Control Point

This operator suppresses movement as a particle approaches the specified control point. This can be used with lock to control point (and it's distance fade option) to have CPs "capture" particles near them and draw them along with them. It can also lock endpoints of a line of particles while allowing the middle section to move freely.

control_point_number
The control point to dampen relative to.
falloff range
The distance over which the dampening will fall off.
dampen scale
The strength of the movement dampening.

Set Control Point Positions

Allows a particle system to configure its own control points.

<nth> Control Point Number
The CP being affected.
Warning.pngWarning:Setting this to -1 was causing crashes in Left 4 Dead 2
<nth> Control Point Parent
Specify another CP to act as a movement parent. Leave at zero to use the system's origin.
<nth> Control Point Location
Vector coordinates for the CP
Set positions in world space
When true, CP locations are relative to the world. When false, they are relative to the system's local origin.
Control Point to offset positions from
CP locations are offsets from this CP's location.
Blank image.pngTodo: Updated over time or one-shot?

Set Control Point to Particles' Center

Locks a control point to the center of this system's particle cloud.

Control Point Number to Set
Center Offset
The control point to set, and an optional worldspace offset.

Set Control Point To Player

Tries to find a !player

Blank image.pngTodo: Confirm?

When found the player origin can be set as a control point.

Control Point Number
The control point to attribute to the player.
Control Point Offset
Offsets the control points position.
Use Eye Orientation 0/1
Blank image.pngTodo: Does this work?

Set Control points from particles positions

Dynamically offsets this systems own control point positions to remain relative to its bounding box origin.

# of control points to set
The amount of control points to offset.
First control point to set
The control point number to start counting the amount of control points to offset. (Any control points below this number, will not be offset)
first particle to copy
Allows the control points to offset if the particle count exceeds this number.
set orientation 0/1
Blank image.pngTodo:

Stop Effect after Duration

Stops the particle effect after a set time.

Control Point Field X/Y/Z
Blank image.pngTodo:

Control Point to Scale Duration
Blank image.pngTodo:

Destroy All Particles Immediately 0/1
Whether to kill the particles instantly.
Duration at which to Stop
The time in seconds till the emitter stops.
Play End Cap Effect 0/1
Whether to use operator end cap states when the effect stops.

Inherit Attribute From Parent Particle

Copy's attribute values from its respective parent particle.

Inherited Field
Position, Radius, etc.
Particle Increment Amount
The amount of particles to spawn before looking for a new particle to inherit from.
Random Parent Particle Distribution
Whether to randomly select particles to copy from.
Scale
Scale the inherited value.

Ramp Scalar Linear Simple

Alters the particles scalar values with a linear ramp.

end time
The progress in the particles lifetime to stop the ramp. 0-1
rate field
Position, Radius, etc.
Note.pngNote:Using lifetime duration as the scalar field will essentially make the particle lifetime infinite as long as the end time value is equal to or greater than 1.
ramp rate
How fast to adjust the value in the particle field.
start time
The progress in the particles lifetime to start the ramp. 0-1