Hostingheaderbarlogoj
Join InMotion Hosting for $3.49/mo & get a year on Tuts+ FREE (worth $180). Start today.
Advertisement

Creating Fireworks With Particles in Maya

by
Gift

Want a free year on Tuts+ (worth $180)? Start an InMotion Hosting plan for $3.49/mo.

In today's tutorial Chandan Kumar will introduce you to working with particles in Maya, and show you how they can be used to create a cool looking fireworks animation rather quickly. Topics include, preparing your scene for animation, working with particle emitters, fine tuning your settings to achieve a specific look, creating and apply materials, adding glow effects, rendering image sequences and finally, how After Effects can be used to turn that image sequence into a final animation.


1. Preparing The Scene

Step 1

Let’s open the Maya software (I’m working in Maya 2011.)

Fireworks_In_Maya_1

Step 2

First of all, let’s set the Timeline Length to 300 frames, because we want the fireworks simulation to stay longer in the viewport.

Fireworks_In_Maya_2

Do a Right-click on the timeline and go to the Playback Speed flyout menu, then turn on the Play Every Frame, Max Real-Time option.

Fireworks_In_Maya_2a

Step 3

Here, we’ll use ‘Mental Ray’ for rendering the particles simulation in better quality. So, click on the indicated icon on main status bar to open the Render Settings window.

Fireworks_In_Maya_3

Step 4

In the Render Settings window, click on the Render Using drop down menu arrow button and then choose mental ray as the renderer.

Fireworks_In_Maya_4

Now, click on the Common tab and choose PNG(png) as the Image Format and set the Frame padding to 3.

Fireworks_In_Maya_4a

Inside the Frame Range group, keep the End frame at 300 and then close the Render Settings window.

Fireworks_In_Maya_4b

Step 5

Now, since we will be working with particles, change the mode to Dynamics to access the particle menu items.

Fireworks_In_Maya_5

Step 6

Next, we'll open the ‘Outliner’ window which we'll use for organizing the particle objects. So, go to the Window menu and click on the Outliner command.

Fireworks_In_Maya_6

This opens the Outliner window (keep it open.)

Fireworks_In_Maya_6a

2. Creating The Particles

Step 1

Now, go to the Particles menu and click on the Create Emitter options box.

Fireworks_In_Maya_7

This will open the Emitter Options window. Here keep the Emitter type as Directional, and then click on the Create button.

Fireworks_In_Maya_7a

Step 2

It creates a particle emitter on the grid. Rename it as "Pre1_Rocket_emitter" and "Pre1_Rocket_particle" in the Outliner window.

Fireworks_In_Maya_8

Step 3

Press the Play button to test the particle animation. You will notice the particles travel in the X direction, while the emitter travels in the Y direction.

Fireworks_In_Maya_9

Step 4

To fix the problem, first select the particle object and press Ctrl+A to open the Attribute Editor. Now on the Pre1_Rocket_emitter tab, keep the Direction Y value at 1.00 under the Distance/ Direction Attributes, and set the Speed to 20 under the Basic Emission Speed Attributes.

Fireworks_In_Maya_10

Step 5

Also keep the Spread value at 0.300 under the same Distance/ Direction Attributes, to spread the particles properly for the rocket fireworks.

Fireworks_In_Maya_11

Step 6

Now, inside the Pre1_Rocket_particleShape tab, under the Render Attributes rollout, change the Particle Render Type to Spheres.

Fireworks_In_Maya_12

Step 7

Again, under the Render Attributes rollout inside the Pre1_Rocket_particleShape tab, click on the Current Render Type button and then change the Radius value to 0.150.

Fireworks_In_Maya_13

Step 8

You will notice the particle spheres are now looking small. This is what we need.

Fireworks_In_Maya_14

Step 9

Now we’ll add particles for the rocket trails. So, first select the rocket particles we created earlier, open the Fields menu and click on the Gravity options box.

Fireworks_In_Maya_15

This opens the Gravity Options box. Here you can change the Magnitude value (or you can do it in the ‘Attributes’.) Then click on the Create button to apply this command.

Fireworks_In_Maya_15a

Take a look at the animation of the particles. It’s not coming out good right now... we need to tweak it more.

Fireworks_In_Maya_15b

Step 10

Again, inside the Pre1_Rocket_particleShape tab, under the Lifespan Attributes group, change the Lifespan Mode to Constant and the Lifespan value to 1.500.

Fireworks_In_Maya_16

Step 11

Now, for the explosion, we need to create more particles. So, select the rocket particles and open the Particles menu. This time select the Emit from Object options box.

Fireworks_In_Maya_17

This opens the Emitter Options window. Here change the Emitter type to Omni and then click on the Create button to apply.

Fireworks_In_Maya_17a

Step 12

Now, rename the new particles and the emitter respectively as "Pre1_Fragments_particle" and "Pre1_Fragments_emitter" in the Outliner window.

Fireworks_In_Maya_18

