this document is online at
 Fireworks Beginner  Making fireworks with particles
2000 12 21 
  WP   id111 
Well its almost that time of year again when fireworks will brighten up our skies, so i thought it might be a nice topic for a tutorial. A couple of days and empty soda bottles later you can try it out for yourselves. Have fun reading it!

Getting started
We will start off by deleting the default plane, simply done by selecting it and hitting the , now add a UV sphere by hitting the spacebar and selecting Mesh from the menu. In the following menu choose UVsphere; this sphere will be our particle emitter.

To add particles to this object we'll hit to go into the effects menu. Press the New effect button and choose the "particle" option in the pull down menu on the right. Voila! A lot of new buttons to play with. Don't be scared - we will only use a few of them in this tutorial!

playing with particles
First we will set the total number of particles to 500, this is simply done by holding and pressing on the "Tot:" button which is located in the top left corner of this menu (it is set to 1000 by default). Next we will set the start and finish frame on which the particles should be emitted from the sphere.

Set the start frame to 25 and the end frame also to 25. This is done because there is only 1 sudden explosion of particles; if you are creating a fountain you can set the end frame a number of frames later to create a more spray like effect. Both the start and end buttons are located to the right of the 'Tot:' button. Now look 2 buttonrows down for a button called Bspline and press it. The Bspline will make the motion of the particle smoother. Also press the Vect. button to the right of it. This will change the particles into lines instead of the normal points, which looks better for the look of firework were going for.

Now we will give the particles different forces to make it act a bit more like firework. Look in the purple colored row of buttons, the first one is called Norm: this stands for normals, and is for the initial speed at which the particles will be emitted. Set it to 0.300. The Rand: button is located 2 buttons to the right , which is for the randomness in the particles. We don't want the particles to be emmitted in perfect straight lines because that doesn't look natural; to add some chaos to the particles set this button to 0.200. The last button in this purple row is the Damp: button, this button dampens (you might have guessed this:) the initial speed of the particles, so instead of always going the same speed, the further away they get from the sphere the more they will lose speed until they have none left. Set the button to 0.600.

The last thing we need to do for the movement of the particles is to add a little force to them to simulate gravity doing its job, look in the lower left corner of the fx menu, 3 buttons called X, Y and Z are located there, Set the Z to negative fifty, or -0.050 in numbers. If you hit now you can see the animation, as you might see the particles don't seem to appear from every vertex on the sphere, to fix this little problem go into edit mode by pressing and select every vertex by hitting the key. Next up we press to get into the edit menu, now look for a button called Hash on the bottom row, once found we press it :) We go out of edit mode by pressing once again. Hit again and voila a burst of nicely distributed particles!

If you press now to render an image you will see a big mess off particles, this doesnt look very nice now does it? this is mainly because the camera is to close to the action and because we havent assigned a material to the particles yet.

To fix the first problem make sure you're still in topview (), select the camera with and grab it with while holding down . Now we can move the camera 1 grid unit at a time, move it 15 units down and click to place it there. Render another picture, much better if I say so myself :)

Now on to fix the second problem: the material. Make sure you have selected the sphere and hit to head to the material menu, Once arrived we will add a new material, this is done by clicking on the button with a '-' sign on it.

First we'll select a color, i chose orange, but you can choose what ever color you want as long as their bright. Once we've done this look to the right of the RGB sliders to the purple vertical row of buttons, now push the one that says halo this is a special material in blender meant for particles. To add the final touches to the material look to the left for the Alpha, Hard and Add sliders. Set Alpha to 0.650, Alpha is for the transparency of the halo, Hard to 127, this makes the halo look sharper and Add to 1.000, add will make it look like the halo is emitting light itself, which is what we want in our firework.

