Distributions

Data types that provide flexibility by allowing for constant values, random values within a range, values interpolated along a curve, and values driven by parameters.

Choose your operating system:

Windows

macOS

Linux

Distributions are a group of data types that provide flexibility by allowing for constant values, random values within a range, values interpolated along a curve, and values driven by parameters. These are generally used in properties of Particle Systems and nodes within SoundCues.

Although regions are listed in alphabetical order within the editor, we will list them here in order of complexity. This is done simply to aid in understanding for those new to the concept.

Distribution Baking

No matter which type of distribution you use, you will always see the option Can be Baked just beneath it. This determines whether the numeric results of the distribution can be baked out into a lookup table. Baking values out to a lookup table is far more efficient than having to calculate random values or curve interpolations on the fly. For this reason, this option is on by default.

Should you run into edge cases in which the lookup table results lose critical information, you may uncheck this option so that the system checks the actual value on each tick. Naturally, this is a bit less efficient, but in rare cases where you have a critical look to achieve and the lookup tables are failing, the option is worth considering.

CanBeBaked.png

Distribution Types

Most particle properties utilize the DistributionFloat and DistributionVector types to allow for the maximum flexibility when creating particle systems. There are a variety of options available when using distribution types which will be detailed in the following sections.

Note that the actual usage of the value will vary, depending on the property that is using it. For example, the Initial Size of a particle is determined at the time that a particle spawns. If the distribution type is set to a constant curve for the property, then the emitter time at the spawning will be used to retrieve the desired value from the curve.

Float Distributions

Float distributions are utilized when there is a scalar property that is artist-controlled. An example would be the lifetime of a particle, or the spawn rate of the emitter.

DistributionFloatConstant

This type is used to supply a value for the property that is constant. Below is a graphical representation of this value along a number line.

FloatConstant_Graph.png

  1. Constant float value which will not change.

When selected as the type, the following dialog will be provided for editing the value:

FloatConstant.png

DistributionFloatConstant Properties

Item

Description

Constant

This is a static and unchanging number for a given property.

DistributionFloatUniform

This distribution type is used to supply a range of values for the property. When evaluated, the value returned will be randomly set within the selected range.

FloatUniform_Graph.png

  1. Minimum value.

  2. Maximum value.

  3. Range from which a random value will be selected.

When selected as the type, the following dialog will be provided for editing the value:

FloatUniform.png

DistributionFloatUniform Properties

Item

Description

Min

The minimum value for the random calculation.

Max

The maximum value for the random calculation.

DistributionFloatConstantCurve

This type is used to supply a value for the property that is plotted on the graph editor over time. Whether the time is absolute (over the lifetime of the emitter) or relative (over the lifetime of the individual particle) is dependent on the module which utilizes the distribution.

floatConstantCurve_Graph.png

  1. Keyframe point.

  2. Interpolation curve. Final value will be pulled based on this curve's value at a given time.

  3. Tangent handles - These define how the curve flows into and out of a keyframe.

When selected as the type, the following dialog will be provided for editing the value:

FloatConstantCurve.png

Note that all of the fields can be hand-edited, but utilizing the curve editor window is the suggested approach for editing these values.

DistributionFloatConstantCurve Properties

Item

Description

Points

This is an array property that contains all the points in your curve. You may create points here using the AddPoint_button.png button. However, it will generally be easier and more intuitive to add points in the graph editor.

Point Properties

InVal

This is the location of the point along the graph's horizontal axis, generally calculated as time.

OutVal

This is the location of the point along the graph's vertical axis, generally calculated as property value.

ArriveTangent

Provides the angle of the incoming tangent for the point. Useful values range from about -150 to 150.

LeaveTangent

Provides the angle of the outgoing tangent for the point. Useful values range from about -150 to 150.

InterpMode

Allows the user to choose between a variety of interpolation modes for the curve. See the Curve Editor User Guide page for more details.

DistributionFloatUniformCurve

This type is used to supply a range of values for the property that is plotted on the graph editor over time. At each point in time, a random value is selected that exists within the min and max curves.

FloatUniformCurve_graph.png

  1. Min curve - This defines the minimum value as it changes over time.

  2. Max curve - This defines the maximum value as it changes over time.

  3. Resultant range - This is the area of the graph from which the final value is selected at each point in time.

