Particle systems

Hello, this tutorial will show you step by step an example of how to use the particle system.

Summary

  1. First step
  2. General settings
  3. Emission
  4. Velocity
  5. Acceleration
  6. Transformation offset
  7. Color modulate
  8. To go further

1. First step

First of all, the result of this tutorial is available in the PixelOver download files in the examples/ folder.

You can start from this file to have the same base but it is not a requirement.

The particle system can be used on an image, a moving image, a shape or a 3D model.

You can create one of these objects (for example a shape) to start with.

Create shape

In our case, we want to make the flame of the torch, so we will use mesh deformation to modify it.

Deform shape

Once the object has been created and selected, you now have access below the “Particles and trails” section to all the properties of the particle system for this object.

particles and trails menu


2. General settings

To begin with in the general menu, we will activate the particles.

Enabled particles

You can’t see anything for the moment (unless you are using the example project), this is normal because the particles are linked to the animation so you can click on animation to create a new one. Now if you play the animation you can see the particles being created and falling because by default the particles have a gravity (but we will see this in Acceleration).

Add animation

There are several other parameters available in general like the lifetime of the particles, the maximum amount of particles displayed, etc… You can also see the parameter “Random seed”, it allows to regenerate the random behavior of the particles (used for example when the properties have a different minimum and maximum value).

We will skip the “static mode” menu for the moment and go directly to the “emission” menu.


3. Emission

By default, the particles are emitted at the point of origin but you can use the emission menu to choose a shape where the particles will be emitted, you can also choose in which direction they will be emitted (this will affect the direction of the velocity of the particles), as well as the diffusion angle of the particles, if the particles are emitted as children of the emitter and the order of display of the particles.

For our example as we want to create a torch we will want an upward direction and a slight angle of diffusion.

Particles emission

It doesn’t have an effect because the particles don’t have any velocity, so we will apply a linear speed in the “Velocity” menu.


4. Velocity

In this menu, we have first of all the linear velocity which applies a straight line speed to the particles, angular which applies a rotation to the particles and orbital which rotates the direction of the particles regard to their emission point.

Curves can also be created for each of these properties. The value of the curve is multiplied by the value of the property and depends on the lifetime of the particle. We will see an example in Déclage de la transformation.

As we want to make flames we will just apply a linear velocity.

Particles velocity

For the moment the flames are falling down because of gravity, we will see in the acceleration menu how to correct this.


5. Acceleration

In this menu we have first the gravity which is by default a downward acceleration as well as the linear acceleration which increases the linear velocity, the radial acceleration which applies an acceleration opposite to the direction of the emission point and the tangential acceleration applied according to the direction of gravity.

For flames, we will just remove the gravity from the particles.

Particles acceleration


6. Transformation offset

In this menu you can add an offset to the rotation, scale or skew of the original particles.

For example, for flames you can give them a random rotation and a random scale.

Particles transformation offset

You can also create a curve on the scale so that the flames change in size over time.

Particles scale curve


7. Color modulate

Finally this last menu allows us to choose a modulation color or a random color from a gradient. We can also use a gradient to modulate the color over time.

For the flames we want to go through yellow, red and finally black.

Particles color curve


8. To go further

We have seen in this tutorial the basic features available with the particle system. Now that you have the basics, the best thing to do is to test the different options.

There is also for example the static mode menu which allows you to manually modify the time of the simulation or the automatic frames animation for animated image.

This tutorial project and other examples are available in the PixelOver download files in the examples/ folder.


If you have any question, don’t hesitate to look at the community.