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

float

angle

0.0

Texture

angle_curve

float

angle_random

0.0

float

angular_velocity

0.0

Texture

angular_velocity_curve

float

angular_velocity_random

0.0

float

anim_offset

0.0

Texture

anim_offset_curve

float

anim_offset_random

0.0

float

anim_speed

0.0

Texture

anim_speed_curve

float

anim_speed_random

0.0

Color

color

Color( 1, 1, 1, 1 )

Texture

color_initial_ramp

Texture

color_ramp

float

damping

0.0

Texture

damping_curve

float

damping_random

0.0

Vector3

direction

Vector3( 1, 0, 0 )

Vector3

emission_box_extents

Texture

emission_color_texture

Texture

emission_normal_texture

int

emission_point_count

Texture

emission_point_texture

Vector3

emission_ring_axis

float

emission_ring_height

float

emission_ring_inner_radius

float

emission_ring_radius

EmissionShape

emission_shape

0

float

emission_sphere_radius

bool

flag_align_y

false

bool

flag_disable_z

false

bool

flag_rotate_y

false

float

flatness

0.0

Vector3

gravity

Vector3( 0, -9.8, 0 )

float

hue_variation

0.0

Texture

hue_variation_curve

float

hue_variation_random

0.0

float

initial_velocity

0.0

float

initial_velocity_random

0.0

float

lifetime_randomness

0.0

float

linear_accel

0.0

Texture

linear_accel_curve

float

linear_accel_random

0.0

float

orbit_velocity

Texture

orbit_velocity_curve

float

orbit_velocity_random

float

radial_accel

0.0

Texture

radial_accel_curve

float

radial_accel_random

0.0

float

scale

1.0

Texture

scale_curve

float

scale_random

0.0

float

spread

45.0

float

tangential_accel

0.0

Texture

tangential_accel_curve

float

tangential_accel_random

0.0

GradientTexture

trail_color_modifier

int

trail_divisor

1

CurveTexture

trail_size_modifier

Métodos

bool

get_flag ( Flags flag ) const

float

get_param ( Parameter param ) const

float

get_param_randomness ( Parameter param ) const

Texture

get_param_texture ( Parameter param ) const

void

set_flag ( Flags flag, bool enable )

void

set_param ( Parameter param, float value )

void

set_param_randomness ( Parameter param, float randomness )

void

set_param_texture ( Parameter param, Texture texture )

Enumeraciones

enum Parameter:


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

Default

0.0

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.


Setter

set_param_texture(value)

Getter

get_param_texture()

La rotación de cada partícula será animada a lo largo de esta CurveTexture.


Default

0.0

Setter

set_param_randomness(value)

Getter

get_param_randomness()

Ratio de aleatoriedad de la rotación.


Default

0.0

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.


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

0.0

Setter

set_param_randomness(value)

Getter

get_param_randomness()

Relación de aleatoriedad de la velocidad angular.


Default

0.0

Setter

set_param(value)

Getter

get_param()

Desplazamiento de la animación de partículas.


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

0.0

Setter

set_param_randomness(value)

Getter

get_param_randomness()

La animación desplaza la proporción de aleatoriedad.


Default

0.0

Setter

set_param(value)

Getter

get_param()

Velocidad de animación de partículas.


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

0.0

Setter

set_param_randomness(value)

Getter

get_param_randomness()

Ratio de aleatoriedad de la velocidad de la animación.


Default

Color( 1, 1, 1, 1 )

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.


Setter

set_color_initial_ramp(value)

Getter

get_color_initial_ramp()

Each particle's initial color will vary along this GradientTexture (multiplied with color).


Setter

set_color_ramp(value)

Getter

get_color_ramp()

Each particle's color will vary along this GradientTexture over its lifetime (multiplied with color).


Default

0.0

Setter

set_param(value)

Getter

get_param()

La velocidad a la que las partículas pierden velocidad.


Setter

set_param_texture(value)

Getter

get_param_texture()

La amortiguación variará a lo largo de esta CurveTexture.


Default

0.0

Setter

set_param_randomness(value)

Getter

get_param_randomness()

Amortiguando la proporción de aleatoriedad.


Default

Vector3( 1, 0, 0 )

Setter

set_direction(value)

Getter

get_direction()

Vector unitario que especifica la dirección de emisión de las partículas.


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.


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.


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.


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.


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.


Default

0

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.


Default

false

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

false

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

false

Setter

set_flag(value)

Getter

get_flag()

Si true, las partículas giran alrededor del eje Y por angle.


Default

0.0

Setter

set_flatness(value)

Getter

get_flatness()

Amount of spread along the Y axis.


Default

Vector3( 0, -9.8, 0 )

Setter

set_gravity(value)

Getter

get_gravity()

La gravedad aplicada a cada partícula.


Default

0.0

Setter

set_param(value)

Getter

get_param()

Variación de tono inicial aplicada a cada partícula.


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

0.0

Setter

set_param_randomness(value)

Getter

get_param_randomness()

Relación de aleatoriedad de la variación del tono.


Default

0.0

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

0.0

Setter

set_param_randomness(value)

Getter

get_param_randomness()

Ratio de aleatoriedad de la velocidad inicial.


  • float lifetime_randomness

Default

0.0

Setter

set_lifetime_randomness(value)

Getter

get_lifetime_randomness()

El ratio de aleatoriedad del tiempo de vida de las partículas.


Default

0.0

Setter

set_param(value)

Getter

get_param()

Aceleración lineal aplicada a cada partícula en la dirección del movimiento.


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

0.0

Setter

set_param_randomness(value)

Getter

get_param_randomness()

Ratio de aleatoriedad de aceleración lineal.


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.


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.


Default

0.0

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.


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

0.0

Setter

set_param_randomness(value)

Getter

get_param_randomness()

Ratio de aleatoriedad de la aceleración radial.


Default

1.0

Setter

set_param(value)

Getter

get_param()

Escala inicial aplicada a cada partícula.


Setter

set_param_texture(value)

Getter

get_param_texture()

La escala de cada partícula variará a lo largo de esta CurveTexture.


Default

0.0

Setter

set_param_randomness(value)

Getter

get_param_randomness()

Ratio de la aleatoriedad de la escala.


Default

45.0

Setter

set_spread(value)

Getter

get_spread()

La dirección inicial de cada partícula va desde +spread hasta -spread grados.


Default

0.0

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.


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

0.0

Setter

set_param_randomness(value)

Getter

get_param_randomness()

Ratio de aleatoriedad de la aceleración tangencial.


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

1

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).


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.


Sets the Texture for the specified Parameter.