ParticlesMaterial¶
Inherits: Material < Resource < Reference < Object
Particle properties for Particles and Particles2D nodes.
Descripción¶
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.
Propiedades¶
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
Métodos¶
get_param_randomness ( Parameter param ) const |
|
get_param_texture ( Parameter param ) const |
|
void |
|
void |
|
void |
set_param_randomness ( Parameter param, float randomness ) |
void |
set_param_texture ( Parameter param, Texture texture ) |
Enumeraciones¶
enum Parameter:
PARAM_INITIAL_LINEAR_VELOCITY = 0 --- Utilízalo con set_param, set_param_randomness, y set_param_texture para establecer las propiedades iniciales de la velocidad.
PARAM_ANGULAR_VELOCITY = 1 --- Usar con set_param, set_param_randomness, y set_param_texture para establecer las propiedades de la velocidad angular.
PARAM_ORBIT_VELOCITY = 2 --- Usar con set_param, set_param_randomness, y set_param_texture para establecer las propiedades de la velocidad orbital.
PARAM_LINEAR_ACCEL = 3 --- Utilízalo con set_param, set_param_randomness, y set_param_texture para establecer las propiedades de la aceleración lineal.
PARAM_RADIAL_ACCEL = 4 --- Usar con set_param, set_param_randomness, y set_param_texture para establecer las propiedades de la aceleración radial.
PARAM_TANGENTIAL_ACCEL = 5 --- Usar con set_param, set_param_randomness, y set_param_texture para establecer las propiedades de la aceleración tangencial.
PARAM_DAMPING = 6 --- Usar con set_param, set_param_randomness, y set_param_texture para establecer las propiedades de amortiguación.
PARAM_ANGLE = 7 --- Utilízalo con set_param, set_param_randomness, y set_param_texture para establecer las propiedades de los ángulos.
PARAM_SCALE = 8 --- Utilízalo con set_param, set_param_randomness, y set_param_texture para establecer las propiedades de la escala.
PARAM_HUE_VARIATION = 9 --- Utilízalo con set_param, set_param_randomness, y set_param_texture para establecer las propiedades de la variación del tono.
PARAM_ANIM_SPEED = 10 --- Utilízalo con set_param, set_param_randomness, y set_param_texture para establecer las propiedades de velocidad de la animación.
PARAM_ANIM_OFFSET = 11 --- Utilízalo con set_param, set_param_randomness, y set_param_texture para establecer las propiedades de desplazamiento de la animación.
PARAM_MAX = 12 --- Representa el tamaño del enum Parameter.
enum Flags:
FLAG_ALIGN_Y_TO_VELOCITY = 0 --- Usar con set_flag para establecer flag_align_y.
FLAG_ROTATE_Y = 1 --- Usar con set_flag para establecer flag_rotate_y.
FLAG_DISABLE_Z = 2 --- Usar con set_flag para establecer flag_disable_z.
FLAG_MAX = 3 --- Representa el tamaño del enum Flags.
enum EmissionShape:
EMISSION_SHAPE_POINT = 0 --- Todas las partículas serán emitidas desde un único punto.
EMISSION_SHAPE_SPHERE = 1 --- Las partículas se emitirán en el volumen de una esfera.
EMISSION_SHAPE_BOX = 2 --- Se emitirán partículas en el volumen de una caja.
EMISSION_SHAPE_POINTS = 3 --- Las partículas se emitirán en una posición determinada por el muestreo de un punto aleatorio en la emission_point_texture. El color de las partículas será modulado por emission_color_texture.
EMISSION_SHAPE_DIRECTED_POINTS = 4 --- Las partículas se emitirán en una posición determinada por el muestreo de un punto aleatorio en la emission_point_texture. La velocidad y la rotación de las partículas se fijarán en base a emission_normal_texture. El color de las partículas será modulado por emission_color_texture.
EMISSION_SHAPE_RING = 5 --- Particles will be emitted in a ring or cylinder.
EMISSION_SHAPE_MAX = 6 --- Representa el tamaño del enum EmissionShape.
Descripciones de Propiedades¶
float angle
Default |
|
Setter |
set_param(value) |
Getter |
get_param() |
Initial rotation applied to each particle, in degrees.
Note: Only applied when flag_disable_z or flag_rotate_y are true
or the SpatialMaterial being used to draw the particle is using SpatialMaterial.BILLBOARD_PARTICLES.
Texture angle_curve
Setter |
set_param_texture(value) |
Getter |
get_param_texture() |
La rotación de cada partícula será animada a lo largo de esta CurveTexture.
float angle_random
Default |
|
Setter |
set_param_randomness(value) |
Getter |
get_param_randomness() |
Ratio de aleatoriedad de la rotación.
float angular_velocity
Default |
|
Setter |
set_param(value) |
Getter |
get_param() |
Initial angular velocity applied to each particle in degrees per second. Sets the speed of rotation of the particle.
Note: Only applied when flag_disable_z or flag_rotate_y are true
or the SpatialMaterial being used to draw the particle is using SpatialMaterial.BILLBOARD_PARTICLES.
Texture angular_velocity_curve
Setter |
set_param_texture(value) |
Getter |
get_param_texture() |
La velocidad angular de cada partícula variará a lo largo de esta CurveTexture.
float angular_velocity_random
Default |
|
Setter |
set_param_randomness(value) |
Getter |
get_param_randomness() |
Relación de aleatoriedad de la velocidad angular.
float anim_offset
Default |
|
Setter |
set_param(value) |
Getter |
get_param() |
Desplazamiento de la animación de partículas.
Texture anim_offset_curve
Setter |
set_param_texture(value) |
Getter |
get_param_texture() |
El desplazamiento de la animación de cada partícula variará a lo largo de esta CurveTexture.
float anim_offset_random
Default |
|
Setter |
set_param_randomness(value) |
Getter |
get_param_randomness() |
La animación desplaza la proporción de aleatoriedad.
float anim_speed
Default |
|
Setter |
set_param(value) |
Getter |
get_param() |
Velocidad de animación de partículas.
Texture anim_speed_curve
Setter |
set_param_texture(value) |
Getter |
get_param_texture() |
La velocidad de animación de cada partícula variará a lo largo de esta CurveTexture.
float anim_speed_random
Default |
|
Setter |
set_param_randomness(value) |
Getter |
get_param_randomness() |
Ratio de aleatoriedad de la velocidad de la animación.
Color color
Default |
|
Setter |
set_color(value) |
Getter |
get_color() |
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.vertex_color_use_as_albedo to true
.
Texture color_initial_ramp
Setter |
set_color_initial_ramp(value) |
Getter |
get_color_initial_ramp() |
Each particle's initial color will vary along this GradientTexture (multiplied with color).
Texture color_ramp
Setter |
set_color_ramp(value) |
Getter |
get_color_ramp() |
Each particle's color will vary along this GradientTexture over its lifetime (multiplied with color).
float damping
Default |
|
Setter |
set_param(value) |
Getter |
get_param() |
La velocidad a la que las partículas pierden velocidad.
Texture damping_curve
Setter |
set_param_texture(value) |
Getter |
get_param_texture() |
La amortiguación variará a lo largo de esta CurveTexture.
float damping_random
Default |
|
Setter |
set_param_randomness(value) |
Getter |
get_param_randomness() |
Amortiguando la proporción de aleatoriedad.
Vector3 direction
Default |
|
Setter |
set_direction(value) |
Getter |
get_direction() |
Vector unitario que especifica la dirección de emisión de las partículas.
Vector3 emission_box_extents
Setter |
set_emission_box_extents(value) |
Getter |
get_emission_box_extents() |
La extensión de la caja si emission_shape
se fija en EMISSION_SHAPE_BOX.
Texture emission_color_texture
Setter |
set_emission_color_texture(value) |
Getter |
get_emission_color_texture() |
El color de las partículas será modulado por el color determinado por el muestreo de esta textura en el mismo punto que la emission_point_texture.
Texture emission_normal_texture
Setter |
set_emission_normal_texture(value) |
Getter |
get_emission_normal_texture() |
La velocidad y la rotación de las partículas se fijarán mediante el muestreo de esta textura en el mismo punto que la emission_point_texture. Se utiliza sólo en EMISSION_SHAPE_DIRECTED_POINTS. Se puede crear automáticamente a partir de la malla o del nodo seleccionando "Crear puntos de emisión a partir de la malla o del nodo" en la herramienta "Partículas" de la barra de herramientas.
int emission_point_count
Setter |
set_emission_point_count(value) |
Getter |
get_emission_point_count() |
El número de puntos de emisión si emission_shape
se fija en EMISSION_SHAPE_POINTS o EMISSION_SHAPE_DIRECTED_POINTS.
Texture emission_point_texture
Setter |
set_emission_point_texture(value) |
Getter |
get_emission_point_texture() |
Las partículas se emitirán en posiciones determinadas por el muestreo de esta textura en una posición aleatoria. Se utiliza con EMISSION_SHAPE_POINTS y EMISSION_SHAPE_DIRECTED_POINTS. Se puede crear automáticamente a partir de la malla o del nodo seleccionando "Crear puntos de emisión a partir de la malla o del nodo" en la herramienta "Partículas" de la barra de herramientas.
Vector3 emission_ring_axis
Setter |
set_emission_ring_axis(value) |
Getter |
get_emission_ring_axis() |
The axis of the ring when using the emitter EMISSION_SHAPE_RING.
float emission_ring_height
Setter |
set_emission_ring_height(value) |
Getter |
get_emission_ring_height() |
The height of the ring when using the emitter EMISSION_SHAPE_RING.
float emission_ring_inner_radius
Setter |
set_emission_ring_inner_radius(value) |
Getter |
get_emission_ring_inner_radius() |
The inner radius of the ring when using the emitter EMISSION_SHAPE_RING.
float emission_ring_radius
Setter |
set_emission_ring_radius(value) |
Getter |
get_emission_ring_radius() |
The radius of the ring when using the emitter EMISSION_SHAPE_RING.
EmissionShape emission_shape
Default |
|
Setter |
set_emission_shape(value) |
Getter |
get_emission_shape() |
Se emitirán partículas dentro de esta región. Use las constantes EmissionShape para los valores.
float emission_sphere_radius
Setter |
set_emission_sphere_radius(value) |
Getter |
get_emission_sphere_radius() |
El radio de la esfera si emission_shape
se fija en EMISSION_SHAPE_SPHERE.
bool flag_align_y
Default |
|
Setter |
set_flag(value) |
Getter |
get_flag() |
Alinea el eje Y de la partícula con la dirección de su velocidad.
bool flag_disable_z
Default |
|
Setter |
set_flag(value) |
Getter |
get_flag() |
Si true
, las partículas no se moverán en el eje z.
bool flag_rotate_y
Default |
|
Setter |
set_flag(value) |
Getter |
get_flag() |
Si true
, las partículas giran alrededor del eje Y por angle.
float flatness
Default |
|
Setter |
set_flatness(value) |
Getter |
get_flatness() |
Amount of spread along the Y axis.
Vector3 gravity
Default |
|
Setter |
set_gravity(value) |
Getter |
get_gravity() |
La gravedad aplicada a cada partícula.
float hue_variation
Default |
|
Setter |
set_param(value) |
Getter |
get_param() |
Variación de tono inicial aplicada a cada partícula.
Texture hue_variation_curve
Setter |
set_param_texture(value) |
Getter |
get_param_texture() |
El tono de cada partícula variará a lo largo de esta CurveTexture.
float hue_variation_random
Default |
|
Setter |
set_param_randomness(value) |
Getter |
get_param_randomness() |
Relación de aleatoriedad de la variación del tono.
float initial_velocity
Default |
|
Setter |
set_param(value) |
Getter |
get_param() |
La magnitud de la velocidad inicial de cada partícula. La dirección viene de spread y la orientación del nodo.
float initial_velocity_random
Default |
|
Setter |
set_param_randomness(value) |
Getter |
get_param_randomness() |
Ratio de aleatoriedad de la velocidad inicial.
float lifetime_randomness
Default |
|
Setter |
set_lifetime_randomness(value) |
Getter |
get_lifetime_randomness() |
El ratio de aleatoriedad del tiempo de vida de las partículas.
float linear_accel
Default |
|
Setter |
set_param(value) |
Getter |
get_param() |
Aceleración lineal aplicada a cada partícula en la dirección del movimiento.
Texture linear_accel_curve
Setter |
set_param_texture(value) |
Getter |
get_param_texture() |
La aceleración lineal de cada partícula variará a lo largo de esta CurveTexture.
float linear_accel_random
Default |
|
Setter |
set_param_randomness(value) |
Getter |
get_param_randomness() |
Ratio de aleatoriedad de aceleración lineal.
float orbit_velocity
Setter |
set_param(value) |
Getter |
get_param() |
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
Setter |
set_param_texture(value) |
Getter |
get_param_texture() |
La velocidad orbital de cada partícula variará a lo largo de esta CurveTexture.
float orbit_velocity_random
Setter |
set_param_randomness(value) |
Getter |
get_param_randomness() |
Ratio de aleatoriedad de la velocidad orbital.
float radial_accel
Default |
|
Setter |
set_param(value) |
Getter |
get_param() |
Aceleración radial aplicada a cada partícula. Hace que la partícula se acelere lejos de su origen.
Texture radial_accel_curve
Setter |
set_param_texture(value) |
Getter |
get_param_texture() |
La aceleración radial de cada partícula variará a lo largo de esta CurveTexture.
float radial_accel_random
Default |
|
Setter |
set_param_randomness(value) |
Getter |
get_param_randomness() |
Ratio de aleatoriedad de la aceleración radial.
float scale
Default |
|
Setter |
set_param(value) |
Getter |
get_param() |
Escala inicial aplicada a cada partícula.
Texture scale_curve
Setter |
set_param_texture(value) |
Getter |
get_param_texture() |
La escala de cada partícula variará a lo largo de esta CurveTexture.
float scale_random
Default |
|
Setter |
set_param_randomness(value) |
Getter |
get_param_randomness() |
Ratio de la aleatoriedad de la escala.
float spread
Default |
|
Setter |
set_spread(value) |
Getter |
get_spread() |
La dirección inicial de cada partícula va desde +spread
hasta -spread
grados.
float tangential_accel
Default |
|
Setter |
set_param(value) |
Getter |
get_param() |
Aceleración tangencial aplicada a cada partícula. La aceleración tangencial es perpendicular a la velocidad de la partícula, lo que le da a las partículas un movimiento giratorio.
Texture tangential_accel_curve
Setter |
set_param_texture(value) |
Getter |
get_param_texture() |
La aceleración tangencial de cada partícula variará a lo largo de esta CurveTexture.
float tangential_accel_random
Default |
|
Setter |
set_param_randomness(value) |
Getter |
get_param_randomness() |
Ratio de aleatoriedad de la aceleración tangencial.
GradientTexture trail_color_modifier
Setter |
set_trail_color_modifier(value) |
Getter |
get_trail_color_modifier() |
El color de las partículas de rastro variará a lo largo de esta GradientTexture.
int trail_divisor
Default |
|
Setter |
set_trail_divisor(value) |
Getter |
get_trail_divisor() |
El emisor emitirá amount
dividido por trail_divisor
partículas. Las partículas restantes se utilizarán como rastro(s).
CurveTexture trail_size_modifier
Setter |
set_trail_size_modifier(value) |
Getter |
get_trail_size_modifier() |
El tamaño de las partículas del rastro variará a lo largo de esta CurveTexture.
Descripciones de Métodos¶
Devuelve true
si la bandera especificada está activada.
Devuelve el valor del parámetro especificado.
Devuelve el índice de aleatoriedad asociado al parámetro especificado.
Returns the Texture used by the specified parameter.
Si true
, activa la bandera especificada. Véase Flags para las opciones.
Establece el Parameter especificado.
Establece el índice de aleatoriedad para el Parameter especificado.