Particle properties for Particles and Particles2D nodes.
    public class ParticlesMaterial : Material

ParticlesMaterial defines particle properties and behavior. It is used in the process_material of Particles and Particles2D emitter nodes.

Some of this material’s properties are applied to each particle when emitted, while others can have a CurveTexture applied to vary values over the lifetime of the particle.

When a randomness ratio is applied to a property it is used to scale that property by a random amount. The random ratio is used to interpolate between 1.0 and a random number less than one, the result is multiplied by the property to obtain the randomized property. For example a random ratio of 0.4 would scale the original property between 0.4-1.0 of its original value.

Inheritance Chain

Constructors

    public ParticlesMaterial()

Properties

    public float Angle { get; set; }

Initial rotation applied to each particle, in degrees.

Only applied when FlagDisableZ or FlagRotateY are true or the SpatialMaterial being used to draw the particle is using [constant SpatialMaterial.BILLBOARD_PARTICLES].

    public Texture AngleCurve { get; set; }

Each particle’s rotation will be animated along this CurveTexture.

    public float AngleRandom { get; set; }

Rotation randomness ratio.

    public float AngularVelocity { get; set; }

Initial angular velocity applied to each particle. Sets the speed of rotation of the particle.

Only applied when FlagDisableZ or FlagRotateY are true or the SpatialMaterial being used to draw the particle is using [constant SpatialMaterial.BILLBOARD_PARTICLES].

    public Texture AngularVelocityCurve { get; set; }

Each particle’s angular velocity will vary along this CurveTexture.

    public float AngularVelocityRandom { get; set; }

Angular velocity randomness ratio.

    public float AnimOffset { get; set; }

Particle animation offset.

    public Texture AnimOffsetCurve { get; set; }

Each particle’s animation offset will vary along this CurveTexture.

    public float AnimOffsetRandom { get; set; }

Animation offset randomness ratio.

    public float AnimSpeed { get; set; }

Particle animation speed.

    public Texture AnimSpeedCurve { get; set; }

Each particle’s animation speed will vary along this CurveTexture.

    public float AnimSpeedRandom { get; set; }

Animation speed randomness ratio.

    public Color Color { get; set; }

Each particle’s initial color. If the Particles2D’s texture is defined, it will be multiplied by this color. To have particle display color in a SpatialMaterial make sure to set SpatialMaterial.VertexColorUseAsAlbedo to true.

    public Texture ColorRamp { get; set; }

Each particle’s color will vary along this GradientTexture.

    public float Damping { get; set; }

The rate at which particles lose velocity.

    public Texture DampingCurve { get; set; }

Damping will vary along this CurveTexture.

    public float DampingRandom { get; set; }

Damping randomness ratio.

    public Vector3 Direction { get; set; }

Unit vector specifying the particles’ emission direction.

    public Vector3 EmissionBoxExtents { get; set; }

The box’s extents if emission_shape is set to [constant EMISSION_SHAPE_BOX].

    public Texture EmissionColorTexture { get; set; }

Particle color will be modulated by color determined by sampling this texture at the same point as the EmissionPointTexture.

    public Texture EmissionNormalTexture { get; set; }

Particle velocity and rotation will be set by sampling this texture at the same point as the EmissionPointTexture. Used only in [constant EMISSION_SHAPE_DIRECTED_POINTS]. Can be created automatically from mesh or node by selecting “Create Emission Points from Mesh/Node” under the “Particles” tool in the toolbar.

    public int EmissionPointCount { get; set; }

The number of emission points if emission_shape is set to [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS].

    public Texture EmissionPointTexture { get; set; }

Particles will be emitted at positions determined by sampling this texture at a random position. Used with [constant EMISSION_SHAPE_POINTS] and [constant EMISSION_SHAPE_DIRECTED_POINTS]. Can be created automatically from mesh or node by selecting “Create Emission Points from Mesh/Node” under the “Particles” tool in the toolbar.

    public EmissionShapeEnum EmissionShape { get; set; }

