From BlenderWiki

Jump to: navigation, search

[edit] Fireworks

Creating convincing fireworks in Blender using particles is really easy! Set up your first fireworks in 20 minutes.

Image:Particles-Tutorial-Fireworks-Vignette.png

[edit] Blender's Particles System - Short Intro

In a nut-shell, Blenders particle system allows creating and simulating fire, water, hair, grass, fog, smoke, explosions, bushes, rain, snow, waterfalls, sparks, bouncing rubber balls, flying pigs (yes, really), schools of fish, exploding objects, breaking glass and so on by setting up general rules on how the particles should behave and look.

Effective Use of Particles
Any mesh or part of a mesh can:

a) Work as a particle emitter, b) Be emitted in place of a particle and/or c) Affect other, already emitted particles.

In other words, when you want to animate or render a high number of similar objects which are all controlled by general rules and behaviour, there is a very good chance that Blender's particle system can do the job, saving you from the tedious job of animating thousands of small objects.


[edit] Fireworks: Step-by-Step

[edit] The First Particle System - The Rockets

  • Add a plane - Space AddMeshPlane
  • Scale it down - S
  • Go to the physics panels (F7Image:Manual-Part-I-Interface-Context-Object-Physics.png) and
  • In the Particle System panel, press New to add a particle system to the object.
  • Use the particle settings as specified below:
Settings for the first particle system

This is an Emitter-based simulation which will emit 5 particles evenly during frames 1 to 20 (so, every 4 frames a new rocket will shoot off). Name your particle systems based on what they are: click into the PA: field and enter "Rockets" as the name of the Particle system. For your first system, your Part field will read "1 Part 1", where the first number is the number of particle systems in the object. This number automatically increases each time you create a new particle system. The second number is the active particle system shown in the panel settings. Change between particle systems using the left/right arrows in the Part field. Note that Normal is set to 3 (with a little Randomness) and we are using Midpoint Dynamic simulation to control Velocity of the particles

My first particles!
  • View the scene from the side, NumPad 1 Make sure the animation is wound back to the first frame Shift and press Alt A to watch the particles fly. You should see 5 particles fly off the plane.
Modifying Particle Systems
If you make changes to the Particle System or Physics settings, you'll need to rewind the animation back to frame 1 and then restart the animation to make the changes take effect. However, sometimes the animation still does not change or stops completely. This is normally solved by selecting the Bake-tab and click the Free Cache-button to let Blender know that it should start calculating the particle trajectories from scratch again.


[edit] The Second Particle System - The Rocket Smoke

  • In the Particle System tab, click the right arrow in the top right field that say "1 Part 1" to select a new particle system slot for your object. The field will now read "2 Part 2". (The first number represents the number of particle systems currently attached to the object and the second number represents the particle system currently selected for editing.)
  • Use the particle settings as specified below:
Settings for the second particle system

Note that this is a Reactor-based simulation of 1000 particles which Emit From Particles randomly. Once emitted, each particle has a little X and Brownian (random) motion.

Particles emitting new particles!
  • Rewind Shift and animate Alt A and you should see an animation that looks something like the image at the right. New particles should be emitted from each of the original particles as they travel upwards.
  • Notice that after you have run through the particle simulation from frame 1 once, you can step through it frame by frame by using and for single frames and and for steps of 10 frames and Shift and Shift for skipping to the start frame and end frame of the animation. The current frame number is shown in the 3d viewport.

[edit] The Third Particle System - The Rocket Explosions

  • In the Particle System tab, click the right arrow in the top right field that say "1 Part 1" to select a new particle system slot for your object.
  • Use the particle settings as specified below:
Settings for the second particle system
Notice the setting of Death as the event on the target particles (the first particle system) on which this third particle system should react and start working. This means that the third particle system will come into play each time a particle in the first system dies.
Exploding rockets
  • Rewind Shift and animate Alt A and you should see an animation similar to the one to the right.
  • Excellent! We have something similar to fireworks going on. Switch between the 3 particle systems added to the plane by using the 3 Part x button in the Particle System panel and experiment with the physics settings on the rocket, rocket smoke and rocket explosion to make the rockets go longer, emit more smoke, move in a curve affected by Acceleration values in the x,y or z direction.

Now, on to adding materials to our particles!

