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

NameTypeDescription
angle[get, set] doubleInitial 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.BILLBOARD_PARTICLES.
angleCurve[get, set] TextureEach particle's rotation will be animated along this CurveTexture.
angleRandom[get, set] doubleRotation randomness ratio.
angularVelocity[get, set] doubleInitial 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.BILLBOARD_PARTICLES.
angularVelocityCurve[get, set] TextureEach particle's angular velocity will vary along this CurveTexture.
angularVelocityRandom[get, set] doubleAngular velocity randomness ratio.
animOffset[get, set] doubleParticle animation offset.
animOffsetCurve[get, set] TextureEach particle's animation offset will vary along this CurveTexture.
animOffsetRandom[get, set] doubleAnimation offset randomness ratio.
animSpeed[get, set] doubleParticle animation speed.
animSpeedCurve[get, set] TextureEach particle's animation speed will vary along this CurveTexture.
animSpeedRandom[get, set] doubleAnimation speed randomness ratio.
color[get, set] ColorEach 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.vertexColorUseAsAlbedo to true.
colorRamp[get, set] TextureEach particle's color will vary along this GradientTexture.
damping[get, set] doubleThe rate at which particles lose velocity.
dampingCurve[get, set] TextureDamping will vary along this CurveTexture.
dampingRandom[get, set] doubleDamping randomness ratio.
direction[get, set] Vector3Unit vector specifying the particles' emission direction.
emissionBoxExtents[get, set] Vector3The box's extents if emission_shape is set to constant EMISSION_SHAPE_BOX.
emissionColorTexture[get, set] TextureParticle color will be modulated by color determined by sampling this texture at the same point as the emissionPointTexture.
emissionNormalTexture[get, set] TextureParticle 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] longThe number of emission points if emission_shape is set to constant EMISSION_SHAPE_POINTS or constant EMISSION_SHAPE_DIRECTED_POINTS.
emissionPointTexture[get, set] TextureParticles 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.EmissionShapeParticles will be emitted inside this region. Use emissionshape constants for values.
emissionSphereRadius[get, set] doubleThe sphere's radius if emission_shape is set to constant EMISSION_SHAPE_SPHERE.
flagAlignY[get, set] boolAlign Y axis of particle with the direction of its velocity.
flagDisableZ[get, set] boolIf true, particles will not move on the z axis.
flagRotateY[get, set] boolIf true, particles rotate around Y axis by angle.
flatness[get, set] doubleAmount of spread in Y/Z plane. A value of 1 restricts particles to X/Z plane.
gravity[get, set] Vector3Gravity applied to every particle.
hueVariation[get, set] doubleInitial hue variation applied to each particle.
hueVariationCurve[get, set] TextureEach particle's hue will vary along this CurveTexture.
hueVariationRandom[get, set] doubleHue variation randomness ratio.
initialVelocity[get, set] doubleInitial velocity magnitude for each particle. Direction comes from spread and the node's orientation.
initialVelocityRandom[get, set] doubleInitial velocity randomness ratio.
lifetimeRandomness[get, set] doubleParticle lifetime randomness ratio.
linearAccel[get, set] doubleLinear acceleration applied to each particle in the direction of motion.
linearAccelCurve[get, set] TextureEach particle's linear acceleration will vary along this CurveTexture.
linearAccelRandom[get, set] doubleLinear acceleration randomness ratio.
orbitVelocity[get, set] doubleOrbital 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] TextureEach particle's orbital velocity will vary along this CurveTexture.
orbitVelocityRandom[get, set] doubleOrbital velocity randomness ratio.
radialAccel[get, set] doubleRadial acceleration applied to each particle. Makes particle accelerate away from origin.
radialAccelCurve[get, set] TextureEach particle's radial acceleration will vary along this CurveTexture.
radialAccelRandom[get, set] doubleRadial acceleration randomness ratio.
scale[get, set] doubleInitial scale applied to each particle.
scaleCurve[get, set] TextureEach particle's scale will vary along this CurveTexture.
scaleRandom[get, set] doubleScale randomness ratio.
spread[get, set] doubleEach particle's initial direction range from +spread to -spread degrees. Applied to X/Z plane and Y/Z planes.
tangentialAccel[get, set] doubleTangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion.
tangentialAccelCurve[get, set] TextureEach particle's tangential acceleration will vary along this CurveTexture.
tangentialAccelRandom[get, set] doubleTangential acceleration randomness ratio.
trailColorModifier[get, set] GradientTextureTrail particles' color will vary along this GradientTexture.
trailDivisor[get, set] longEmitter will emit amount divided by trail_divisor particles. The remaining particles will be used as trail(s).
trailSizeModifier[get, set] CurveTextureTrail particles' size will vary along this CurveTexture.

Methods

NameDescription
getColor
getColorRamp
getDirection
getEmissionBoxExtents
getEmissionColorTexture
getEmissionNormalTexture
getEmissionPointCount
getEmissionPointTexture
getEmissionShape
getEmissionSphereRadius
getFlag Returns true if the specified flag is enabled.
getFlatness
getGravity
getLifetimeRandomness
getParam Returns the value of the specified parameter.
getParamRandomness Returns the randomness ratio associated with the specified parameter.
getParamTexture Returns the Texture used by the specified parameter.
getSpread
getTrailColorModifier
getTrailDivisor
getTrailSizeModifier
setColor
setColorRamp
setDirection
setEmissionBoxExtents
setEmissionColorTexture
setEmissionNormalTexture
setEmissionPointCount
setEmissionPointTexture
setEmissionShape
setEmissionSphereRadius
setFlag If true, enables the specified flag. See flags for options.
setFlatness
setGravity
setLifetimeRandomness
setParam Sets the specified parameter.
setParamRandomness Sets the randomness ratio for the specified parameter.
setParamTexture Sets the Texture for the specified parameter.
setSpread
setTrailColorModifier
setTrailDivisor
setTrailSizeModifier

Enums

NameDescription
Constants
EmissionShape
Flags
Parameter