Holds a particle configuration for [GPUParticles2D] or [GPUParticles3D] nodes.
[ParticleProcessMaterial] defines particle properties and behavior. It is used in the [code]process_material[/code] of the [GPUParticles2D] and [GPUParticles3D] nodes. Some of this material's properties are applied to each particle when emitted, while others can have a [CurveTexture] or a [GradientTexture1D] applied to vary numerical or color values over the lifetime of the particle.
Returns the minimum and maximum values of the given [param param] as a vector. The [code]x[/code] component of the returned vector corresponds to minimum and the [code]y[/code] component corresponds to maximum.
Returns the maximum value range for the given parameter.
Returns the minimum value range for the given parameter.
Returns the [Texture2D] used by the specified parameter.
Returns [code]true[/code] if the specified particle flag is enabled.
Sets the minimum and maximum values of the given [param param]. The [code]x[/code] component of the argument vector corresponds to minimum and the [code]y[/code] component corresponds to maximum.
Sets the maximum value range for the given parameter.
Sets the minimum value range for the given parameter.
Sets the [Texture2D] for the specified [enum Parameter].
Sets the [param particle_flag] to [param enable].
- The alpha value of each particle's color will be multiplied by this [CurveTexture] over its lifetime. [b]Note:[/b] [member alpha_curve] multiplies the particle mesh's vertex colors. To have a visible effect on a [BaseMaterial3D], [member BaseMaterial3D.vertex_color_use_as_albedo] [i]must[/i] be [code]true[/code]. For a [ShaderMaterial], [code]ALBEDO *= COLOR.rgb;[/code] must be inserted in the shader's [code]fragment()[/code] function. Otherwise, [member alpha_curve] will have no visible effect.
- Each particle's rotation will be animated along this [CurveTexture].
- Maximum initial rotation applied to each particle, in degrees. Only applied when [member particle_flag_disable_z] or [member particle_flag_rotate_y] are [code]true[/code] or the [BaseMaterial3D] being used to draw the particle is using [constant BaseMaterial3D.BILLBOARD_PARTICLES].
- Minimum equivalent of [member angle_max].
- Each particle's angular velocity (rotation speed) will vary along this [CurveTexture] over its lifetime.
- Maximum initial angular velocity (rotation speed) applied to each particle in [i]degrees[/i] per second. Only applied when [member particle_flag_disable_z] or [member particle_flag_rotate_y] are [code]true[/code] or the [BaseMaterial3D] being used to draw the particle is using [constant BaseMaterial3D.BILLBOARD_PARTICLES].
- Minimum equivalent of [member angular_velocity_max].
- Each particle's animation offset will vary along this [CurveTexture].
- Maximum animation offset that corresponds to frame index in the texture. [code]0[/code] is the first frame, [code]1[/code] is the last one. See [member CanvasItemMaterial.particles_animation].
- Minimum equivalent of [member anim_offset_max].
- Each particle's animation speed will vary along this [CurveTexture].
- Maximum particle animation speed. Animation speed of [code]1[/code] means that the particles will make full [code]0[/code] to [code]1[/code] offset cycle during lifetime, [code]2[/code] means [code]2[/code] cycles etc. With animation speed greater than [code]1[/code], remember to enable [member CanvasItemMaterial.particles_anim_loop] property if you want the animation to repeat.
- Minimum equivalent of [member anim_speed_max].
- If [code]true[/code], interaction with particle attractors is enabled. In 3D, attraction only occurs within the area defined by the [GPUParticles3D] node's [member GPUParticles3D.visibility_aabb].
- The particles' bounciness. Values range from [code]0[/code] (no bounce) to [code]1[/code] (full bounciness). Only effective if [member collision_mode] is [constant COLLISION_RIGID].
- The particles' friction. Values range from [code]0[/code] (frictionless) to [code]1[/code] (maximum friction). Only effective if [member collision_mode] is [constant COLLISION_RIGID].
- The particles' collision mode. [b]Note:[/b] 3D Particles can only collide with [GPUParticlesCollision3D] nodes, not [PhysicsBody3D] nodes. To make particles collide with various objects, you can add [GPUParticlesCollision3D] nodes as children of [PhysicsBody3D] nodes. In 3D, collisions only occur within the area defined by the [GPUParticles3D] node's [member GPUParticles3D.visibility_aabb]. [b]Note:[/b] 2D Particles can only collide with [LightOccluder2D] nodes, not [PhysicsBody2D] nodes.
- If [code]true[/code], [member GPUParticles3D.collision_base_size] is multiplied by the particle's effective scale (see [member scale_min], [member scale_max], [member scale_curve], and [member scale_over_velocity_curve]).
- Each particle's initial color. If the [GPUParticles2D]'s [code]texture[/code] is defined, it will be multiplied by this color. [b]Note:[/b] [member color] multiplies the particle mesh's vertex colors. To have a visible effect on a [BaseMaterial3D], [member BaseMaterial3D.vertex_color_use_as_albedo] [i]must[/i] be [code]true[/code]. For a [ShaderMaterial], [code]ALBEDO *= COLOR.rgb;[/code] must be inserted in the shader's [code]fragment()[/code] function. Otherwise, [member color] will have no visible effect.
- Each particle's initial color will vary along this [GradientTexture1D] (multiplied with [member color]). [b]Note:[/b] [member color_initial_ramp] multiplies the particle mesh's vertex colors. To have a visible effect on a [BaseMaterial3D], [member BaseMaterial3D.vertex_color_use_as_albedo] [i]must[/i] be [code]true[/code]. For a [ShaderMaterial], [code]ALBEDO *= COLOR.rgb;[/code] must be inserted in the shader's [code]fragment()[/code] function. Otherwise, [member color_initial_ramp] will have no visible effect.
- Each particle's color will vary along this [GradientTexture1D] over its lifetime (multiplied with [member color]). [b]Note:[/b] [member color_ramp] multiplies the particle mesh's vertex colors. To have a visible effect on a [BaseMaterial3D], [member BaseMaterial3D.vertex_color_use_as_albedo] [i]must[/i] be [code]true[/code]. For a [ShaderMaterial], [code]ALBEDO *= COLOR.rgb;[/code] must be inserted in the shader's [code]fragment()[/code] function. Otherwise, [member color_ramp] will have no visible effect.
- Damping will vary along this [CurveTexture].
- The maximum rate at which particles lose velocity. For example value of [code]100[/code] means that the particle will go from [code]100[/code] velocity to [code]0[/code] in [code]1[/code] second.
- Minimum equivalent of [member damping_max].
- Unit vector specifying the particles' emission direction.
- A curve that specifies the velocity along each of the axes of the particle system along its lifetime. [b]Note:[/b] Animated velocities will not be affected by damping, use [member velocity_limit_curve] instead.
- Maximum directional velocity value, which is multiplied by [member directional_velocity_curve]. [b]Note:[/b] Animated velocities will not be affected by damping, use [member velocity_limit_curve] instead.
- Minimum directional velocity value, which is multiplied by [member directional_velocity_curve]. [b]Note:[/b] Animated velocities will not be affected by damping, use [member velocity_limit_curve] instead.
- The box's extents if [member emission_shape] is set to [constant EMISSION_SHAPE_BOX]. [b]Note:[/b] [member emission_box_extents] starts from the center point and applies the X, Y, and Z values in both directions. The size is twice the area of the extents.
- Particle color will be modulated by color determined by sampling this texture at the same point as the [member emission_point_texture]. [b]Note:[/b] [member emission_color_texture] multiplies the particle mesh's vertex colors. To have a visible effect on a [BaseMaterial3D], [member BaseMaterial3D.vertex_color_use_as_albedo] [i]must[/i] be [code]true[/code]. For a [ShaderMaterial], [code]ALBEDO *= COLOR.rgb;[/code] must be inserted in the shader's [code]fragment()[/code] function. Otherwise, [member emission_color_texture] will have no visible effect.
- Each particle's color will be multiplied by this [CurveTexture] over its lifetime. [b]Note:[/b] [member emission_curve] multiplies the particle mesh's vertex colors. To have a visible effect on a [BaseMaterial3D], [member BaseMaterial3D.vertex_color_use_as_albedo] [i]must[/i] be [code]true[/code]. For a [ShaderMaterial], [code]ALBEDO *= COLOR.rgb;[/code] must be inserted in the shader's [code]fragment()[/code] function. Otherwise, [member emission_curve] will have no visible effect.
- Particle velocity and rotation will be set by sampling this texture at the same point as the [member emission_point_texture]. 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.
- The number of emission points if [member emission_shape] is set to [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS].
- 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.
- The axis of the ring when using the emitter [constant EMISSION_SHAPE_RING].
- The angle of the cone when using the emitter [constant EMISSION_SHAPE_RING]. The default angle of 90 degrees results in a ring, while an angle of 0 degrees results in a cone. Intermediate values will result in a ring where one end is larger than the other. [b]Note:[/b] Depending on [member emission_ring_height], the angle may be clamped if the ring's end is reached to form a perfect cone.
- The height of the ring when using the emitter [constant EMISSION_SHAPE_RING].
- The inner radius of the ring when using the emitter [constant EMISSION_SHAPE_RING].
- The radius of the ring when using the emitter [constant EMISSION_SHAPE_RING].
- Particles will be emitted inside this region.
- The offset for the [member emission_shape], in local space.
- The scale of the [member emission_shape], in local space.
- The sphere's radius if [member emission_shape] is set to [constant EMISSION_SHAPE_SPHERE].
- Amount of [member spread] along the Y axis.
- Gravity applied to every particle.
- Each particle's hue will vary along this [CurveTexture].
- Maximum initial hue variation applied to each particle. It will shift the particle color's hue.
- Minimum equivalent of [member hue_variation_max].
- Percentage of the velocity of the respective [GPUParticles2D] or [GPUParticles3D] inherited by each particle when spawning.
- Maximum initial velocity magnitude for each particle. Direction comes from [member direction] and [member spread].
- Minimum equivalent of [member initial_velocity_max].
- Particle lifetime randomness ratio. The equation for the lifetime of a particle is [code]lifetime * (1.0 - randf() * lifetime_randomness)[/code]. For example, a [member lifetime_randomness] of [code]0.4[/code] scales the lifetime between [code]0.6[/code] to [code]1.0[/code] of its original value.
- Each particle's linear acceleration will vary along this [CurveTexture].
- Maximum linear acceleration applied to each particle in the direction of motion.
- Minimum equivalent of [member linear_accel_max].
- Each particle's orbital velocity will vary along this [CurveTexture]. [b]Note:[/b] For 3D orbital velocity, use a [CurveXYZTexture]. [b]Note:[/b] Animated velocities will not be affected by damping, use [member velocity_limit_curve] instead.
- Maximum orbital velocity applied to each particle. Makes the particles circle around origin. Specified in number of full rotations around origin per second. [b]Note:[/b] Animated velocities will not be affected by damping, use [member velocity_limit_curve] instead.
- Minimum equivalent of [member orbit_velocity_max]. [b]Note:[/b] Animated velocities will not be affected by damping, use [member velocity_limit_curve] instead.
- Align Y axis of particle with the direction of its velocity.
- Changes the behavior of the damping properties from a linear deceleration to a deceleration based on speed percentage.
- If [code]true[/code], particles will not move on the z axis.
- If [code]true[/code], particles rotate around Y axis by [member angle_min].
- Each particle's radial acceleration will vary along this [CurveTexture].
- Maximum radial acceleration applied to each particle. Makes particle accelerate away from the origin or towards it if negative.
- Minimum equivalent of [member radial_accel_max].
- A [CurveTexture] that defines the velocity over the particle's lifetime away (or toward) the [member velocity_pivot]. [b]Note:[/b] Animated velocities will not be affected by damping, use [member velocity_limit_curve] instead.
- Maximum radial velocity applied to each particle. Makes particles move away from the [member velocity_pivot], or toward it if negative. [b]Note:[/b] Animated velocities will not be affected by damping, use [member velocity_limit_curve] instead.
- Minimum radial velocity applied to each particle. Makes particles move away from the [member velocity_pivot], or toward it if negative. [b]Note:[/b] Animated velocities will not be affected by damping, use [member velocity_limit_curve] instead.
- Each particle's scale will vary along this [CurveTexture] over its lifetime. If a [CurveXYZTexture] is supplied instead, the scale will be separated per-axis.
- Maximum initial scale applied to each particle.
- Minimum equivalent of [member scale_max].
- Either a [CurveTexture] or a [CurveXYZTexture] that scales each particle based on its velocity.
- Maximum velocity value reference for [member scale_over_velocity_curve]. [member scale_over_velocity_curve] will be interpolated between [member scale_over_velocity_min] and [member scale_over_velocity_max].
- Minimum velocity value reference for [member scale_over_velocity_curve]. [member scale_over_velocity_curve] will be interpolated between [member scale_over_velocity_min] and [member scale_over_velocity_max].
- Each particle's initial direction range from [code]+spread[/code] to [code]-spread[/code] degrees.
- The amount of particles to spawn from the subemitter node when a collision occurs. When combined with [constant COLLISION_HIDE_ON_CONTACT] on the main particles material, this can be used to achieve effects such as raindrops hitting the ground. [b]Note:[/b] This value shouldn't exceed [member GPUParticles2D.amount] or [member GPUParticles3D.amount] defined on the [i]subemitter node[/i] (not the main node), relative to the subemitter's particle lifetime. If the number of particles is exceeded, no new particles will spawn from the subemitter until enough particles have expired.
- The amount of particles to spawn from the subemitter node when the particle expires. [b]Note:[/b] This value shouldn't exceed [member GPUParticles2D.amount] or [member GPUParticles3D.amount] defined on the [i]subemitter node[/i] (not the main node), relative to the subemitter's particle lifetime. If the number of particles is exceeded, no new particles will spawn from the subemitter until enough particles have expired.
- The amount of particles to spawn from the subemitter node when the particle spawns. [b]Note:[/b] This value shouldn't exceed [member GPUParticles2D.amount] or [member GPUParticles3D.amount] defined on the [i]subemitter node[/i] (not the main node), relative to the subemitter's particle lifetime. If the number of particles is exceeded, no new particles will spawn from the subemitter until enough particles have expired.
- The frequency at which particles should be emitted from the subemitter node. One particle will be spawned every [member sub_emitter_frequency] seconds. [b]Note:[/b] This value shouldn't exceed [member GPUParticles2D.amount] or [member GPUParticles3D.amount] defined on the [i]subemitter node[/i] (not the main node), relative to the subemitter's particle lifetime. If the number of particles is exceeded, no new particles will spawn from the subemitter until enough particles have expired.
- If [code]true[/code], the subemitter inherits the parent particle's velocity when it spawns.
- The particle subemitter mode (see [member GPUParticles2D.sub_emitter] and [member GPUParticles3D.sub_emitter]).
- Each particle's tangential acceleration will vary along this [CurveTexture].
- Maximum tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion.
- Minimum equivalent of [member tangential_accel_max].
- If [code]true[/code], enables turbulence for the particle system. Turbulence can be used to vary particle movement according to its position (based on a 3D noise pattern). In 3D, [GPUParticlesAttractorVectorField3D] with [NoiseTexture3D] can be used as an alternative to turbulence that works in world space and with multiple particle systems reacting in the same way. [b]Note:[/b] Enabling turbulence has a high performance cost on the GPU. Only enable turbulence on a few particle systems at once at most, and consider disabling it when targeting mobile/web platforms.
- Maximum turbulence influence on each particle. The actual amount of turbulence influence on each particle is calculated as a random value between [member turbulence_influence_min] and [member turbulence_influence_max] and multiplied by the amount of turbulence influence from [member turbulence_influence_over_life].
- Minimum turbulence influence on each particle. The actual amount of turbulence influence on each particle is calculated as a random value between [member turbulence_influence_min] and [member turbulence_influence_max] and multiplied by the amount of turbulence influence from [member turbulence_influence_over_life].
- Each particle's amount of turbulence will be influenced along this [CurveTexture] over its life time.
- Maximum displacement of each particle's spawn position by the turbulence. The actual amount of displacement will be a factor of the underlying turbulence multiplied by a random value between [member turbulence_initial_displacement_min] and [member turbulence_initial_displacement_max].
- Minimum displacement of each particle's spawn position by the turbulence. The actual amount of displacement will be a factor of the underlying turbulence multiplied by a random value between [member turbulence_initial_displacement_min] and [member turbulence_initial_displacement_max].
- This value controls the overall scale/frequency of the turbulence noise pattern. A small scale will result in smaller features with more detail while a high scale will result in smoother noise with larger features.
- A scrolling velocity for the turbulence field. This sets a directional trend for the pattern to move in over time. The default value of [code]Vector3(0, 0, 0)[/code] turns off the scrolling.
- The in-place rate of change of the turbulence field. This defines how quickly the noise pattern varies over time. A value of 0.0 will result in a fixed pattern.
- The turbulence noise strength. Increasing this will result in a stronger, more contrasting, flow pattern.
- A [CurveTexture] that defines the maximum velocity of a particle during its lifetime.
- A pivot point used to calculate radial and orbital velocity of particles.
Emitted when this material's emission shape is changed in any way. This includes changes to [member emission_shape], [member emission_shape_scale], or [member emission_sphere_radius], and any other property that affects the emission shape's offset, size, scale, or orientation. [b]Note:[/b] This signal is only emitted inside the editor for performance reasons.
Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set initial velocity properties.
Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set angular velocity properties.
Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set orbital velocity properties.
Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set linear acceleration properties.
Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set radial acceleration properties.
Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set tangential acceleration properties.
Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set damping properties.
Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set angle properties.
Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set scale properties.
Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set hue variation properties.
Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set animation speed properties.
Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set animation offset properties.
Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set radial velocity properties.
Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set directional velocity properties.
Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set scale over velocity properties.
Represents the size of the [enum Parameter] enum.
Use with [method set_particle_flag] to set [member particle_flag_align_y].
Use with [method set_particle_flag] to set [member particle_flag_rotate_y].
Use with [method set_particle_flag] to set [member particle_flag_disable_z].
Represents the size of the [enum ParticleFlags] enum.
All particles will be emitted from a single point.
Particles will be emitted in the volume of a sphere.
Particles will be emitted on the surface of a sphere.
Particles will be emitted in the volume of a box.
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].
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].
Particles will be emitted in a ring or cylinder.
Represents the size of the [enum EmissionShape] enum.
Use with [method set_param_min] and [method set_param_max] to set the turbulence minimum und maximum influence on each particles velocity.
Use with [method set_param_min] and [method set_param_max] to set the turbulence minimum and maximum displacement of the particles spawn position.
Use with [method set_param_texture] to set the turbulence influence over the particles life time.
Represents the size of the [enum SubEmitterMode] enum.
No collision for particles. Particles will go through [GPUParticlesCollision3D] nodes.
[RigidBody3D]-style collision for particles using [GPUParticlesCollision3D] nodes.
Hide particles instantly when colliding with a [GPUParticlesCollision3D] node. This can be combined with a subemitter that uses the [constant COLLISION_RIGID] collision mode to "replace" the parent particle with the subemitter on impact.
Represents the size of the [enum CollisionMode] enum.