Skip to end of metadata
Go to start of metadata

Overview

Modifiers are one of the most important features supported by the Wavicle particle system in CRYENGINE V. Although Wavicle provides a wide range of feature implementations that can be used to make all kinds of effects, their true power is only utilized when modifiers are used to dynamically modify behavior.

Modifier Stack

Many properties implemented by Wavicle features can contain a stack of modifiers. Each modifier takes that property value and then manipulates it in a specific way and sends that value to the next modifier in the stack. Some of the modifiers combine the output value from the last modifier with its own by multiplying on top of it.

Depending on the property in question and the settings of the modifier, then its logic can be applied for each component, for example a new particle being spawned or every particle in every frame. The following list outlines the modifiers available in the component:

Pic1: Modifiers menu options.

Attribute

This option allows you to change the base property based on an effect's attribute. 

PropertyDescription
Attribute NameThis will be the name of the attribute to read from. If the attribute does not exist in this emitter, then time source will get a value of 1 instead.
Scale and BiasAllows the attribute to be scaled and biased. Usually useful when the input might not be in the 0 to 1 range.
Spawn OnlySpecifies if the attribute is to be applied only when a particle is first born or if the attribute should always affect all living particles.

Note: This modifier is just an alternative way of using attributes. Another way would be to use "Linear" with source set to "Attribute".

Config Spec

This option allows you to change the base property based on the platform type or particle quality setting. Best used to scale up or down other feature properties for performance scalability.

PropertyDescription
LowScale value used when on Low Spec PC.
MediumScale value used when on Medium Spec PC.
HighScale value used when on High Spec PC.
Very HighScale value used when on Very High Spec PC.
XBox OneScale value used when on XBox One.
Playstation 4Scale value used when on Playstation 4.

Linear (Time-Based Modifier)

This option allows combining properties that are modified with time source, but with no additional transformation.

PropertiesDescription
No additional property is added, only time-based properties are used.

Noise (Time-Based Modifier)

This option uses a potential field based on Perlin noise to randomize the input property. Unlike the Random modifier, which tends to get fuzzy or diffuse, the Noise modifier adds smooth variation to particles.

PropertiesDescription
Time SourceSelects the time source input from the drop-down menu to sample the Perlin noise field. For more information, see the Time-Based Modifiers section below.
ModeSelects the noise modes from the drop-down menu. The following options are available:
  • Smooth: Simple Perlin Noise field.
  • Fractal: Adds additional roughness to the Perlin Noise field.
  • Pulse: Uses the noise field to pulse between 0 and 1. Useful to add flickering effects. 
AmountSpecifies the amount of variation that will be added to the particle. If the amount is greater than 1, then it can provide positive and negative variation at the same time.
Pulse WidthWhen the Pulse mode is chosen, it specifies the balance between pulse being turned on or off. A value of 0.5 allows the pulse to be turned on and off equally. Values greater than 0.5 result in the pulse being turned off more often than it's turned on.

Note: Use Time Source scale and bias to change the frequency and phase of noise. However, if time Scale is too high noise starts to behave closer to pure random and fuzziness, as a result diffuse might start to arise.

Pic2: Sample of Noise modes for a particle.

SmoothFractalPulse

Wave (Time-Based Modifier)

This option is used to provide different types of periodic values. These are based on trigonometric mathematics and are useful to add regular behaviors as opposed to variance.

PropertiesDescription
Time SourceLets you select the time source input from the drop-down menu and to sample the wave trigonometric equations. For more information, see the Time-Based Modifiers section below.
 WaveLets you select the wave equation from the drop-down menu. The following options are available:
  • Sin
  • Saw
  • Pulse 
Amplitude, BiasLets you add the Waveform settings.
InverseWhen selected inverts the waveform.

Note: Use Time Source scale and bias to change a Wave's frequency and phase.

Icon

Note: Cosine is the same as Sine with a 0.25 phase.

Pic3: Samples of the wave equations.

SinSawPulse

Pic4: A sample waveform setting.

Random

This option is applied, but only to the new particles. It provides a fast way to add simple variation to particle behavior.

PropertiesDescription
AmountLets you specify the amount of variation that will be added to the particle. If the amount is greater than 1, then it can provide positive and negative variation at the same time.

Double Curve (Time-Based Modifier)

Unlike the Curve modifier, the Double Curve modifier uses two Bezier curves. Time source is used to sample both curves at the same time, while the particle's Random field is used to interpolate between the lower and upper Bezier curve. This is useful in providing additional variance to the particle's behavior.