Step 13

Now take a look at the new particle animation. It's now looking like trails. But, we need to make a fragmented explosion.

Fireworks_In_Maya_19

Step 14

To fix this problem, first select "Pre1_Rockete_particle" from the Outliner, then open the Particles menu and click on the Per-Point Emission Rates command.

Fireworks_In_Maya_20

Step 15

Again, with "Pre1_Rocket_particle" selected, press Ctrl+A to open it's Attribute Editor panel. Here, inside the Pre1_Racket_particleShape tab under the Per Particle (Array) Attributes rollout, there is one option: 1 Fragments Emitter Rate PP.

Fireworks_In_Maya_21

Right-click on 1 Fragment Emitter Rate PP, and select Create Ramp in the flyout menu.

Fireworks_In_Maya_21a

Step 16

Again Right-click on 1 Fragment Emitter Rate PP, select <-arrayMapper1outvaluePP and then choose Edit Ramp.

Fireworks_In_Maya_22

Now, in the Ramp Attributes, change the upper slot to White and the bottom slot to Black. And then change the Interpolation to None. It should now look like this.

Fireworks_In_Maya_22a

Again Right-click on <-arrayMapper1outvaluePP and choose Edit Array Mapper to open it's attributes.

Fireworks_In_Maya_22b

Now in the Array Mapper Attributes, keep the Max Value at 700.00.

Fireworks_In_Maya_22c

Step 17

Inside the Pre1_Fragments_Emitter attributes tab, and under the Basic Emission Speed Attributes rollout, keep the Speed at 8.00 and the Speed Random value at 1.200.

Fireworks_In_Maya_23

Step 18

Now, with the Pre1_Fragments_Particles selected, go to the Fields menu and select the Gravity command to apply gravity to the selected fragment particles.

Fireworks_In_Maya_24

Inside the Gravity Field Attributes group, change the Magnitude value to 3.00.

Fireworks_In_Maya_24a

Step 19

With the same Pre1_Fragments_ParticlesShape selected, change the Conserve value to 0.900.

Fireworks_In_Maya_25

Step 20

With the same Pre1_Fragments_ParticleShape selected, change the Lifespan Mode to Random Range and then the Lifespan and Lifespan Random values to 1.5 and 0.500 respectively.

Fireworks_In_Maya_26

Step 21

Now, we need to create the trails for the rockets. So, select Pre1_Racket_particle in the Outliner and then go to the Particles menu and choose Emit from Object to emit the particles.

Fireworks_In_Maya_27

Rename the newly created particle system to "Trail1" in the Outliner window.

Fireworks_In_Maya_27a

Step 22

Again, with the Trail1 particles selected, open it's Attributes Editor. Inside the emitter1 tab, keep both the Max Distance and Speed values at 0.100.

Fireworks_In_Maya_28

And then under the Basic Emitter Attributes, change the Rate (Particles/Sec) value to 500.0.

Fireworks_In_Maya_28a

Step 23

Now, select TrailShape1 in the Attribute Editor and under the Lifespan Attributes group, change the Lifespan Mode to Random Range and the Lifespan Random value to 0.500.

Fireworks_In_Maya_29

With the same TrailShape1 selected, go to Render Attributes and change the Particle Render Type to Cloud (S/W) and then click on the Current Render Type button. Also change the Radius value to 0.050.

Fireworks_In_Maya_29a

Step 24

Now, with Pre1_Fragments_Particle selected, go to the Particles menu and choose Emit from Object to create new particles.

Fireworks_In_Maya_30

This time, rename the newly created particles to "Spark1" in the Outliner window.

Fireworks_In_Maya_30a

Step 25

With the newly created particle emitter selected, open it's attributes and change the Max Distance value to 0.100 and Speed to 0.100.

Fireworks_In_Maya_31

Step 26

With the Spark1 particles group selected once again, click on the SparkShape1 attribute and in the Render Attributes group, change the Particle Render Type to Cloud(S/W) and then the Radius value to 0.050.

Fireworks_In_Maya_32

Again, inside the Lifespan Attributes rollout, change the Lifespan Mode to Random range, the Lifespan value to 1.500 and the Lifespan Random value to 0.500.

Fireworks_In_Maya_32a

Under the General Control Attributes, change the Conserve value to 0.100.

Fireworks_In_Maya_32b

Step 27

Now, we have to hide some particles which should not be visible in the viewport. So, first select the Pre1_Rocket_Particleshape node attributes and then inside the Object Display group, turn Off the Visibility option to hide them.

Fireworks_In_Maya_33

Do the same for the Pre1_Fragments_Particleshape node attributes, and turn Off the Visibility option to hide them.

Fireworks_In_Maya_33a

3. Creating The Materials

Step 1

Now we will apply material shades to the particles. So, first select the Trail1 particle group, Right-click and hold it down in the viewport, then choose the Assign New Material command in the fly out menu.

Fireworks_In_Maya_34

