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.

Inheritance Chain

Constructors

    public ParticlesMaterial()

Properties

    public float Angle { get; set; }

Initial rotation applied to each particle.

    public Texture AngleCurve { get; set; }

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

    public float AngleRandom { get; set; }

Rotation randomness ratio. Default value: 0.

    public float AngularVelocity { get; set; }

Initial angular velocity applied to each particle.

    public Texture AngularVelocityCurve { get; set; }

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

    public float AngularVelocityRandom { get; set; }

Angular velocity randomness ratio. Default value: 0.

    public bool AnimLoop { get; set; }

If true animation will loop. Default value: false.

    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. Default value: 0.

    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. Default value: 0.

    public Color Color { get; set; }

Each particle’s initial color. If the Particle2D’s texture is defined, it will be multiplied by this color.

    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. Default value: 0.

    public Vector3 EmissionBoxExtents { get; set; }

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

    public Texture EmissionColorTexture { get; set; }

    public Texture EmissionNormalTexture { get; set; }

    public int EmissionPointCount { get; set; }

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

    public Texture EmissionPointTexture { get; set; }

    public EmissionShapeEnum EmissionShape { get; set; }

Particles will be emitted inside this region. Use EMISSION_SHAPE_* constants for values. Default value: EMISSION_SHAPE_POINT.

    public float EmissionSphereRadius { get; set; }

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

    public bool FlagAlignY { get; set; }

    public bool FlagDisableZ { get; set; }

If true particles will not move on the z axis. Default value: true for Particles2D, false for Particles.

    public bool FlagRotateY { get; set; }

    public float Flatness { get; set; }

    public Vector3 Gravity { get; set; }

Gravity applied to every particle. Default value: (0, 98, 0).

    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. Default value: 0.

    public float InitialVelocity { get; set; }

Initial velocity for each particle.

    public float InitialVelocityRandom { get; set; }

Initial velocity randomness ratio. Default value: 0.

    public float LinearAccel { get; set; }

Linear acceleration applied to each particle.

    public Texture LinearAccelCurve { get; set; }

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

    public float LinearAccelRandom { get; set; }

Linear acceleration randomness ratio. Default value: 0.

    public float OrbitVelocity { get; set; }

Orbital velocity applied to each particle.

    public Texture OrbitVelocityCurve { get; set; }

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

    public float OrbitVelocityRandom { get; set; }

Orbital velocity randomness ratio. Default value: 0.

    public float RadialAccel { get; set; }

Radial acceleration applied to each particle.

    public Texture RadialAccelCurve { get; set; }

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

    public float RadialAccelRandom { get; set; }

Radial acceleration randomness ratio. Default value: 0.

    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. Default value: 0.

    public float Spread { get; set; }

Each particle’s initial direction range from +spread to -spread degrees. Default value: 45.

    public float TangentialAccel { get; set; }

Tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle’s velocity.

    public Texture TangentialAccelCurve { get; set; }

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

    public float TangentialAccelRandom { get; set; }

Tangential acceleration randomness ratio. Default value: 0.

    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

    public Color GetColor()

Getter for Color

    public Texture GetColorRamp()

Getter for ColorRamp

    public Vector3 GetEmissionBoxExtents()

Getter for EmissionBoxExtents

    public Texture GetEmissionColorTexture()

Getter for EmissionColorTexture

    public Texture GetEmissionNormalTexture()

Getter for EmissionNormalTexture

    public int GetEmissionPointCount()

Getter for EmissionPointCount

    public Texture GetEmissionPointTexture()

Getter for EmissionPointTexture

    public EmissionShapeEnum GetEmissionShape()

Getter for EmissionShape

    public float GetEmissionSphereRadius()

Getter for EmissionSphereRadius

    public bool GetFlag(Flags flag)

    public float GetFlatness()

Getter for Flatness

    public Vector3 GetGravity()

Getter for Gravity

    public float GetParam(Parameter param)

    public float GetParamRandomness(Parameter param)

    public Texture GetParamTexture(Parameter param)

    public float GetSpread()

Getter for Spread

    public GradientTexture GetTrailColorModifier()

Getter for TrailColorModifier

    public int GetTrailDivisor()

Getter for TrailDivisor

    public CurveTexture GetTrailSizeModifier()

Getter for TrailSizeModifier

    public void SetColor(Color color)

Setter for Color

    public void SetColorRamp(Texture ramp)

Setter for ColorRamp

    public void SetEmissionBoxExtents(Vector3 extents)

Setter for EmissionBoxExtents

    public void SetEmissionColorTexture(Texture texture)

Setter for EmissionColorTexture

    public void SetEmissionNormalTexture(Texture texture)

Setter for EmissionNormalTexture

    public void SetEmissionPointCount(int pointCount)

Setter for EmissionPointCount

    public void SetEmissionPointTexture(Texture texture)

Setter for EmissionPointTexture

    public void SetEmissionShape(EmissionShapeEnum shape)

Setter for EmissionShape

    public void SetEmissionSphereRadius(float radius)

Setter for EmissionSphereRadius

    public void SetFlag(Flags flag, bool enable)

    public void SetFlatness(float amount)

Setter for Flatness

    public void SetGravity(Vector3 accelVec)

Setter for Gravity

    public void SetParam(Parameter param, float value)

    public void SetParamRandomness(Parameter param, float randomness)

    public void SetParamTexture(Parameter param, Texture texture)

    public void SetSpread(float degrees)

Setter for Spread

    public void SetTrailColorModifier(GradientTexture texture)

Setter for TrailColorModifier

    public void SetTrailDivisor(int divisor)

Setter for TrailDivisor

    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  
DirectedPoints 4  

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]
Max 4  

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  
Tags: