Loading and Using Other Libraries
Click the Load Library button at left top of the Database View.
A browser window will open, from which you can select a different library.
You can switch between libraries by selecting them from the library drop-down menu.
Copying and Pasting Particle Attributes
You can copy and paste between libraries by right-clicking within the pane and selecting either Copy Category or Copy All.
You can Paste using the same menu.
Applying a Material to a Particle
You can apply materials to the particle. For example, if you select a refractive material, it will apply refraction to your particle.
Clicking the Browse Material button will open the Material Editor. Select a material from there, then go back to your particle in the database view. Now, click Assign Material.
A Simple Particle Fireworks
This tutorial will teach how to create a simple fireworks effect using particles. It covers usage of second generation child particles and requires you to have at least read and understood the previous fire tutorial.
Creating the Rocket
In the DataBase View, create a new particle item Firework1 in the group Fireworks. This will be the fireworks rocket soaring up into the sky.
Set some basic information like particle count and life time. (Preferably choose some small values to be able to see one firework after another).
In the appearance pane, select a geometry and a material for the rocket, e.g.
The rocket will not fade away, so the basic lighting settings should be just fine.
You can add some little randomization to its size or stretched length.
In the movement pane, set speed, air resistance and acceleration to your liking. Speed should not be set too high if you wish to actually see your effect.
Also set the emit angle in the angles pane.
Now place the effect somewhere on your map and have look at the soaring rockets.
Adding Trailing Sparks
This will add trailing sparks as second-generation child particles (i.e. local) to the rocket.
So, add a sub effect and rename it to TrailSparks. Change its settings as in the screenshot below.
In the appearance pane, set the particle texture to
textures\sprites\sparks_multi_tiled.dds and color blending to ColorBased. Then adjust the particle's texture tiling to fit the texture.
In the lighting pane, zero out the diffuse lighting term and change the emissive lighting terms to 1. Also adjust the alpha to fade out at the end. You can also change the particle's color fading to match the desired effect.
Since the texture chosen above is a little too huge for some small particles, change the particle size to 0.01. If desired, you should also adjust the stretch values.
Now, the important part: in the spawning pane, check the Second Generation box. This will create an sub-particle emitter per parent particle.
To have the sparks trail behind the rocket, set a negative speed in the movement pane. Also set gravity scale to 1 for a more realistic trail. Adjust air resistance and turbulence to your liking.
Since the trail should come out of the rocket's center, choose a small emit angle in the angles pane.
Finally, to make the particles bounce if it hits the ground, change the physics type to SimpleCollision and check the Collide Terrain box. Also choose some small bounciness as seen below.
Reload scripts and admire your fireworks.
Adding the Explosion
Now comes the really important part, the explosion.
For the explosion to look realistic, you need to emit many particles for each rocket.
Input the settings below for the emitter pane.
This will spawn about 5k particles at a given time (delay) and only once per rocket (continuous is unchecked).
Choose an additively blended texture in the appearance pane, e.g.
Adjust the alpha fading curve in the lighting pane, and also, set the emissive lighting values to something about 3.
In the size pane, adjust size to 0.1 and stretch to 0.4. Also, add a trail as shown below.
The particle effect is also a second-generation child effect. So check to box accordingly in the spawning pane.
In the movement pane, set speed to about 10, air resistance to 0.2 and some turbulence speed.
In the angles pane, set the emit angle to 180 with a random variation of 1.
That's it. Now save, reload scripts, and enjoy your fireworks.
As a Practice Exercise
- Add even more sparks as second generation child to the explosion particles.
- Put the fire and fireworks together to have a big explosion. Call this effect DeadlyFireworks.
You don't have to create every effect by hand. You can simply copy and paste effects inside of The DataBase View.