From a6722cf36251ddcb538e6ebed9fa4950342b68ba Mon Sep 17 00:00:00 2001 From: clayjohn Date: Sun, 6 Jan 2019 12:52:15 -0800 Subject: [PATCH] clarified and filled out particles material doc --- doc/classes/ParticlesMaterial.xml | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/doc/classes/ParticlesMaterial.xml b/doc/classes/ParticlesMaterial.xml index eba5409028..89913d9e0d 100644 --- a/doc/classes/ParticlesMaterial.xml +++ b/doc/classes/ParticlesMaterial.xml @@ -6,6 +6,7 @@ ParticlesMaterial defines particle properties and behavior. It is used in the [code]process_material[/code] 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 [code]1.0[/code] 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 [code]0.4[/code] would scale the original property between [code]0.4-1.0[/code] of its original value. @@ -15,7 +16,8 @@ - Initial rotation applied to each particle. + Initial rotation applied to each particle, in degrees. + Only applied when [member flag_disable_z] or [member flag_rotate_y] are [code]true[/code] or the [SpatialMaterial] being used to draw the particle is using [code]BillboardMode.BILLBOARD_PARTICLES[/code]. Each particle's rotation will be animated along this [CurveTexture]. @@ -24,7 +26,8 @@ Rotation randomness ratio. Default value: [code]0[/code]. - Initial angular velocity applied to each particle. + Initial angular velocity applied to each particle. Sets the speed of rotation of the particle. + Only applied when [member flag_disable_z] or [member flag_rotate_y] are [code]true[/code] or the [SpatialMaterial] being used to draw the particle is using [code]BillboardMode.BILLBOARD_PARTICLES[/code]. Each particle's angular velocity will vary along this [CurveTexture]. @@ -51,7 +54,7 @@ Animation speed randomness ratio. Default value: [code]0[/code]. - Each particle's initial color. If the [Particles2D]'s [code]texture[/code] is defined, it will be multiplied by this color. + Each particle's initial color. If the [Particles2D]'s [code]texture[/code] is defined, it will be multiplied by this color. To have particle display color in a [SpatialMaterial] make sure to set [member SpatialMaterial.vertex_color_use_as_albedo] to [code]true[/code]. Each particle's color will vary along this [GradientTexture]. @@ -69,13 +72,16 @@ The box's extents if [code]emission_shape[/code] is set to [code]EMISSION_SHAPE_BOX[/code]. + Particle color will be modulated by color determined by sampling this texture at the same point as the [member emission_point_texture]. + Particle velocity and rotation will be set by sampling this texture at the same point as the [member emission_point_texture]. Used only in [code]EMISSION_SHAPE_DIRECTED[/code]. Can be created automatically from mesh or node by selecting "Create Emission Points from Mesh/Node" under the "Particles" tool in the toolbar. The number of emission points if [code]emission_shape[/code] is set to [code]EMISSION_SHAPE_POINTS[/code] or [code]EMISSION_SHAPE_DIRECTED_POINTS[/code]. + Particles will be emitted at positions determined by sampling this texture at a random position. Used with [code]EMISSION_SHAPE_POINTS[/code] and [code]EMISSION_SHAPE_DIRECTED_POINTS[/code]. Can be created automatically from mesh or node by selecting "Create Emission Points from Mesh/Node" under the "Particles" tool in the toolbar. Particles will be emitted inside this region. Use [code]EMISSION_SHAPE_*[/code] constants for values. Default value: [code]EMISSION_SHAPE_POINT[/code]. @@ -84,13 +90,16 @@ The sphere's radius if [code]emission_shape[/code] is set to [code]EMISSION_SHAPE_SPHERE[/code]. + Align y-axis of particle with the direction of its velocity. If [code]true[/code], particles will not move on the z axis. Default value: [code]true[/code] for [Particles2D], [code]false[/code] for [Particles]. + If [code]true[/code], particles rotate around y-axis by [member angle]. + Amount of [member spread] in Y/Z plane. A value of [code]1[/code] restricts particles to X/Z plane. Default [code]0[/code]. Gravity applied to every particle. Default value: [code](0, 98, 0)[/code]. @@ -105,13 +114,13 @@ Hue variation randomness ratio. Default value: [code]0[/code]. - Initial velocity for each particle. + Initial velocity magnitude for each particle. Direction comes from [member spread]. Initial velocity randomness ratio. Default value: [code]0[/code]. - Linear acceleration applied to each particle. + Linear acceleration applied to each particle. Acceleration increases velocity magnitude each frame without affecting direction. Each particle's linear acceleration will vary along this [CurveTexture]. @@ -120,7 +129,8 @@ Linear acceleration randomness ratio. Default value: [code]0[/code]. - Orbital velocity applied to each particle. + 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 flag_disable_z] is [code]true[/code]. Each particle's orbital velocity will vary along this [CurveTexture]. @@ -129,7 +139,7 @@ Orbital velocity randomness ratio. Default value: [code]0[/code]. - Radial acceleration applied to each particle. + Radial acceleration applied to each particle. Makes particle accelerate away from origin. Each particle's radial acceleration will vary along this [CurveTexture]. @@ -147,10 +157,10 @@ Scale randomness ratio. Default value: [code]0[/code]. - Each particle's initial direction range from [code]+spread[/code] to [code]-spread[/code] degrees. Default value: [code]45[/code]. + Each particle's initial direction range from [code]+spread[/code] to [code]-spread[/code] degrees. Default value: [code]45[/code]. Applied to X/Z plane and Y/Z planes. - Tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity. + 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]. @@ -225,8 +235,10 @@ Particles will be emitted in the volume of a box. + Particles will be emitted at a position determined by sampling a random point on the [member emission_point_texture]. Particle color will be modulated by [member emission_color_texture]. + Particles will be emitted at a position determined by sampling a random point on the [member emission_point_texture]. Particle velocity and rotation will be set based on [member emission_normal_texture]. Particle color will be modulated by [member emission_color_texture].