When selected as the type, the following dialog will be provided for editing the value:

FloatUniformCurve.png

As with the ConstantCurve type, it is recommended that this distribution type be edited via the curve editor.

DistributionFloatUniformCurve Properties

Item

Description

Points

This is an array property that contains all the points in your curve. You may create points here using the AddPoint_button.png button. However, it will generally be easier and more intuitive to add points in the graph editor.

Point Properties

InVal

This is the location of the point along the graph's horizontal axis, generally calculated as time.

OutVal

This is the location of the point along the graph's vertical axis, generally calculated as property value. In the case of a Uniform Curve, this property will contain an X and Y value representing the Min and Max of the output, respectively.

ArriveTangent

Provides the angle of the incoming tangent for the points for both X and Y (min and max). Useful values range from about -150 to 150.

LeaveTangent

Provides the angle of the outgoing tangent for the points for both X and Y (min and max). Useful values range from about -150 to 150.

InterpMode

Allows the user to choose between a variety of interpolation modes for the curve. See the Curve Editor User Guide page for more details.

DistributionFloatParticleParam

This type is used to allow for simple game-code setting of parameters for emitters, so that they can be manipulated via code, Blueprints, or Matinee. It provides the ability to map input values from one range to another, allowing for tweaking of the parameter in "Cascade-space" without requiring game-play code to be updated. Once an established Input range is determined by the game-play coder, the artist is free to adjust the property through the Output mapping.

When selected as the type, the following dialog will be provided for editing the value:

FloatParticleParam.png

Input to Output is linearly remapped, so: MinInput of 0 with a MaxInput of 5, MinOutput of 0 with a MaxOutput of 100 means that if you pass 2 in as your input, your output will be 40.

This is very useful for setting simple 0-1 inputs that map to multiple outputs, since you can share particle parameter variables by name. For example, you could set up the SpawnRate to be driven by Particle Parameter Foo, and set the inputs from 0-1, and the outputs from 20-200, and also use Foo in the InitialSize with the same inputs but an output of 10-20.

In code, the programmer would write something like:

ParticleComponent->SetFloatParameter('MyParameter', CurrentParameter);

DistributionFloatParticleParameter Properties

Item

Description

Parameter Name

This is the name by which the parameter will be referenced in code or in Blueprint scripting.

Min Input

This is the minimum value that can be passed into the distribution, typically via game code.

Max Input

This is the maximum value that can be passed into the distribution, typically via game code.

Min Output

This is the minimum value that can be output into Cascade, as mapped from the range of inputs.

Max Output

This is the maximum value that can be output into Cascade, as mapped from the range of inputs.

Param Mode

This controls how the input values will be used. See the Param Mode Flag table below.

Constant

This provides a default value for the system in the absence of any inputs.

ParamMode Flag

Description

DPM_Normal

Leave the input value alone.

DPM_Abs

Use the absolute value of the input value before remapping.

DPM_Direct

Use the input value directly (no remapping).

Vector Distributions

Vector distributions are utilized when there is a vector-based property that is artist-controlled. An example would be the size or velocity of a particle.

DistributionVectorConstant

This type is used to supply a value for the property that is constant.

VectorConstant_Graph.png

  1. X-Axis value

  2. Y-Axis value

  3. Z-Axis value

When selected as the type, the following dialog will be provided for editing the value:

VectorConstant.png

The LockedAxes flag allows for the user to lock the values of one axis to that of another. The following flags are supported:

DistributionVectorConstant Properties

Item

Description

Constant

This is a static and unchanging number for a given property. In a vector value, this contains values for X, Y, and Z.

Locked Axes

This locks one of the 3 axes to another axis, simplifying the distribution. See the Locked Axes Flag table below.

Locked Axes Flag

Description

EDVLF_None

No axis is locked to another.

EDVLF_XY

The Y-axis is locked to the X-axis value.

EDVLF_XZ

The Z-axis is locked to the X-axis value.

EDVLF_YZ

The Z-axis is locked to the Y-axis value.

EDVLF_XYZ

The Y-and-Z-axes are locked to the X-axis value.