PropertiesDescription
Double CurveUses a double Bezier curve to provide additional variance.

Curve (Time-Based Modifier)

This option uses time source input to sample a Bezier curve. In Wavicle, Bezier curves have an unlimited number of points, however each point has to be in the range 0 to 1 in the X axis (there are no enforced limits on the Y axis). For performance reasons, Bezier points support slopes, but not slope weight.

PropertiesDescription
CurveUses a single curve to modify the values.

Inherit

This option allows child particles to inherit their parent's field.

PropertiesDescription
Spawn OnlyInherits parent field when a particle is born.

Time-Based Modifier's Common Settings

Many modifiers of the Wavicle particle system are time-based. This allows the modifier to not only accept the input from the property value modified by previous modifiers, but other aspects of the particle. All of these modifiers have a common set of properties:

PropertiesDescription
Time Source Options

The main way to differentiate between a regular modifier and a time-based modifier is that in the case of a time-based modifier, then a new drop-down box appears in the user interface allowing selection of the time source input. The following options are available:

  • Age: This is the normalized time of the current particle. Normalized means that this value will always be between 0 and 1. When a particle is initially created, self time starts at 0 and as the particle ages this value will progressively move toward 1 until the particle dies.
  • Spawn Fraction: When particles are spawned using a Spawn feature, then a Spawn Fraction field is added to each particle. The first particle spawned gets order value 0 and the last spawned particle gets order value 1.
  • Speed: Specifies the speed of the particle in meters per second.
  • Field: Particles have many fields besides just Size or Opacity (see the Field option below for more details). This mode allows for the selection/choosing of any one of the fields for a given particle.
  • Attribute: Reads the value from any of the emitters's Attributes. This is one of the most important time source options, since it allows attributes to actually control different aspects of the effect.
  • Level Time: Specifies the current level's time in seconds.
  • View Angle: For particles which have 3D angles (for more information about angles, see Angles), then this corresponds to the relative angle to the camera. When a particle faces the camera it outputs 1. When the particle is perfectly flat relative to the camera, then it will output 0. This option is best used in conjunction with field Opacity (for more information about opacity, see Field) to avoid certain types of visual artifacts with free facing particles.
  • Camera Distance: Specifies the particle's distance to the camera.
  • Random: Will always output a random value between 0 and 1. Can be used to create more sophisticated random variation effects then the modifier Random.

Note: For immortal particles or properties that are not applied to particles during runtime, then those sources will always be 0.

Attribute NameValid when Time Source is set to Attribute. This will be the name of the attribute to read from. If the attribute does not exist in this emitter, then time source will get a value of 1.
Field

When Time Source is set to either Field or Parent Field (n in the time source input). Allows for the selection/choosing of which field to read from:

  • Angle2D: Current particle's rotation angle (see Angles for more detail).
  • Spin2D: Current particle's spin rate (see Angles for more detail).
  • Alpha: Specifies particle's opacity (see Field for more detail).
  • Size: Specifies particle's size in meters (see Field for more detail).
  • Gravity: Specifies particle's gravity multiplier (see Motion for more detail).
  • Drag: Specifies particle's drag (see Motion for more detail).
  • Life Time: Specifies the lifetime of a particle in seconds or 0 for immortal particles (see Life for more detail).
  • Random: Each particle can get a random number from 0 to 1. Use this to add variance to the behavior of each particle.

Note: There is a difference between Time Source Random and Field Random. Time Source Random will always output a different number and is fully stochastic. Field Random on other hand corresponds to a particle's own random number and can be used to have consistent behavior between modifiers. This can be used for example to have variance but consistent size and opacity or to have all child particles share the same randomness as their parent.

Pic5: Field menu options.

Owner

Specifies from where the Time Source or Field should be taken from:

  • Self: Takes the time source from the particle.
  • Parent: Takes the time source from the particle's parent.

Note: When the owner is a Parent, but the particle's parent is already dead, then time source will always be 1. The exception to the rule is Speed, which will be set to 0 instead.

Time Scale and Time BiasAllows the time source input to be scaled and biased. Usually useful when the input might not be in the 0 to 1 range (such as Speed or Attribute).
Spawn OnlyIn some cases it is desirable to choose if the Modifier is to be applied for every particle every frame or if the Modifier should only be applied once when the particle is born.

 

GPU Support

Currently modifiers have very limited support in the current GPU pipeline. At the moment the only modifier that can be used is the Curve modifier and only with Self Time as the time source.

 


  • No labels