This opens the Assign New Material window. Here choose the Particle Cloud node.

Fireworks_In_Maya_34a

Step 2

Now, rename the Particle cloud to "Trail1_Shader" and also change it's color to Blue or something as you wish.

Fireworks_In_Maya_35

Then click on the Life Transparency checker box and in the Texture Node, select the Ramp texture node.

Fireworks_In_Maya_35a

Now, in the Attribute Editor of particleSampler Info1, click twice on the Input/Output connection button to open the Ramp Attributes.

Fireworks_In_Maya_35b

This opens the Ramp attributes panel.

Fireworks_In_Maya_35c

Step 3

Now, in the Ramp Attributes, keep the upper shade as White and bottom shade as Black, as shown in the image below.

Fireworks_In_Maya_36

Step 4

Now, click on the Input/Output connection button and then jump into the Trail1_Shader attributes. And click on the Life Incandescence checker box to connect the Ramp.

Fireworks_In_Maya_37

This time change the upper shade to Black and the bottom shade to White.

Fireworks_In_Maya_37a

Step 5

Next, jump into the Trail1_Shader tab in the attribute editor, and change the Glow Intensity value to 0.500.

Fireworks_In_Maya_38

Step 6

In same way, we have to apply the shader node onto the Spark1 particles. So, with the Spark1 particles group selected, Right-click on the viewport and then choose Assign New Material in the fly out menu.

Fireworks_In_Maya_39

After applying the Particle Cloud Shade node, rename it to "Spark_Shade1".

Fireworks_In_Maya_39a

Step 7

This time we change the particle shade color to Pink. Then, click on the Life Transparency checker box to connect the Ramp node.

Fireworks_In_Maya_40

Step 8

After applying the Ramp shade node, keep the upper shade as White and the bottom shade Black.

Fireworks_In_Maya_41

Again, click on the Input/Output connection button and jump again into the Spark_Shade1 attributes, and then click on the Life Incandescence checker box to connect the Ramp for this, which was created before in the trail shader. Apply the same Ramp texture node. This time, change the upper shade as black and the bottom shade as white.

Fireworks_In_Maya_41a

Step 9

Again jump into the Trail1_Shader attributes, and this time keep the Glow Intensity value at 0.200.

Fireworks_In_Maya_42

4. Rendering

Step 1

Let’s see what it looks like! Click on the Quick Render button in the Render View. It seems that we need to adjust the global glow effect.

Fireworks_In_Maya_43

Step 2

First click on the IPR render button in the Render View, and then drag to mark the test render area as shown in the image below.

Fireworks_In_Maya_44

Now, go to Window > Render Editors > Hypershade, to open the Hypershade window.

Fireworks_In_Maya_44a

Step 3

In the Hypershade window, select the Shader Glow node in the Materials tab to open the Shader Glow node attribute panel, as shown in the image below.

Fireworks_In_Maya_45

In the Shader Glow node attribute panel, you can adjust multiple things as per your needs. Here I have kept the Glow Intensity value at 0.500.

Fireworks_In_Maya_45a

Step 4

For multi-colored fireworks, I have created one more (in the same way) and changed its Shader Color to Yellow to make it look different.

Fireworks_In_Maya_46

Step 5

Now, we will start the rendering process to create the animated clip of the fireworks. So, open the Solvers menu and then click on the Create Particle Disk Cache options box.

Fireworks_In_Maya_47

In the Create Particle Disk Cache options box, check On the All radio button and then click on the Create button. It will take a couple of seconds to cache the animation.

Fireworks_In_Maya_47a

Step 6

Now, click on Quick Render to test one frame. It looks quite good now.

Fireworks_In_Maya_48

Step 7

Now, we’ll render all the frames in sequence. So, first change the mode into Rendering mode and then open the Render menu. Click on Batch Render to render the sequence for animation.

Fireworks_In_Maya_49

Step 8

Once we have rendered the image sequence, it’s time to make an animated clip with these still images. For this, open After Effects, go to the Composition menu and click on New Composition.

Fireworks_In_Maya_50

Step 9

Now, import the image sequence which we have rendered in Maya.

Fireworks_In_Maya_51

Locate the file sequence and select the 1st file and then click on Open. Remember, since you are importing the images as a sequence, always turn on the PNG Sequence option.

Fireworks_In_Maya_51a

Step 10

Now, all the images come into the project area as an image sequence. Select and drag it to the composition area. Now you can press play and see the animation. You can also do color correction and add extra glow if needed.

Fireworks_In_Maya_52

Step 11

Now, let’s render the animation to make it an animated clip. So go to the Composition menu and click on the Pre-Render command.

Fireworks_In_Maya_53

Then click on the Render button to render the selected layer.

Fireworks_In_Maya_53a

Conclusion

After rendering the clip, you will see a beautiful animation of colorful fireworks. You can always tweak and play with the parameters to get more interesting results.

Fireworks_In_Maya_54

Advertisement