Particles will be emitted inside this region. Use EMISSION_SHAPE_* constants for values.

    public float EmissionSphereRadius { get; set; }

The sphere’s radius if emission_shape is set to [constant EMISSION_SHAPE_SPHERE].

    public bool FlagAlignY { get; set; }

Align Y axis of particle with the direction of its velocity.

    public bool FlagDisableZ { get; set; }

If true, particles will not move on the z axis.

    public bool FlagRotateY { get; set; }

If true, particles rotate around Y axis by Angle.

    public float Flatness { get; set; }

Amount of Spread in Y/Z plane. A value of 1 restricts particles to X/Z plane.

    public Vector3 Gravity { get; set; }

Gravity applied to every particle.

    public float HueVariation { get; set; }

Initial hue variation applied to each particle.

    public Texture HueVariationCurve { get; set; }

Each particle’s hue will vary along this CurveTexture.

    public float HueVariationRandom { get; set; }

Hue variation randomness ratio.

    public float InitialVelocity { get; set; }

Initial velocity magnitude for each particle. Direction comes from Spread and the node’s orientation.

    public float InitialVelocityRandom { get; set; }

Initial velocity randomness ratio.

    public float LifetimeRandomness { get; set; }

Particle lifetime randomness ratio.

    public float LinearAccel { get; set; }

Linear acceleration applied to each particle in the direction of motion.

    public Texture LinearAccelCurve { get; set; }

Each particle’s linear acceleration will vary along this CurveTexture.

    public float LinearAccelRandom { get; set; }

Linear acceleration randomness ratio.

    public float OrbitVelocity { get; set; }

Orbital velocity applied to each particle. Makes the particles circle around origin. Specified in number of full rotations around origin per second.

Only available when FlagDisableZ is true.

    public Texture OrbitVelocityCurve { get; set; }

Each particle’s orbital velocity will vary along this CurveTexture.

    public float OrbitVelocityRandom { get; set; }

Orbital velocity randomness ratio.

    public float RadialAccel { get; set; }

Radial acceleration applied to each particle. Makes particle accelerate away from origin.

    public Texture RadialAccelCurve { get; set; }

Each particle’s radial acceleration will vary along this CurveTexture.

    public float RadialAccelRandom { get; set; }

Radial acceleration randomness ratio.

    public float Scale { get; set; }

Initial scale applied to each particle.

    public Texture ScaleCurve { get; set; }

Each particle’s scale will vary along this CurveTexture.

    public float ScaleRandom { get; set; }

Scale randomness ratio.

    public float Spread { get; set; }

Each particle’s initial direction range from +spread to -spread degrees. Applied to X/Z plane and Y/Z planes.

    public float TangentialAccel { get; set; }

Tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle’s velocity giving the particles a swirling motion.

    public Texture TangentialAccelCurve { get; set; }

Each particle’s tangential acceleration will vary along this CurveTexture.

    public float TangentialAccelRandom { get; set; }

Tangential acceleration randomness ratio.

    public GradientTexture TrailColorModifier { get; set; }

Trail particles’ color will vary along this GradientTexture.

    public int TrailDivisor { get; set; }

Emitter will emit amount divided by trail_divisor particles. The remaining particles will be used as trail(s).

    public CurveTexture TrailSizeModifier { get; set; }

Trail particles’ size will vary along this CurveTexture.

Methods

    [Obsolete("GetColor is deprecated. Use the Color property instead.")]
    public Color GetColor()

Getter for Color

    [Obsolete("GetColorRamp is deprecated. Use the ColorRamp property instead.")]
    public Texture GetColorRamp()

Getter for ColorRamp

    [Obsolete("GetDirection is deprecated. Use the Direction property instead.")]
    public Vector3 GetDirection()

Getter for Direction

    [Obsolete("GetEmissionBoxExtents is deprecated. Use the EmissionBoxExtents property instead.")]
    public Vector3 GetEmissionBoxExtents()

Getter for EmissionBoxExtents

    [Obsolete("GetEmissionColorTexture is deprecated. Use the EmissionColorTexture property instead.")]
    public Texture GetEmissionColorTexture()

