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
Let’s open the Maya software (I’m working in Maya 2011.)
First of all, let’s set the Timeline Length to 300 frames, because we want the fireworks simulation to stay longer in the viewport.
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.
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.
In the Render Settings window, click on the Render Using drop down menu arrow button and then choose mental ray as the renderer.
Now, click on the Common tab and choose PNG(png) as the Image Format and set the Frame padding to 3.
Inside the Frame Range group, keep the End frame at 300 and then close the Render Settings window.
Now, since we will be working with particles, change the mode to Dynamics to access the particle menu items.
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.
This opens the Outliner window (keep it open.)
2. Creating The Particles
Now, go to the Particles menu and click on the Create Emitter options box.
This will open the Emitter Options window. Here keep the Emitter type as Directional, and then click on the Create button.
It creates a particle emitter on the grid. Rename it as "Pre1_Rocket_emitter" and "Pre1_Rocket_particle" in the Outliner window.
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.
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.
Also keep the Spread value at 0.300 under the same Distance/ Direction Attributes, to spread the particles properly for the rocket fireworks.
Now, inside the Pre1_Rocket_particleShape tab, under the Render Attributes rollout, change the Particle Render Type to Spheres.
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.
You will notice the particle spheres are now looking small. This is what we need.
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.
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.
Take a look at the animation of the particles. It’s not coming out good right now... we need to tweak it more.
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.
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.
This opens the Emitter Options window. Here change the Emitter type to Omni and then click on the Create button to apply.
Now, rename the new particles and the emitter respectively as "Pre1_Fragments_particle" and "Pre1_Fragments_emitter" in the Outliner window.
Now take a look at the new particle animation. It's now looking like trails. But, we need to make a fragmented explosion.
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.
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.
Right-click on 1 Fragment Emitter Rate PP, and select Create Ramp in the flyout menu.
Again Right-click on 1 Fragment Emitter Rate PP, select <-arrayMapper1outvaluePP and then choose Edit Ramp.
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.
Again Right-click on <-arrayMapper1outvaluePP and choose Edit Array Mapper to open it's attributes.
Now in the Array Mapper Attributes, keep the Max Value at 700.00.
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.
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.
Inside the Gravity Field Attributes group, change the Magnitude value to 3.00.
With the same Pre1_Fragments_ParticlesShape selected, change the Conserve value to 0.900.
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.
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.
Rename the newly created particle system to "Trail1" in the Outliner window.
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.
And then under the Basic Emitter Attributes, change the Rate (Particles/Sec) value to 500.0.
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.
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.
Now, with Pre1_Fragments_Particle selected, go to the Particles menu and choose Emit from Object to create new particles.
This time, rename the newly created particles to "Spark1" in the Outliner window.
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.
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.
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.
Under the General Control Attributes, change the Conserve value to 0.100.
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.
Do the same for the Pre1_Fragments_Particleshape node attributes, and turn Off the Visibility option to hide them.
3. Creating The Materials
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.
This opens the Assign New Material window. Here choose the Particle Cloud node.
Now, rename the Particle cloud to "Trail1_Shader" and also change it's color to Blue or something as you wish.
Then click on the Life Transparency checker box and in the Texture Node, select the Ramp texture node.
Now, in the Attribute Editor of particleSampler Info1, click twice on the Input/Output connection button to open the Ramp Attributes.
This opens the Ramp attributes panel.
Now, in the Ramp Attributes, keep the upper shade as White and bottom shade as Black, as shown in the image below.
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.
This time change the upper shade to Black and the bottom shade to White.
Next, jump into the Trail1_Shader tab in the attribute editor, and change the Glow Intensity value to 0.500.
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.
After applying the Particle Cloud Shade node, rename it to "Spark_Shade1".
This time we change the particle shade color to Pink. Then, click on the Life Transparency checker box to connect the Ramp node.
After applying the Ramp shade node, keep the upper shade as White and the bottom shade Black.
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.
Again jump into the Trail1_Shader attributes, and this time keep the Glow Intensity value at 0.200.
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.
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.
Now, go to Window > Render Editors > Hypershade, to open the Hypershade window.
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.
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.
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.
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.
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.
Now, click on Quick Render to test one frame. It looks quite good now.
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.
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.
Now, import the image sequence which we have rendered in Maya.
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.
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.
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.
Then click on the Render button to render the selected layer.
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.
Subscribe below and we’ll send you a weekly email summary of all new 3D & Motion Graphics tutorials. Never miss out on learning about the next big thing.Update me weekly