[edit] Using Objects As Particles

[edit] Materials

On to the fun part. The particle systems are now nicely up and running and the good news is that the particles and particle mesh can be equipped with materials. Moreover, you can also use an object in place of each particle and this is what we'll do now.

Initially, particles emitted from a mesh takes on the mesh material.

[edit] Rocket mesh and material

You'll create a red rocket cylinder that will disappear as the third particle system "explodes".

  • Create a cylinder with 8 faces capped ends about 1 unit long and half a unit wide - Space Add Mesh Cylinder
  • Give the rocket object a name - Press F7Image:Manual-Part-I-Interface-Context-Object.png. Change the object name (OB:) to "Cylinder" and press Enter
  • Select the plane and go back to the first particle system in the list - Press the left arrow until the label reads "3 part 1"
  • Set the cylinder as visualization object for the particle system -
    Particle Visualization - 1 of 3
    Go to the Visualization panel and select Object from the drop down menu. Then fill in the name of the object in the OB: text field. You should find that each of the 5 rocket particles are now replaced with our rocket object.
  • Make the rocket point along the particle trajectory - Select the rocketR and move the mouse until the rocket has a suitable position or N and type in the rotation values directly into the panel fields.
  • Hide the master rocket - Ctrl M click on layer 2 to move the master rocket out of view to layer 2.
  • Set rocket color to red - Press F5 Image:Manual-Part-I-Interface-Context-Shading-Material.png and click on the red ball icon, select the Materials panel and click on then light gray rectangle to select a color.

[edit] Rocket Smoke Material

You'll create another material for the plane mesh and use it in the particle visualization.

  • Create another material for the plane mesh - F9 and in the Links and Materials panel, below the "1 Mat 1" label, click the new button to create another "Material Index" for the mesh.
  • Create a gray rocket smoke - Go to Shading (F5 Image:Manual-Part-I-Interface-Context-Shading-Material.png. In the Links and Pipeline panel click the right arrow in 2 Mat 1 once until it says 2 Mat 2 and select the material created in the previous step from the MA: dropdown. (You can change the name to something a little more suitable by typing directly into the dropdown and press Enter when you're done.) In the Render Pipeline, select the Halo-button.
Material Settings - 2 of 3
Particle Visualization - 2 of 3

[edit] Rocket Explosion Material

You'll create another material for the plane mesh and use it in the particle visualization for the third particle system.

  • Create another material for the plane mesh - F9 and in the Links and Materials panel, below the "2 Mat 2" label, click the New button to create another "Material Index" for the plane mesh.
  • Create yellow rays material - Go to Shading (F5 Image:Manual-Part-I-Interface-Context-Shading-Material.png). In the Links and Pipeline panel click the right arrow in 2 Mat 1 once until it says 3 Mat 3 (which means we're currently editing the third mesh material we created in the previous step) and select the material created in the previous step from the MA: dropdown. (You can change the name to something a little more suitable by typing directly into the dropdown and press Enter when you're done.) In the Render Pipeline, select the Halo-button. The material settings should look like this:
Material Settings - 3 of 3
  • Use the new material on the particle system - F7Image:Manual-Part-I-Interface-Context-Object-Physics.png and use the following settings in the Visualization panel. Note that the material number corresponds to the material number in the Links and Pipeline panel.:
Particle Visualization - 3 of 3

[edit] Render Animation

Excellent! Almost done, now.

  • Render the animation - Go to scene button panels F10 Image:Manual-Part-I-Interface-Context-Scene-Render.png. In the Anim panel, click the Anim-button (or Ctrl F12) to render the animation in it's full glory and press the Play-button (or Ctrl F11) to view the animation when it's done rendering. Press Ctrl F3 to save the animation.

Congratulations! You have now learned to create basic fireworks using Blenders new particles system. Go on and experiment with various settings in the particle system panels to create even more advanced fireworks. For instance, consider lauching fireworks from a moving vehicle, make a yellow lamp act as the flame and illuminate the smoke emitted from the rocket or make a lamp flash at the center of each explosion for 0.5 seconds to illuminate the rest of the ground more realistically. It is also possible to make each rocket be different by letting the particle system pick a rocket object at random from a group of various rocket objects for each emitted rocket particle.

This is what the fireworks should look like

[edit] See Also