Getter for EmissionColorTexture

    [Obsolete("GetEmissionNormalTexture is deprecated. Use the EmissionNormalTexture property instead.")]
    public Texture GetEmissionNormalTexture()

Getter for EmissionNormalTexture

    [Obsolete("GetEmissionPointCount is deprecated. Use the EmissionPointCount property instead.")]
    public int GetEmissionPointCount()

Getter for EmissionPointCount

    [Obsolete("GetEmissionPointTexture is deprecated. Use the EmissionPointTexture property instead.")]
    public Texture GetEmissionPointTexture()

Getter for EmissionPointTexture

    [Obsolete("GetEmissionShape is deprecated. Use the EmissionShape property instead.")]
    public EmissionShapeEnum GetEmissionShape()

Getter for EmissionShape

    [Obsolete("GetEmissionSphereRadius is deprecated. Use the EmissionSphereRadius property instead.")]
    public float GetEmissionSphereRadius()

Getter for EmissionSphereRadius

    [Obsolete("GetFlag is deprecated. Use the FlagDisableZ property instead.")]
    public bool GetFlag(Flags flag)

    [Obsolete("GetFlatness is deprecated. Use the Flatness property instead.")]
    public float GetFlatness()

Getter for Flatness

    [Obsolete("GetGravity is deprecated. Use the Gravity property instead.")]
    public Vector3 GetGravity()

Getter for Gravity

    [Obsolete("GetLifetimeRandomness is deprecated. Use the LifetimeRandomness property instead.")]
    public float GetLifetimeRandomness()

Getter for LifetimeRandomness

    [Obsolete("GetParam is deprecated. Use the AnimOffset property instead.")]
    public float GetParam(Parameter param)

    [Obsolete("GetParamRandomness is deprecated. Use the AnimOffsetRandom property instead.")]
    public float GetParamRandomness(Parameter param)

    [Obsolete("GetParamTexture is deprecated. Use the AnimOffsetCurve property instead.")]
    public Texture GetParamTexture(Parameter param)

    [Obsolete("GetSpread is deprecated. Use the Spread property instead.")]
    public float GetSpread()

Getter for Spread

    [Obsolete("GetTrailColorModifier is deprecated. Use the TrailColorModifier property instead.")]
    public GradientTexture GetTrailColorModifier()

Getter for TrailColorModifier

    [Obsolete("GetTrailDivisor is deprecated. Use the TrailDivisor property instead.")]
    public int GetTrailDivisor()

Getter for TrailDivisor

    [Obsolete("GetTrailSizeModifier is deprecated. Use the TrailSizeModifier property instead.")]
    public CurveTexture GetTrailSizeModifier()

Getter for TrailSizeModifier

    [Obsolete("SetColor is deprecated. Use the Color property instead.")]
    public void SetColor(Color color)

Setter for Color

    [Obsolete("SetColorRamp is deprecated. Use the ColorRamp property instead.")]
    public void SetColorRamp(Texture ramp)

Setter for ColorRamp

    [Obsolete("SetDirection is deprecated. Use the Direction property instead.")]
    public void SetDirection(Vector3 degrees)

Setter for Direction

    [Obsolete("SetEmissionBoxExtents is deprecated. Use the EmissionBoxExtents property instead.")]
    public void SetEmissionBoxExtents(Vector3 extents)

Setter for EmissionBoxExtents

    [Obsolete("SetEmissionColorTexture is deprecated. Use the EmissionColorTexture property instead.")]
    public void SetEmissionColorTexture(Texture texture)

Setter for EmissionColorTexture

    [Obsolete("SetEmissionNormalTexture is deprecated. Use the EmissionNormalTexture property instead.")]
    public void SetEmissionNormalTexture(Texture texture)

Setter for EmissionNormalTexture

    [Obsolete("SetEmissionPointCount is deprecated. Use the EmissionPointCount property instead.")]
    public void SetEmissionPointCount(int pointCount)

