This setting can be used to set the particle system to render at a fixed
FPS. For instance, changing the value to ``2`` will make the particles render
at 2 frames per second. Note this does not slow down the particle system itself.
Fract Delta
~~~~~~~~~~~
This can be used to turn Fract Delta on or off.
Drawing parameters
------------------
Visibility Rect
~~~~~~~~~~~~~~~
The visibility rectangle controls the visibility of the particles on screen. If this rectangle is outside of the viewport, the engine will not render the particles on screen.
The rectangle's ``W`` and ``H`` properties respectively control its Width and its Height.
The ``X`` and ``Y`` properties control the position of the upper-left
corner of the rectangle, relative to the particle emitter.
You can have Godot generate a Visibility Rect automatically using the toolbar above the 2d view. To do so, select the Particles2D node and Click ``Particles > Generate Visibility Rect``. Godot will simulate the Particles2D node emitting particles for a few seconds and set the rectangle to fit the surface the particles take.
You can control the emit duration with the ``Generation Time (sec)`` option. The maximum value is 25 seconds. If you need more time for your particles to move around, you can temporarily change the ``preprocess`` duration on the Particles2D node.
Local Coords
~~~~~~~~~~~~
By default this option is on, and it means that the space that particles
are emitted to is relative to the node. If the node is moved, all
particles are moved with it:
..image:: img/paranim20.gif
If disabled, particles will emit to global space, meaning that if the
node is moved, already emitted particles are not affected:
..image:: img/paranim21.gif
Draw Order
~~~~~~~~~~
This controls the order in which individual particles are drawn. ``Index``
means particles are drawn according to their emission order (default).
``Lifetime`` means they are drawn in order of remaining lifetime.
ParticlesMaterial settings
--------------------------
Direction
~~~~~~~~~
This is the base direction at which particles emit. The default is
``Vector3(1, 0, 0)`` which makes particles emit to the right. However,
with the default gravity settings, particles will go straight down.
..image:: img/direction1.png
For this property to be noticeable, you need an *initial velocity* greater
than 0. Here, we set the initial velocity to 40. You'll notice that
particles emit toward the right, then go down because of gravity.
..image:: img/direction2.png
Spread
~~~~~~
This parameter is the angle in degrees which will be randomly added in
either direction to the base ``Direction``. A spread of ``180`` will emit
in all directions (+/- 180). For spread to do anything the "Initial Velocity"
parameter must be greater than 0.
..image:: img/paranim3.gif
Flatness
~~~~~~~~
This property is only useful for 3D particles.
Gravity
~~~~~~~
The gravity applied to every particle.
..image:: img/paranim7.gif
Initial Velocity
~~~~~~~~~~~~~~~~
Initial velocity is the speed at which particles will be emitted (in
pixels/sec). Speed might later be modified by gravity or other
accelerations (as described further below).
..image:: img/paranim4.gif
Angular Velocity
~~~~~~~~~~~~~~~~
Angular velocity is the initial angular velocity applied to particles.
Spin Velocity
~~~~~~~~~~~~~
Spin velocity is the speed at which particles turn around their center
(in degrees/sec).
..image:: img/paranim5.gif
Orbit Velocity
~~~~~~~~~~~~~~
Orbit velocity is used to make particles turn around their center.
..image:: img/paranim6.gif
Linear Acceleration
~~~~~~~~~~~~~~~~~~~
The linear acceleration applied to each particle.
Radial Acceleration
~~~~~~~~~~~~~~~~~~~
If this acceleration is positive, particles are accelerated away from
the center. If negative, they are absorbed towards it.
..image:: img/paranim8.gif
Tangential Acceleration
~~~~~~~~~~~~~~~~~~~~~~~
This acceleration will use the tangent vector to the center. Combining
with radial acceleration can do nice effects.
..image:: img/paranim9.gif
Damping
~~~~~~~
Damping applies friction to the particles, forcing them to stop. It is
especially useful for sparks or explosions, which usually begin with a
high linear velocity and then stop as they fade.
..image:: img/paranim10.gif
Angle
~~~~~
Determines the initial angle of the particle (in degrees). This parameter
is mostly useful randomized.
..image:: img/paranim11.gif
Scale
~~~~~
Determines the initial scale of the particles.
..image:: img/paranim12.gif
Color
~~~~~
Used to change the color of the particles being emitted.
Hue variation
~~~~~~~~~~~~~
The ``Variation`` value sets the initial hue variation applied to each
particle. The ``Variation Random`` value controls the hue variation
randomness ratio.
Emission Shapes
---------------
ParticlesMaterials allow you to set an Emission Mask, which dictates
the area and direction in which particles are emitted.
These can be generated from textures in your project.
Ensure that a ParticlesMaterial is set, and the Particles2D node is selected.
A "Particles" menu should appear in the Toolbar:
..image:: img/emission_shapes1.png
Open it and select "Load Emission Mask":
..image:: img/emission_shapes2.png
Then select which texture you want to use as your mask:
..image:: img/emission_shapes3.png
A dialog box with several settings will appear.
Emission Mask
~~~~~~~~~~~~~
Three types of emission masks can be generated from a texture:
- Solid Pixels: Particles will spawn from any area of the texture,
excluding transparent areas.
..image:: img/emission_mask_solid.gif
- Border Pixels: Particles will spawn from the outer edges of the texture.
..image:: img/emission_mask_border.gif
- Directed Border Pixels: Similar to Border Pixels, but adds extra
information to the mask to give particles the ability to emit away
from the borders. Note that an ``Initial Velocity`` will need to
be set in order to utilize this.
..image:: img/emission_mask_directed_border.gif
Emission Colors
~~~~~~~~~~~~~~~
``Capture from Pixel`` will cause the particles to inherit the color of the mask at their spawn points.
Once you click "OK", the mask will be generated and set to the ParticlesMaterial, under the ``Emission Shape`` section:
..image:: img/emission_shapes4.png
All of the values within this section have been automatically generated by the
"Load Emission Mask" menu, so they should generally be left alone.
..note:: An image should not be added to ``Point Texture`` or ``Color Texture`` directly.
The "Load Emission Mask" menu should always be used instead.