Struct ParticlesMaterial
Particle properties for Particles
and Particles2D
nodes.
struct ParticlesMaterial
;
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.
Properties
Name | Type | Description |
---|---|---|
angle [get, set]
|
double | Initial rotation applied to each particle, in degrees.
Only applied when flagDisableZ or flagRotateY are true or the SpatialMaterial being used to draw the particle is using constant SpatialMaterial .
|
angleCurve [get, set]
|
Texture | Each particle's rotation will be animated along this CurveTexture .
|
angleRandom [get, set]
|
double | Rotation randomness ratio. |
angularVelocity [get, set]
|
double | Initial angular velocity applied to each particle. Sets the speed of rotation of the particle.
Only applied when flagDisableZ or flagRotateY are true or the SpatialMaterial being used to draw the particle is using constant SpatialMaterial .
|
angularVelocityCurve [get, set]
|
Texture | Each particle's angular velocity will vary along this CurveTexture .
|
angularVelocityRandom [get, set]
|
double | Angular velocity randomness ratio. |
animOffset [get, set]
|
double | Particle animation offset. |
animOffsetCurve [get, set]
|
Texture | Each particle's animation offset will vary along this CurveTexture .
|
animOffsetRandom [get, set]
|
double | Animation offset randomness ratio. |
animSpeed [get, set]
|
double | Particle animation speed. |
animSpeedCurve [get, set]
|
Texture | Each particle's animation speed will vary along this CurveTexture .
|
animSpeedRandom [get, set]
|
double | Animation speed randomness ratio. |
color [get, set]
|
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 to true .
|
colorRamp [get, set]
|
Texture | Each particle's color will vary along this GradientTexture .
|
damping [get, set]
|
double | The rate at which particles lose velocity. |
dampingCurve [get, set]
|
Texture | Damping will vary along this CurveTexture .
|
dampingRandom [get, set]
|
double | Damping randomness ratio. |
direction [get, set]
|
Vector3 | Unit vector specifying the particles' emission direction. |
emissionBoxExtents [get, set]
|
Vector3 | The box's extents if emission_shape is set to constant EMISSION_SHAPE_BOX .
|
emissionColorTexture [get, set]
|
Texture | Particle color will be modulated by color determined by sampling this texture at the same point as the emissionPointTexture .
|
emissionNormalTexture [get, set]
|
Texture | Particle velocity and rotation will be set by sampling this texture at the same point as the emissionPointTexture . 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.
|
emissionPointCount [get, set]
|
long | The number of emission points if emission_shape is set to constant EMISSION_SHAPE_POINTS or constant EMISSION_SHAPE_DIRECTED_POINTS .
|
emissionPointTexture [get, set]
|
Texture | 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.
|
emissionShape [get, set]
|
ParticlesMaterial | Particles will be emitted inside this region. Use emissionshape constants for values.
|
emissionSphereRadius [get, set]
|
double | The sphere's radius if emission_shape is set to constant EMISSION_SHAPE_SPHERE .
|
flagAlignY [get, set]
|
bool | Align Y axis of particle with the direction of its velocity. |
flagDisableZ [get, set]
|
bool | If true , particles will not move on the z axis.
|
flagRotateY [get, set]
|
bool | If true , particles rotate around Y axis by angle .
|
flatness [get, set]
|
double | Amount of spread in Y/Z plane. A value of 1 restricts particles to X/Z plane.
|
gravity [get, set]
|
Vector3 | Gravity applied to every particle. |
hueVariation [get, set]
|
double | Initial hue variation applied to each particle. |
hueVariationCurve [get, set]
|
Texture | Each particle's hue will vary along this CurveTexture .
|
hueVariationRandom [get, set]
|
double | Hue variation randomness ratio. |
initialVelocity [get, set]
|
double | Initial velocity magnitude for each particle. Direction comes from spread and the node's orientation.
|
initialVelocityRandom [get, set]
|
double | Initial velocity randomness ratio. |
lifetimeRandomness [get, set]
|
double | Particle lifetime randomness ratio. |
linearAccel [get, set]
|
double | Linear acceleration applied to each particle in the direction of motion. |
linearAccelCurve [get, set]
|
Texture | Each particle's linear acceleration will vary along this CurveTexture .
|
linearAccelRandom [get, set]
|
double | Linear acceleration randomness ratio. |
orbitVelocity [get, set]
|
double | Orbital velocity applied to each particle. Makes the particles circle around origin. Specified in number of full rotations around origin per second.
Only available when flagDisableZ is true .
|
orbitVelocityCurve [get, set]
|
Texture | Each particle's orbital velocity will vary along this CurveTexture .
|
orbitVelocityRandom [get, set]
|
double | Orbital velocity randomness ratio. |
radialAccel [get, set]
|
double | Radial acceleration applied to each particle. Makes particle accelerate away from origin. |
radialAccelCurve [get, set]
|
Texture | Each particle's radial acceleration will vary along this CurveTexture .
|
radialAccelRandom [get, set]
|
double | Radial acceleration randomness ratio. |
scale [get, set]
|
double | Initial scale applied to each particle. |
scaleCurve [get, set]
|
Texture | Each particle's scale will vary along this CurveTexture .
|
scaleRandom [get, set]
|
double | Scale randomness ratio. |
spread [get, set]
|
double | Each particle's initial direction range from +spread to -spread degrees. Applied to X/Z plane and Y/Z planes.
|
tangentialAccel [get, set]
|
double | Tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion. |
tangentialAccelCurve [get, set]
|
Texture | Each particle's tangential acceleration will vary along this CurveTexture .
|
tangentialAccelRandom [get, set]
|
double | Tangential acceleration randomness ratio. |
trailColorModifier [get, set]
|
GradientTexture | Trail particles' color will vary along this GradientTexture .
|
trailDivisor [get, set]
|
long | Emitter will emit amount divided by trail_divisor particles. The remaining particles will be used as trail(s).
|
trailSizeModifier [get, set]
|
CurveTexture | Trail particles' size will vary along this CurveTexture .
|
Methods
Enums
Name | Description |
---|---|
Constants
|
|
EmissionShape
|
|
Flags
|
|
Parameter
|