Setter for EmissionPointCount

    [Obsolete("SetEmissionPointTexture is deprecated. Use the EmissionPointTexture property instead.")]
    public void SetEmissionPointTexture(Texture texture)

Setter for EmissionPointTexture

    [Obsolete("SetEmissionShape is deprecated. Use the EmissionShape property instead.")]
    public void SetEmissionShape(EmissionShapeEnum shape)

Setter for EmissionShape

    [Obsolete("SetEmissionSphereRadius is deprecated. Use the EmissionSphereRadius property instead.")]
    public void SetEmissionSphereRadius(float radius)

Setter for EmissionSphereRadius

    [Obsolete("SetFlag is deprecated. Use the FlagDisableZ property instead.")]
    public void SetFlag(Flags flag, bool enable)

    [Obsolete("SetFlatness is deprecated. Use the Flatness property instead.")]
    public void SetFlatness(float amount)

Setter for Flatness

    [Obsolete("SetGravity is deprecated. Use the Gravity property instead.")]
    public void SetGravity(Vector3 accelVec)

Setter for Gravity

    [Obsolete("SetLifetimeRandomness is deprecated. Use the LifetimeRandomness property instead.")]
    public void SetLifetimeRandomness(float randomness)

Setter for LifetimeRandomness

    [Obsolete("SetParam is deprecated. Use the AnimOffset property instead.")]
    public void SetParam(Parameter param, float value)

    [Obsolete("SetParamRandomness is deprecated. Use the AnimOffsetRandom property instead.")]
    public void SetParamRandomness(Parameter param, float randomness)

    [Obsolete("SetParamTexture is deprecated. Use the AnimOffsetCurve property instead.")]
    public void SetParamTexture(Parameter param, Texture texture)

    [Obsolete("SetSpread is deprecated. Use the Spread property instead.")]
    public void SetSpread(float degrees)

Setter for Spread

    [Obsolete("SetTrailColorModifier is deprecated. Use the TrailColorModifier property instead.")]
    public void SetTrailColorModifier(GradientTexture texture)

Setter for TrailColorModifier

    [Obsolete("SetTrailDivisor is deprecated. Use the TrailDivisor property instead.")]
    public void SetTrailDivisor(int divisor)

Setter for TrailDivisor

    [Obsolete("SetTrailSizeModifier is deprecated. Use the TrailSizeModifier property instead.")]
    public void SetTrailSizeModifier(CurveTexture texture)

Setter for TrailSizeModifier

Inner Types

EmissionShapeEnum

Name Value Description
Point 0 All particles will be emitted from a single point.
Sphere 1 Particles will be emitted in the volume of a sphere.
Box 2 Particles will be emitted in the volume of a box.
Points 3 Particles will be emitted at a position determined by sampling a random point on the [member emission_point_texture]. Particle color will be modulated by [member emission_color_texture].
DirectedPoints 4 Particles will be emitted at a position determined by sampling a random point on the [member emission_point_texture]. Particle velocity and rotation will be set based on [member emission_normal_texture]. Particle color will be modulated by [member emission_color_texture].

Flags

Name Value Description
AlignYToVelocity 0 Use with [method set_flag] to set [member flag_align_y].
RotateY 1 Use with [method set_flag] to set [member flag_rotate_y].
DisableZ 2 Use with [method set_flag] to set [member flag_disable_z].
Max 3 Represents the size of the [enum Flags] enum.

Parameter

Name Value Description
InitialLinearVelocity 0 Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set initial velocity properties.
AngularVelocity 1 Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set angular velocity properties.
OrbitVelocity 2 Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set orbital velocity properties.
LinearAccel 3 Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set linear acceleration properties.
RadialAccel 4 Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set radial acceleration properties.
TangentialAccel 5 Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set tangential acceleration properties.
Damping 6 Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set damping properties.
Angle 7 Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set angle properties.
Scale 8 Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set scale properties.
HueVariation 9 Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set hue variation properties.
AnimSpeed 10 Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set animation speed properties.
AnimOffset 11 Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set animation offset properties.
Max 12 Represents the size of the [enum Parameter] enum.
Tags: