From d6672096fc226ad3397587a62872b063a8fbb41e Mon Sep 17 00:00:00 2001 From: QbieShay Date: Tue, 13 Jul 2021 19:46:27 +0200 Subject: moved particle parameters to minmax and split scale axis This commit adds quite a chunk of modifications to particles - particle (value + randomness) now use min and max instead - passing a curveXYZtexture is now possible and will scale particles per-axis - CPUParticle3D have an optional parameter to split the scale curve per-axis --- doc/classes/BaseMaterial3D.xml | 2 +- doc/classes/CPUParticles2D.xml | 148 +++++++++++++----------------- doc/classes/CPUParticles3D.xml | 183 +++++++++++++++++++------------------ doc/classes/CanvasItemMaterial.xml | 2 +- doc/classes/ParticlesMaterial.xml | 160 ++++++++++++++++---------------- 5 files changed, 241 insertions(+), 254 deletions(-) (limited to 'doc/classes') diff --git a/doc/classes/BaseMaterial3D.xml b/doc/classes/BaseMaterial3D.xml index bbf7c5eb6d..a5516636aa 100644 --- a/doc/classes/BaseMaterial3D.xml +++ b/doc/classes/BaseMaterial3D.xml @@ -683,7 +683,7 @@ Used for particle systems when assigned to [GPUParticles3D] and [CPUParticles3D] nodes. Enables [code]particles_anim_*[/code] properties. - The [member ParticlesMaterial.anim_speed] or [member CPUParticles3D.anim_speed] should also be set to a positive value for the animation to play. + The [member ParticlesMaterial.anim_speed_min] or [member CPUParticles3D.anim_speed_min] should also be set to a value bigger than zero for the animation to play. Used to read from the red channel of a texture. diff --git a/doc/classes/CPUParticles2D.xml b/doc/classes/CPUParticles2D.xml index ab6897ca1d..9226140c1a 100644 --- a/doc/classes/CPUParticles2D.xml +++ b/doc/classes/CPUParticles2D.xml @@ -18,25 +18,23 @@ Sets this node's properties to match a given [GPUParticles2D] node with an assigned [ParticlesMaterial]. - - + + - Returns the base value of the parameter specified by [enum Parameter]. + Returns the [Curve] of the parameter specified by [enum Parameter]. - - + + - Returns the [Curve] of the parameter specified by [enum Parameter]. - + - Returns the randomness factor of the parameter specified by [enum Parameter]. @@ -52,28 +50,26 @@ Restarts the particle emitter. - + - + - Sets the base value of the parameter specified by [enum Parameter]. + Sets the [Curve] of the parameter specified by [enum Parameter]. - + - + - Sets the [Curve] of the parameter specified by [enum Parameter]. - + - + - Sets the randomness factor of the parameter specified by [enum Parameter]. @@ -89,41 +85,33 @@ Number of particles emitted in one emission cycle. - - Initial rotation applied to each particle, in degrees. - Each particle's rotation will be animated along this [Curve]. - - Rotation randomness ratio. + - - Initial angular velocity applied to each particle. Sets the speed of rotation of the particle. + Each particle's angular velocity will vary along this [Curve]. - - Angular velocity randomness ratio. + - - Particle animation offset. + Each particle's animation offset will vary along this [Curve]. - - Animation offset randomness ratio. + - - Particle animation speed. + Each particle's animation speed will vary along this [Curve]. - - Animation speed randomness ratio. + + + Each particle's initial color. If [member texture] is defined, it will be multiplied by this color. @@ -131,14 +119,12 @@ Each particle's color will vary along this [Gradient] (multiplied with [member color]). - - The rate at which particles lose velocity. - Damping will vary along this [Curve]. - - Damping randomness ratio. + + + Unit vector specifying the particles' emission direction. @@ -179,20 +165,16 @@ Gravity applied to every particle. - - Initial hue variation applied to each particle. - Each particle's hue will vary along this [Curve]. - - Hue variation randomness ratio. + + + - - Initial velocity magnitude for each particle. Direction comes from [member spread] and the node's orientation. + - - Initial velocity randomness ratio. + Amount of time each particle will exist. @@ -200,14 +182,12 @@ Particle lifetime randomness ratio. - - Linear acceleration applied to each particle in the direction of motion. - Each particle's linear acceleration will vary along this [Curve]. - - Linear acceleration randomness ratio. + + + If [code]true[/code], particles use the parent node's coordinate space. If [code]false[/code], they use global coordinates. @@ -215,14 +195,12 @@ If [code]true[/code], only one emission cycle occurs. If set [code]true[/code] during a cycle, emission will stop at the cycle's end. - - Orbital velocity applied to each particle. Makes the particles circle around origin. Specified in number of full rotations around origin per second. - Each particle's orbital velocity will vary along this [Curve]. - - Orbital velocity randomness ratio. + + + Align Y axis of particle with the direction of its velocity. @@ -230,41 +208,41 @@ Particle system starts as if it had already run for this many seconds. - - Radial acceleration applied to each particle. Makes particle accelerate away from origin. - Each particle's radial acceleration will vary along this [Curve]. - - Radial acceleration randomness ratio. + + + Emission lifetime randomness ratio. - - Initial scale applied to each particle. - Each particle's scale will vary along this [Curve]. - - Scale randomness ratio. + + + + + + + Particle system's running speed scaling ratio. A value of [code]0[/code] can be used to pause the particles. + + Each particle's initial direction range from [code]+spread[/code] to [code]-spread[/code] degrees. - - Tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion. - Each particle's tangential acceleration will vary along this [Curve]. - - Tangential acceleration randomness ratio. + + + Particle texture. If [code]null[/code], particles will be squares. @@ -278,40 +256,40 @@ Particles are drawn in order of remaining lifetime. - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set initial velocity properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set initial velocity properties. - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set angular velocity properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set angular velocity properties. - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set orbital velocity properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set orbital velocity properties. - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set linear acceleration properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set linear acceleration properties. - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set radial acceleration properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set radial acceleration properties. - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set tangential acceleration properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set tangential acceleration properties. - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set damping properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set damping properties. - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set angle properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set angle properties. - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set scale properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set scale properties. - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set hue variation properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set hue variation properties. - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set animation speed properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set animation speed properties. - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set animation offset properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set animation offset properties. Represents the size of the [enum Parameter] enum. diff --git a/doc/classes/CPUParticles3D.xml b/doc/classes/CPUParticles3D.xml index 8aa3573996..fe8c354427 100644 --- a/doc/classes/CPUParticles3D.xml +++ b/doc/classes/CPUParticles3D.xml @@ -17,25 +17,23 @@ Sets this node's properties to match a given [GPUParticles3D] node with an assigned [ParticlesMaterial]. - - + + - Returns the base value of the parameter specified by [enum Parameter]. + Returns the [Curve] of the parameter specified by [enum Parameter]. - - + + - Returns the [Curve] of the parameter specified by [enum Parameter]. - + - Returns the randomness factor of the parameter specified by [enum Parameter]. @@ -51,28 +49,28 @@ Restarts the particle emitter. - + - + - Sets the base value of the parameter specified by [enum Parameter]. + Sets the [Curve] of the parameter specified by [enum Parameter]. - + - + - Sets the [Curve] of the parameter specified by [enum Parameter]. + Sets the maximum value for the given parameter - + - + - Sets the randomness factor of the parameter specified by [enum Parameter]. + Sets the minimum value for the given parameter @@ -88,41 +86,41 @@ Number of particles emitted in one emission cycle. - - Initial rotation applied to each particle, in degrees. - Each particle's rotation will be animated along this [Curve]. - - Rotation randomness ratio. + + Maximum angle. - - Initial angular velocity applied to each particle. Sets the speed of rotation of the particle. + + Minimum angle. Each particle's angular velocity will vary along this [Curve]. - - Angular velocity randomness ratio. + + Maximum angular velocity. - - Particle animation offset. + + Minimum angular velocity. Each particle's animation offset will vary along this [Curve]. - - Animation offset randomness ratio. + + Maximum animation offset. - - Particle animation speed. + + Minimum animation offset. Each particle's animation speed will vary along this [Curve]. - - Animation speed randomness ratio. + + Maximum particle animation speed. + + + Minimum particle animation speed. Each particle's initial color. To have particle display color in a [BaseMaterial3D] make sure to set [member BaseMaterial3D.vertex_color_use_as_albedo] to [code]true[/code]. @@ -130,14 +128,14 @@ Each particle's color will vary along this [GradientTexture] over its lifetime (multiplied with [member color]). - - The rate at which particles lose velocity. - Damping will vary along this [Curve]. - - Damping randomness ratio. + + Maximum damping. + + + Minimum damping Unit vector specifying the particles' emission direction. @@ -193,20 +191,20 @@ Gravity applied to every particle. - - Initial hue variation applied to each particle. - Each particle's hue will vary along this [Curve]. - - Hue variation randomness ratio. + + Maximum hue variation. - - Initial velocity magnitude for each particle. Direction comes from [member spread] and the node's orientation. + + Minimum hue variation. - - Initial velocity randomness ratio. + + Maximum value of the initial velocity. + + + Minimum value of the initial velocity. Amount of time each particle will exist. @@ -214,14 +212,14 @@ Particle lifetime randomness ratio. - - Linear acceleration applied to each particle in the direction of motion. - Each particle's linear acceleration will vary along this [Curve]. - - Linear acceleration randomness ratio. + + Maximum linear acceleration. + + + Minimum linear acceleration. If [code]true[/code], particles use the parent node's coordinate space. If [code]false[/code], they use global coordinates. @@ -232,15 +230,14 @@ If [code]true[/code], only one emission cycle occurs. If set [code]true[/code] during a cycle, emission will stop at the cycle's end. - - Orbital velocity applied to each particle. Makes the particles circle around origin in the local XY plane. Specified in number of full rotations around origin per second. - This property is only available when [member particle_flag_disable_z] is [code]true[/code]. - Each particle's orbital velocity will vary along this [Curve]. - - Orbital velocity randomness ratio. + + Maximum orbit velocity. + + + Minimum orbit velocity. Align Y axis of particle with the direction of its velocity. @@ -249,46 +246,58 @@ If [code]true[/code], particles will not move on the Z axis. - If [code]true[/code], particles rotate around Y axis by [member angle]. + If [code]true[/code], particles rotate around Y axis by [member angle_min]. Particle system starts as if it had already run for this many seconds. - - Radial acceleration applied to each particle. Makes particle accelerate away from origin. - Each particle's radial acceleration will vary along this [Curve]. - - Radial acceleration randomness ratio. + + Maximum radial acceleration. + + + Minimum radial acceleration. Emission lifetime randomness ratio. - - Initial scale applied to each particle. - Each particle's scale will vary along this [Curve]. - - Scale randomness ratio. + + Maximum scale. + + + Minimum scale. + + + Curve for the scale over life, along the x axis. + + + Curve for the scale over life, along the y axis. + + + Curve for the scale over life, along the z axis. Particle system's running speed scaling ratio. A value of [code]0[/code] can be used to pause the particles. + + If set to true, three different scale curves can be specified, one per scale axis. + Each particle's initial direction range from [code]+spread[/code] to [code]-spread[/code] degrees. Applied to X/Z plane and Y/Z planes. - - Tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion. - Each particle's tangential acceleration will vary along this [Curve]. - - Tangential acceleration randomness ratio. + + Maximum tangent acceleration. + + + Minimum tangent acceleration. @@ -302,40 +311,40 @@ Particles are drawn in order of depth. - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set initial velocity properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set initial velocity properties. - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set angular velocity properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set angular velocity properties. - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set orbital velocity properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set orbital velocity properties. - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set linear acceleration properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set linear acceleration properties. - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set radial acceleration properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set radial acceleration properties. - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set tangential acceleration properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set tangential acceleration properties. - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set damping properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set damping properties. - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set angle properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set angle properties. - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set scale properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set scale properties. - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set hue variation properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set hue variation properties. - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set animation speed properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set animation speed properties. - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set animation offset properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set animation offset properties. Represents the size of the [enum Parameter] enum. diff --git a/doc/classes/CanvasItemMaterial.xml b/doc/classes/CanvasItemMaterial.xml index c2d44c1d17..780899bff7 100644 --- a/doc/classes/CanvasItemMaterial.xml +++ b/doc/classes/CanvasItemMaterial.xml @@ -30,7 +30,7 @@ [b]Note:[/b] This property is only used and visible in the editor if [member particles_animation] is [code]true[/code]. - If [code]true[/code], enable spritesheet-based animation features when assigned to [GPUParticles2D] and [CPUParticles2D] nodes. The [member ParticlesMaterial.anim_speed] or [member CPUParticles2D.anim_speed] should also be set to a positive value for the animation to play. + If [code]true[/code], enable spritesheet-based animation features when assigned to [GPUParticles2D] and [CPUParticles2D] nodes. The [member ParticlesMaterial.anim_speed_max] or [member CPUParticles2D.anim_speed_max] should also be set to a positive value for the animation to play. This property (and other [code]particles_anim_*[/code] properties that depend on it) has no effect on other types of nodes. diff --git a/doc/classes/ParticlesMaterial.xml b/doc/classes/ParticlesMaterial.xml index 3520d3b966..3b583f5c89 100644 --- a/doc/classes/ParticlesMaterial.xml +++ b/doc/classes/ParticlesMaterial.xml @@ -11,18 +11,18 @@ - + - Returns the value of the specified parameter. + Return the maximum value range for the given prameter. - + - Returns the randomness ratio associated with the specified parameter. + Return the minimum value range for the given parameter. @@ -39,20 +39,20 @@ Returns [code]true[/code] if the specified particle flag is enabled. See [enum ParticleFlags] for options. - + - Sets the specified [enum Parameter]. + Sets the maximum value range for the given parameter. - + - + - Sets the randomness ratio for the specified [enum Parameter]. + Sets the minimum value range for the given parameter. @@ -73,53 +73,56 @@ - - Initial rotation applied to each particle, in degrees. - Only applied when [member particle_flag_disable_z] or [member particle_flag_rotate_y] are [code]true[/code] or the [BaseMaterial3D] being used to draw the particle is using [constant BaseMaterial3D.BILLBOARD_PARTICLES]. - Each particle's rotation will be animated along this [CurveTexture]. - - Rotation randomness ratio. + + Maximum angle. - - Initial angular velocity applied to each particle. Sets the speed of rotation of the particle. - Only applied when [member particle_flag_disable_z] or [member particle_flag_rotate_y] are [code]true[/code] or the [BaseMaterial3D] being used to draw the particle is using [constant BaseMaterial3D.BILLBOARD_PARTICLES]. + + Minimum angle. Each particle's angular velocity will vary along this [CurveTexture]. - - Angular velocity randomness ratio. + + Maximum angular velocity. - - Particle animation offset. + + Minimum angular velocity. Each particle's animation offset will vary along this [CurveTexture]. - - Animation offset randomness ratio. + + Maximum animation offset. - - Particle animation speed. + + Minimum animation offset. Each particle's animation speed will vary along this [CurveTexture]. - - Animation speed randomness ratio. + + Maximum particle animation speed. + + + Minimum particle animation speed. + True if the interaction with particle attractors is enabled. + Collision bouncyness. + True if collisions are enabled for this particle system. + Collision friction. + Should collision take scale into account. Each particle's initial color. If the [GPUParticles2D]'s [code]texture[/code] is defined, it will be multiplied by this color. To have particle display color in a [BaseMaterial3D] make sure to set [member BaseMaterial3D.vertex_color_use_as_albedo] to [code]true[/code]. @@ -127,14 +130,12 @@ Each particle's color will vary along this [GradientTexture] over its lifetime (multiplied with [member color]). - - The rate at which particles lose velocity. - Damping will vary along this [CurveTexture]. - - Damping randomness ratio. + + + Unit vector specifying the particles' emission direction. @@ -178,42 +179,41 @@ Gravity applied to every particle. - - Initial hue variation applied to each particle. - Each particle's hue will vary along this [CurveTexture]. - - Hue variation randomness ratio. + + Maximum hue variation. + + + Minimum hue variation. - - Initial velocity magnitude for each particle. Direction comes from [member spread] and the node's orientation. + + Maximum initial velocity. - - Initial velocity randomness ratio. + + Minimum initial velocity. Particle lifetime randomness ratio. - - Linear acceleration applied to each particle in the direction of motion. - Each particle's linear acceleration will vary along this [CurveTexture]. - - Linear acceleration randomness ratio. + + Maximum linear acceleration. - - 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 [member particle_flag_disable_z] is [code]true[/code]. + + Minimum linear acceleration. Each particle's orbital velocity will vary along this [CurveTexture]. - - Orbital velocity randomness ratio. + + Maximum orbit velocity. + + + Minimum orbit velocity. Align Y axis of particle with the direction of its velocity. @@ -222,25 +222,25 @@ If [code]true[/code], particles will not move on the z axis. - If [code]true[/code], particles rotate around Y axis by [member angle]. - - - Radial acceleration applied to each particle. Makes particle accelerate away from origin. + If [code]true[/code], particles rotate around Y axis by [member angle_min]. Each particle's radial acceleration will vary along this [CurveTexture]. - - Radial acceleration randomness ratio. + + Maximum radial acceleration. - - Initial scale applied to each particle. + + Minimum radial acceleration. - Each particle's scale will vary along this [CurveTexture]. + Each particle's scale will vary along this [CurveTexture]. If a [CurveXYZTexture] is supplied instead, the scale will be separated per-axis. - - Scale randomness ratio. + + Maximum scale. + + + Minimum scale. Each particle's initial direction range from [code]+spread[/code] to [code]-spread[/code] degrees. @@ -253,52 +253,52 @@ - - Tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion. - Each particle's tangential acceleration will vary along this [CurveTexture]. - - Tangential acceleration randomness ratio. + + Maximum tangential acceleration. + + + Minimum tangential acceleration. - Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set initial velocity properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set initial velocity properties. - Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set angular velocity properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set angular velocity properties. - Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set orbital velocity properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set orbital velocity properties. - Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set linear acceleration properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set linear acceleration properties. - Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set radial acceleration properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set radial acceleration properties. - Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set tangential acceleration properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set tangential acceleration properties. - Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set damping properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set damping properties. - Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set angle properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set angle properties. - Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set scale properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set scale properties. - Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set hue variation properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set hue variation properties. - Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set animation speed properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set animation speed properties. - Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set animation offset properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set animation offset properties. Represents the size of the [enum Parameter] enum. -- cgit v1.2.3