ParticlesMaterial
Inherits: Material < Resource < Reference < Object Particles and Particles2D nodes.
Description
process_material of Particles and Particles2D emitter nodes.
CurveTexture applied to vary values over the lifetime of the particle.
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.
Properties
Methods
Enumerations
Parameter:
- PARAM_INITIAL_LINEAR_VELOCITY = 0 —- Use with set_param, set_param_randomness, and set_param_texture to set initial velocity properties.
- PARAM_ANGULAR_VELOCITY = 1 —- Use with set_param, set_param_randomness, and set_param_texture to set angular velocity properties.
- PARAM_ORBIT_VELOCITY = 2 —- Use with set_param, set_param_randomness, and set_param_texture to set orbital velocity properties.
- PARAM_LINEAR_ACCEL = 3 —- Use with set_param, set_param_randomness, and set_param_texture to set linear acceleration properties.
- PARAM_RADIAL_ACCEL = 4 —- Use with set_param, set_param_randomness, and set_param_texture to set radial acceleration properties.
- PARAM_TANGENTIAL_ACCEL = 5 —- Use with set_param, set_param_randomness, and set_param_texture to set tangential acceleration properties.
- PARAM_DAMPING = 6 —- Use with set_param, set_param_randomness, and set_param_texture to set damping properties.
- PARAM_ANGLE = 7 —- Use with set_param, set_param_randomness, and set_param_texture to set angle properties.
- PARAM_SCALE = 8 —- Use with set_param, set_param_randomness, and set_param_texture to set scale properties.
- PARAM_HUE_VARIATION = 9 —- Use with set_param, set_param_randomness, and set_param_texture to set hue variation properties.
- PARAM_ANIM_SPEED = 10 —- Use with set_param, set_param_randomness, and set_param_texture to set animation speed properties.
- PARAM_ANIM_OFFSET = 11 —- Use with set_param, set_param_randomness, and set_param_texture to set animation offset properties.
- PARAM_MAX = 12 —- Represents the size of the Parameter enum.
Flags:
- FLAG_ALIGN_Y_TO_VELOCITY = 0 —- Use with set_flag to set flag_align_y.
- FLAG_ROTATE_Y = 1 —- Use with set_flag to set flag_rotate_y.
- FLAG_DISABLE_Z = 2 —- Use with set_flag to set flag_disable_z.
- FLAG_MAX = 3 —- Represents the size of the Flags enum.
EmissionShape:
- EMISSION_SHAPE_POINT = 0 —- All particles will be emitted from a single point.
- EMISSION_SHAPE_SPHERE = 1 —- Particles will be emitted in the volume of a sphere.
- EMISSION_SHAPE_BOX = 2 —- Particles will be emitted in the volume of a box.
- EMISSION_SHAPE_POINTS = 3 —- Particles will be emitted at a position determined by sampling a random point on the emission_point_texture. Particle color will be modulated by emission_color_texture.
- EMISSION_SHAPE_DIRECTED_POINTS = 4 —- Particles will be emitted at a position determined by sampling a random point on the emission_point_texture. Particle velocity and rotation will be set based on emission_normal_texture. Particle color will be modulated by emission_color_texture.
- EMISSION_SHAPE_RING = 5 —- Particles will be emitted in a ring or cylinder.
- EMISSION_SHAPE_MAX = 6 —- Represents the size of the EmissionShape enum.
Property Descriptions
- float angle
Initial rotation applied to each particle, in degrees.
Note: Only applied when flag_disable_z or flag_rotate_y are
trueor the SpatialMaterial being used to draw the particle is using SpatialMaterial.BILLBOARD_PARTICLES.
- Texture angle_curve CurveTexture.
- float angle_random Rotation randomness ratio.
- float angular_velocity
degrees per second. Sets the speed of rotation of the particle.
Note: Only applied when flag_disable_z or flag_rotate_y are
trueor the SpatialMaterial being used to draw the particle is using SpatialMaterial.BILLBOARD_PARTICLES.
- Texture angular_velocity_curve CurveTexture.
- float angular_velocity_random Angular velocity randomness ratio.
- float anim_offset Particle animation offset.
- Texture anim_offset_curve CurveTexture.
- float anim_offset_random Animation offset randomness ratio.
- float anim_speed Particle animation speed.
- Texture anim_speed_curve CurveTexture.
- float anim_speed_random Animation speed randomness ratio.
- Color color
Particles2D‘s
textureis defined, it will be multiplied by this color. To have particle display color in a SpatialMaterial make sure to set SpatialMaterial.vertex_color_use_as_albedo totrue.
- Texture color_initial_ramp GradientTexture (multiplied with color).
- Texture color_ramp GradientTexture over its lifetime (multiplied with color).
- float damping The rate at which particles lose velocity.
- Texture damping_curve CurveTexture.
- float damping_random Damping randomness ratio.
- Vector3 direction Unit vector specifying the particles’ emission direction.
- Vector3 emission_box_extents
emission_shapeis set to EMISSION_SHAPE_BOX.
- Texture emission_color_texture emission_point_texture.
- Texture emission_normal_texture emission_point_texture. Used only in 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.
- int emission_point_count
emission_shapeis set to EMISSION_SHAPE_POINTS or EMISSION_SHAPE_DIRECTED_POINTS.
- Texture emission_point_texture EMISSION_SHAPE_POINTS and 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.
- Vector3 emission_ring_axis EMISSION_SHAPE_RING.
- float emission_ring_height EMISSION_SHAPE_RING.
- float emission_ring_inner_radius EMISSION_SHAPE_RING.
- float emission_ring_radius EMISSION_SHAPE_RING.
- EmissionShape emission_shape EmissionShape constants for values.
- float emission_sphere_radius
emission_shapeis set to EMISSION_SHAPE_SPHERE.
- bool flag_align_y Align Y axis of particle with the direction of its velocity.
- bool flag_disable_z
true, particles will not move on the z axis.
- bool flag_rotate_y
true, particles rotate around Y axis by angle.
- float flatness spread along the Y axis.
- Vector3 gravity Gravity applied to every particle.
- float hue_variation Initial hue variation applied to each particle.
- Texture hue_variation_curve CurveTexture.
- float hue_variation_random Hue variation randomness ratio.
- float initial_velocity spread and the node’s orientation.
- float initial_velocity_random Initial velocity randomness ratio.
- float lifetime_randomness Particle lifetime randomness ratio.
- float linear_accel Linear acceleration applied to each particle in the direction of motion.
- Texture linear_accel_curve CurveTexture.
- float linear_accel_random Linear acceleration randomness ratio.
- float orbit_velocity
Orbital velocity applied to each particle. Makes the particles circle around origin. Specified in number of full rotations around origin per second.
Note: Only available when flag_disable_z is
true.
- Texture orbit_velocity_curve CurveTexture.
- float orbit_velocity_random Orbital velocity randomness ratio.
- float radial_accel Radial acceleration applied to each particle. Makes particle accelerate away from origin.
- Texture radial_accel_curve CurveTexture.
- float radial_accel_random Radial acceleration randomness ratio.
- float scale Initial scale applied to each particle.
- Texture scale_curve CurveTexture.
- float scale_random Scale randomness ratio.
- float spread
+spreadto-spreaddegrees.
- float tangential_accel Tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle’s velocity giving the particles a swirling motion.
- Texture tangential_accel_curve CurveTexture.
- float tangential_accel_random Tangential acceleration randomness ratio.
- GradientTexture trail_color_modifier GradientTexture.
- int trail_divisor
amountdivided bytrail_divisorparticles. The remaining particles will be used as trail(s).
- CurveTexture trail_size_modifier
CurveTexture.
Method Descriptions
- bool get_flag ( Flags flag ) const
trueif the specified flag is enabled.
- float get_param ( Parameter param ) const Returns the value of the specified parameter.
- float get_param_randomness ( Parameter param ) const Returns the randomness ratio associated with the specified parameter.
- Texture get_param_texture ( Parameter param ) const Texture used by the specified parameter.
- set_flag ( Flags flag, bool enable )
true, enables the specified flag. See Flags for options.
- set_param ( Parameter param, float value ) Parameter.
- set_param_randomness ( Parameter param, float randomness ) Parameter.
- set_param_texture ( Parameter param, Texture texture ) Texture for the specified Parameter.