When we now render an image we can see how much improvement we have made over the previous rendering, As a nice touch to the material we will animate the Alpha value to let the halo's fade out as time passes. Make sure you're at frame 25, you can skip through frames with the and . With the mouse in the MaterialButtons hit the to insert a keyframe, a menu will appear with a number of choices, choose Alpha. Next up we will go to the last frame that the particles are visible on, in this case thats frame 74. Once arrived on frame slide the Alpha slider all the way down to 0.000 and insert another alpha keyframe. Were almost there!

To add the final touch to our firework we are gonna be using a second particles system with lamps dupliverted onto them. It sounds like a mouthfull and maybe even complicated but it isnt (trust me on this). We need this final step if we want to add this firework into a scene, real firework gives of light and ours doesnt yet, and thats what were gonna fix right now.

Start off by duplicating the original sphere, since we want our lamps to have the same motion. Next up we will reduce the number of particles in the second sphere, cause if we are going to be using dupliverts for this trick every particle will be replaced by a lamp, every particle you may ask? yes every particle :) Now if we didn't reduce the amount of dupliverted lamps the increase in rendertime would be quite dramatic as would the drop in framerate in youre 3d window. Of course if you want to you can knock yourself out with the amount of dupliverts or particles you can add. Just remember that if you're using a lot of dupliverted lamps to keep the original lamp at a very low energy level because every dupliverted lamp will have the same amount of energy.

With the new sphere selected, go to the fx menu and reduce the number of particles from 500 to 50. Add a lamp by hitting the spacebar and selecting lamp. Now select the lamp with and while holding select the sphere (also with ). Were now going to parent the lamp to the sphere by hitting . Go back to the fx menu and look on the left side, look for a grey button called DupliVerts and push it.

If you now look in the 3d window you will see that every particle emitted by the second sphere has a line beneath it, this is to indicate that the dupliverts are working. Select the lamp and go to the Lamp menu we will now play around with the lamp settings, the first thing we will do is lower the energy from the default 1.000 to 0.150. this will be more then enough (remember 50 lamps times 0.150 energy still creates a lot of light :)

Furthermore we will also add colour to the lamp by simply sliding the RGB sliders around, once again i chose a orange color since my firework material also has the same color. As a final touch to the lamps we will also animate the energy so that when they firework fades out the lamps will do the same, go to frame 25 and hold youre mouse over the lamp menu and press the to insert an energy keyframe, now go to frame 74 set the energy of the lamp to 0.000 and insert a second energy keyframe.

Your display of fireworks is now ready to be put in a scene! or you can render an animation to enjoy what youve created right away. To finish this up I'll take you through this as well (yes i know, i'm a nice guy ;). Press to go into the render menu. First we will select an output format, Aviraw is a good choice because most mpg encoders can handle it. Furthermore set the end frame to 90 instead of the default 250, otherwise we would be rendering a lot of black frames which we dont need. Beneath the big Render button is a button located called OSA , which is short for Oversampling, osa filters and anti aliases the final image which basicly means you're pictures will look nicer :)

Now before we hit the Big Anim button to render out the animation we need to give a name and path to the animation. This is done on the left side of the menu; there's a button located which says /render/ (not the big pink one). Click on it and fill in a name you want for the animation; I named it firework (yes I know, quite corny :) now hit to confirm the name, and YES we can finally press that big shiny anim button. Come on just press it, you know you want to! Allright while the animation is rendering get yourself a beverage and congratulate yourself on completing this tutorial.

Well give yourself a big cheer cause you've done great getting this far! To really wrap it up you might want to make a scene to place you're fireworks in, after all we're using lamps and lamps need objects to bounce their energy off. I've gone ahead and created a little scene for you.

In the first layer is the castle with some night lighting on it, in the 2 second layer are my fireworks, by simply duplicating the original piece of firework and giving them different colors and start and endframes I've created a variety of them. You can acces the layers by simply hitting the and keys, to have them both on at the same time select both layers while holding the key. You can download the scene right here or watch the mpg of it below. Hopefully you've learned some new features or just had a good time reading the tutorial.