NOTE: When the lock flags are active, the values are NOT reflected in the property window setting. Ie, the Y value will not display the X contents when the LockedAxes flag is set to EDVLF_XY. Only when the value is retrieved from the distribution (in code) will the locked axes value be applied.

DistributionVectorUniform

This type is used to supply a range of values for the property. When evaluated, the value returned will be randomly set within the selected range.

VectorUniform_Graph.png

  1. X-Axis Min value

  2. X-Axis Max value

  3. X-Axis random range

  4. Y-Axis Min value

  5. Y-Axis Max value

  6. Y-Axis random range

  7. Z-Axis Min value

  8. Z-Axis Max value

  9. Z-Axis random range

When selected as the type, the following dialog will be provided for editing the value:

VectorUniform.png

DistributionVectorUniform Properties

Item

Description

Min

The minimum value for the random calculation. In the case of a Vector Uniform, this will contain values for X, Y, and Z.

Max

The maximum value for the random calculation. In the case of a Vector Uniform, this will contain values for X, Y, and Z.

Use Extremes

Indicates that the values for Min and Max should be used as well, rather than just the values between them.

Locked Axes Flag

Description

EDVLF_None

No axis is locked to another.

EDVLF_XY

The Y-axis is locked to the X-axis value.

EDVLF_XZ

The Z-axis is locked to the X-axis value.

EDVLF_YZ

The Z-axis is locked to the Y-axis value.

EDVLF_XYZ

The Y-and-Z-axes are locked to the X-axis value.

The Mirror Flags allow for mirroring the Min/Max values for each component of the value. The following flags are supported for mirroring:

MirrorFlags

Description

EDVMF_Same

Use the Max value for Min as well.

EDVMF_Different

Use each value as set.

EDVMF_Mirror

The Min value will be the inverse of the Max (Max * -1).

The 0, 1, and 2 immediately under the Mirror Flags property represent the X, Y, and Z axes, respectively.

DistributionVectorConstantCurve

This type is used to supply a value for the property that is plotted on the graph editor over time. Whether the time is absolute (over the lifetime of the emitter) or relative (over the lifetime of the individual particle) is dependent on the module which utilizes the distribution.

VectorConstantCurve_Graph.png

  1. X-Axis Curve Point 0

  2. X-Axis Curve Point 1

  3. X-Axis interpolation curve

  4. Y-Axis Curve Point 0

  5. Y-Axis Curve Point 1

  6. Y-Axis interpolation curve

  7. Z-Axis Curve Point 0

  8. Z-Axis Curve Point 1

  9. Z-Axis interpolation curve

When selected as the type, the following dialog will be provided for editing the value:

VectorConstantCurve.png

As with the FloatConstantCurve type, it is recommended that this distribution type be edited via the curve editor.

NOTE: When the LockedAxes flag is set to something other than EDVLF_None for a ConstantCurve distribution, the CurveEditor will not display the locked axis to avoid confusion. For example, if the flag is set to EDVLF_XY, the curve editor will contain only the X and Z curves.

DistributionFloatConstantCurve Properties

Item

Description

Points

This is an array property that contains all the points in your curve. You may create points here using the AddPoint_button.png button. However, it will generally be easier and more intuitive to add points in the graph editor.

Point Properties

InVal

This is the location of the point along the graph's horizontal axis, generally calculated as time.

OutVal

This is the location of the point along the graph's vertical axis, generally calculated as property value.

ArriveTangent

Provides the angle of the incoming tangent for the point. Useful values range from about -150 to 150.

LeaveTangent

Provides the angle of the outgoing tangent for the point. Useful values range from about -150 to 150.

InterpMode

Allows the user to choose between a variety of interpolation modes for the curve. See the Curve Editor User Guide page for more details.

Locked Axes Flag

Description

EDVLF_None

No axis is locked to another.

EDVLF_XY

The Y-axis is locked to the X-axis value.

EDVLF_XZ

The Z-axis is locked to the X-axis value.

EDVLF_YZ

The Z-axis is locked to the Y-axis value.

EDVLF_XYZ

The Y-and-Z-axes are locked to the X-axis value.

DistributionVectorUniformCurve

