site templates free download

Particles

High-level system

We have developed a particle system for our engine, but before we started to develop the particulate system we had to add different  engine functionalities like the billboard and transparencies 

Billboarding

Align everything!

You can add a component Billboard to any GameObject.

Once the component is added you can choose between one of the following alignments:

Mobirise

Screen aligned

Objects follows camera rotation.

Mobirise

World aligned

Objects look towards the camera. 

Mobirise

Axially aligned

Objects look towards the camera, but user can lock one of the axis. 

Transparencies 

Let's see through!

Mobirise


When it comes to particles, the transparencies is something mandatory, we can't only have squared particles!
To do this we had to change not only our texture importer but also the renderer.



The problem of seein throungh objects is that objects behind a transparent one won't draw unless is is drawn before the transparent one. In order to fix this problem we order all objects with transparencies just before draw, from far to near of the camera

Mobirise

Particle values

Basic particle spawn values

  1. Speed                                                                                                                                                     The speed at which the particles move
  2. Acceleration                                                                                                                       Acceleration of the particles (speed over time)
  3. Initial rotation                                                                                                                                      The rotation of the particle when it appears
  4. Angular Velocity                                                                                                                                     The speed at which the particle rotates
  5. Angular acceleration                                                                                                      Acceleration of the angular velocity (angular velocity over time)
  6. Lifetime                                                                                                                                                 The time (in seconds) the particle will be alive 
  7. Size                                                                                                                                                            Size of the particle, edit the SizeOverTime to make the particle bigger or smaller
  8. Emition                                                                                                                                                                            The rate of emision (number of particles spawned each second)
  9. Loop                                                                                                                                                   Decide if the emitter will last forever or for a certain amount of time 
  10. Duration                                                                                                                                                The duration of the emitter (if the emitter is not looping)
You can switch between a specific number or a random between 2 given numbers on the selected options

Particle Shape

Spawn shape options

Mobirise

Box

Particles spawn inside a box and always go in the Up vector of the GameObject
You can change the size of the  box.

Mobirise

 Sphere

 Particles can either spawn inside a sphere  (in the center or in a random position inside  the sphere) or in the border of the sphere.  You can select the size of the sphere

Mobirise

Cone 

Particles spawn in the position of the GameObject and the direction of the particle is inside a cone.  You can change the size of the base of the cone.

Particle Color

Give color to the particles!

Mobirise




Normal Color
Paint your particles with one simple color (RGBA) 

This particle will always be the same color.




Color over time
Paint your particles with as many colors as you want!

You can decide the transition times between colors to make beatiful
and colorful.

Mobirise

Particle Burst

Create particle with bursts

  1. Min particles                                                                                                                                          The minimum amount of particles that will spawn 
  2. Max particles                                                                                                                                           The maximum amount of particles that will spawn 
  3. Repeat time                                                                                                                                          Time that has to pass for a burst to appear
Mobirise





You can also edit the shape of the burst, following the same burst shapes previously mentioned.

Texture and animation

Draw your particles with your own sprites and animations

You can select any loaded texture to be the particle texture, once loaded all particles from this emitter will have this texture. You can change or remove the texture any time.

The texture can be used as a animated sprite, you just have to select the number or rows and columns and click the Calc Animation button.

You can also edit the animation speed, being 0 the fastest.

Mobirise

If you want the particles to die when the animation ends, you have only to check the option kill partile with animation. The particle will live until the animation ends, neither before nor after.

You can only have one texture per emitter.

SubEmitter

Create particles when a particle ends

Mobirise

You can add a SubEmitter to a Emitter, by doing  so all particles will spawn new particles when they die. 

Once you click on the SubEmitter option a new particle system will be created in you hierarchy menu (inside the current GameObject). You can edit the SubEmitter options from the new GameObject.