Skip to content

Particle Influencers

Greg Hoffman edited this page Oct 15, 2019 · 2 revisions

Particle Influencers

There are a variety of stock influencers that you can use with particle monkey.

Basic Physics Influencer

The basic physics influencer allows you to provide a collision geometry that particles will test for intersections. You can also set how much energy is lost in the collision (dampening) and how much the particle bounces off the surface (bounce).

Attribute Usage
collisionMesh This geometry is used to collide against for every particle during each frame
bounce This float controls how strongly the particle bounces off the geometry and ranges from 0-1
dampening This float controls the velocity of the particle after it collides with the geometry and ranges from 0-1

Color Influencer

The color influencer lets you change a particle's color over time. It takes a color value type. The particle's final color is startColor * evaluatedColor.

Attribute Usage
colorOverTime This is a color value type which is multiplied by the start color to get a particle's current color

Emission Influencer

This influencer allows you to spawn particles outside of the normal emissions. You can add a number of emissions. Each emission contains the following attributes.

Attribute Usage
delay This delays the time until this emission can take effect
count This value type sets how many particles are emitted during an emission event
cycles This value type determines the number of times this emission can take place. If it returns -1 then it can apply infinitely.
interval This float determines how often we can attempt to emit particles
probability This float determines the chance that particles will emit

Gravity Influencer

The gravity influencer allows you to apply gravity to a particle over time. It uses a Vector Value Type for gravity so this can be animated if you so choose.

Attribute Usage
gravity This is a Vector Value Type which is subtracted from the velocity every frame

Impulse Influencer

The impulse influencer along with the velocity influencer allows you to change the velocity over time of a particle. The impulse influencer modifies the velocity directly whereas the velocity influencer replaces the existing value. The velocity can be modified in a linear or orbital manner. The influencer has the following attributes:

Attribute Usage
chance This float controls how likely the velocity will be changed this frame from 0-1
magnitude This float is multiplied against the final vector to control how large it is before it's applied to the current velocity
strength This float controls how much this new velocity will replace the existing one
linear This is a Vector Value Type which controls the linear influence on the velocity
orbital This is a Vector Value Type which controls the orbital influence on the velocity

Preferred Destination Influencer

This influencer attempts to force the particle to a given destination over time.

Attribute Usage
weight This value type controls how much the preferred direction replaces the velocity
chance This value type controls the chance the velocity will be modified to steer towards the destination
preferred destination This Vector Value Type controls the destination that the particle attempts to get to

Preferred Direction Influencer

This influencer attempts to conform to the particle to this influencer's direction.

Attribute Usage
weight This value type controls how much the preferred direction replaces the velocity
preferred direction This Vector Value Type controls the direction that the particle attempts to conform to

Random Influencer

The random influencer adds random noise to the position with a random chance. This allows for sporadic movement which is useful for things like fire.

Attribute Usage
chance This float controls how likely the particle's position will be changed this frame from 0-1
magnitude This float is multiplied against the random position vector to control how large it is before it's applied to the current position
strength This float controls how much this new position will replace the existing one

Rotation Over Lifetime Influencer

This influencer will rotate a particle over it's lifetime.

Attribute Usage
Speed Over Lifetime This is a Vector Value Type that is used to increase or decrease the speed one each axis of the particle's rotation.

Rotation With Velocity Influencer

This influencer will rotate a particle based on it's current velocity.

Attribute Usage
Velocity Range This is a Vector2f which allows you to define a range for the potential rotation. If the particle's speed is outside this range the rotation will be capped. The speed is divided by the max speed to get a float value between 0-1 which is used instead of the particle's lifetime to lookup the current rotation velocity.
Speed Over Velocity This is a Vector Value Type that is used to increase or decrease the speed one each axis of the particle's rotation.

Size Influencer

This influencer changes the particle's size over it's lifetime.

Attribute Usage
Size Over Time This is a Value Type which is multiplied against the particle's initial size to determine it's current size.

Sprite Influencer

This influencer controls sprite animation for the particle if any exists.

Attribute Usage
Use Random Image This boolean flag selects a random image in the sprite sheet when a particle is initially spawned
Animate This boolean flag allows a particle to have sprite animation over it's lifetime
Cycle This boolean flag changes how a particle's sprite sheet is animated. If the cycle flag is true it will repeat the sprite animations based on the fixed duration. If false it will run through the sprite animation once.
Fixed Duration This float variable is used if cycle animation is enabled
Sprite Columns This integer defines how many columns a sprite sheet contains
Sprite Rows This integer defines how many rows a sprite sheet contains
Render By Rows This boolean flag treats each row as a different sprite sheet. This is useful if you want to provide different animations from one sprite sheet.
Use Random Row This boolean flag selects a random row for a particle to use for animation. This is used in conjunction with render by rows.
Use Row This integer value sets the current sprite row when using 'Render By Rows'

Trail Influencer

This influencer adds a trail geometry that follows the particles.

Attribute Usage
Trail material This is a material object which controls the look of the trail. It is generally separate from the particle material.
Min length This controls how often a particle outputs a new quad to the trail. Setting this lower results in a higher polygon count.
Trail life This float controls how long the trail's lifetime is compared to the parent particle. At 1 this trail lasts until the particle is killed.
Use Particle Size This boolean flag is used if you want to tie the trail size directly to the current particle size
Use Particle Color This boolean flag is used if you want to pull the particle's color for use with the particle trail
Trail Size This is a Value Type which lets you control the width of the particle trail over time. This is overwritten by the 'Use Particle Size' flag.
Color Over Lifetime This is a Color Value Type which lets you control the trail's color over it's lifetime. This is overwritten by the 'Use Particle Color' flag.

Velocity Influencer

The impulse influencer along with the velocity influencer allows you to change the velocity over time of a particle. The impulse influencer modifies the velocity directly whereas the velocity influencer replaces the existing value. The velocity can be modified in a linear or orbital manner. For this influencer the velocity is multiplied against the starting velocity. The influencer has the following attributes:

Attribute Usage
linear This is a Vector Value Type which controls the linear influence on the velocity
orbital This is a Vector Value Type which controls the orbital influence on the velocity
orbital rotations This is a Vector Value Type which controls the number of rotations the particle will make over it's lifetime. This effectively acts somewhat like speed.