This type is used to supply a range of values for the property that is plotted on the graph editor over time. The final value will be chosen at random from between the Min and Max curves for each axis.

VectorUniformCurve_graph.png

  1. X-Axis Min curve

  2. X-Axis Max curve

  3. X-Axis random interpolated range

  4. Y-Axis Min curve

  5. Y-Axis Max curve

  6. Y-Axis random interpolated range

  7. Z-Axis Min curve

  8. Z-Axis Max curve

  9. Z-Axis random interpolated range

When selected as the type, the following dialog will be provided for editing the value:

VectorUniformCurve.png

DistributionVectorUniformCurve Properties

Item

Description

Points

This is an array property that contains all the points in your curve. You may create points here using the AddPoint_button.png button. However, it will generally be easier and more intuitive to add points in the graph editor.

Point Properties

InVal

This is the location of the point along the graph's horizontal axis, generally calculated as time.

OutVal

This is the location of the point along the graph's vertical axis, generally calculated as property value. In the case of a Vector Uniform Curve, this property will contain an V1 and V2 value representing the Min and Max of the output, respectively. Each of those values will contain values for the X, Y, and Z axes.

ArriveTangent

Provides the angle of the incoming tangent for the points for both V1 and V2 (min and max), which each contain values for X, Y, and Z. Useful values range from about -150 to 150. In the case of a Vector Uniform Curve, this property will contain an V1 and V2 value representing the Min and Max of the output, respectively. Each of those values will contain values for the X, Y, and Z axes.

LeaveTangent

Provides the angle of the outgoing tangent for the points for both X and Y (min and max). Useful values range from about -150 to 150. In the case of a Vector Uniform Curve, this property will contain an V1 and V2 value representing the Min and Max of the output, respectively. Each of those values will contain values for the X, Y, and Z axes.

InterpMode

Allows the user to choose between a variety of interpolation modes for the curve. See the Curve Editor User Guide page for more details.

Use Extremes

Indicates that the values for Min and Max should be used as well, rather than just the values between them.

Locked Axes Flag

Description

EDVLF_None

No axis is locked to another.

EDVLF_XY

The Y-axis is locked to the X-axis value.

EDVLF_XZ

The Z-axis is locked to the X-axis value.

EDVLF_YZ

The Z-axis is locked to the Y-axis value.

EDVLF_XYZ

The Y-and-Z-axes are locked to the X-axis value.

The Mirror Flags allow for mirroring the Min/Max values for each component of the value. The following flags are supported for mirroring:

MirrorFlags

Description

EDVMF_Same

Use the Max value for Min as well.

EDVMF_Different

Use each value as set.

EDVMF_Mirror

The Min value will be the inverse of the Max (Max * -1).

As with other curve types, it is recommended that this distribution type be edited via the curve editor.

DistributionVectorParticleParam

This type is the vector equivalent of the FloatParticleParam type discussed above. It allows a value to be manipulated via code, Blueprints, or Matinee.

When selected as the type, the following dialog will be provided for editing the value:

VectorParticleParam.png

DistributionFloatParticleParameter Properties

Item

Description

Parameter Name

This is the name by which the parameter will be referenced in code or in Blueprint scripting.

Min Input

This is the minimum value that can be passed into the distribution, typically via game code.

Max Input

This is the maximum value that can be passed into the distribution, typically via game code.

Min Output

This is the minimum value that can be output into Cascade, as mapped from the range of inputs.

Max Output

This is the maximum value that can be output into Cascade, as mapped from the range of inputs.

Param Mode

This controls how the input values will be used. See the Param Mode Flag table below.

Constant

This provides a default value for the system in the absence of any inputs.

Locked Axes Flag

Description

EDVLF_None

No axis is locked to another.

EDVLF_XY

The Y-axis is locked to the X-axis value.

EDVLF_XZ

The Z-axis is locked to the X-axis value.

EDVLF_YZ

The Z-axis is locked to the Y-axis value.

EDVLF_XYZ

The Y-and-Z-axes are locked to the X-axis value.

ParamMode Flag

Description

DPM_Normal

Leave the input value alone.

DPM_Abs

Use the absolute value of the input value before remapping.

DPM_Direct

Use the input value directly (no remapping).

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss