DIY Explosions part 2

The Not-So-Basics

Now that we're done creating our exploding object, let's work on adding a bit of smoke and flames. We start with the scene that we did in the first part of this guide.

00start

To make our smoke/flames, we use Maya's dynamic fluid system. Click on Fluid Effects>Create 3D Container>box (Where 'box' denotes the little box that brings up the options window).

01fluidcreate

Increase the X, Y, and Z sizes to around 15. Keep the rest of the options the same for now. Click on 'Apply and Close' and then move the box up so that the shattering sphere is at the center.

02fluidopts

Now, we're going to be playing around with a lot of different parameters to make our smoke cloud look right, so don't be afraid to experiment.

In the Attribute Editor, scroll down to the Shading options. Change the color so that it looks like the gradient for fire. Do the same for incandescence. Change their input methods to 'center gradient' so that our colors propagate radially outward.

03colors

Next, we edit the opacity. Change it so that it remains fairly constant towards the center, and then quickly drops off towards the edges. Also change the opacity input to 'center gradient'. Finally, change the opacity input bias to make our point cloud smaller.

04opacity

At this point, it would probably be better for us to constantly preview the color and shading changes that we're making. Click on the perspective view and press '6' to turn on previewing for colors and textures.

05preview

Let's work on texturing our cloud a little bit. Scroll down to Textures in the Attribute Editor and enable texturing for color, incandescence, and opacity. Adjust the gain values and the depth. Also try adjusting the frequency, and choosing different texture types.

06textures

Right now, our flame cloud is a little too red. Let's go back to the colors and adjust them a bit. Also change the dropoff shape in Shading to sphere.

07adjust

Our rendered frame (with the background set to black) will look something like this.

08rendered

Next, we increase the shading quality. Scroll down to Shading and increase the quality to around 3. Also vary the contrast tolerance.

09shading

You don't have to get the parameters exact for now, because we still need to animate our cloud. Our shattering sphere starts shattering on frame 4, so let's go to frame 4 first. Set the Opacity Input Bias to -1, right click on Input Bias, and select Set Key.

10opacitykey

Go to the next frame (frame 5). Set the Opacity Input Bias to -0.7, and create another keyframe. Also keyframe the Color and Incandescence input biases so that the cloud just barely covers the sphere and the exploding particles, and the color is mostly white.

11colorkeys

Now, step forward a number of frames, until the sphere has shattered and its pieces have been pushed outward. Adjust and keyframe the opacity input bias so that the shards have just barely escaped the flame cloud. Adjust and keyframe the Color and Incandescence so that we have a yellow and red fireball. At this point, you'll notice that we're almost at the boundary of our container fluid, so scroll back up and adjust the container's width, height, and depth values to make it bigger.

12fireball

Readjust the Opacity input bias to make our fireball the size it was before we made the container bigger. You might also have to readjust some color values.

Step forward another handful of frames. This will be where we set the maximum extent of the fireball. Adjust and keyframe the Opacity input bias to reflect this desired size. Set the colors to be slightly darker than before (still red and yellow, but with a tinge of black smoke at the edges). Render your frames to see what the actual image looks like.

13fireedge

Step forward again to where you want the fireball to start dying. Set the Color and Incandescence biases to be all the way to the left (-1). Refrain from adjusting the opacity, except to compensate for weird effects caused by adjusting the color.

14graycloud

Finally, go to the end of the sequence. Make the cloud disappear by setting the Opacity input bias to -1.

15disappear

Render your animation sequence just as we did in the last tutorial.

Watch the rendered video here

That's it! You can use the concepts discussed here to create more elaborate scenes. For instance, to make a building explode, you can build pre-shattered planes for floors, and pre-shattered columns to support the floors. You can also make pre-shattered glass for the walls. Finally, after putting everything together, you can use a particle emitter like we did to make a certain part of the building explode. You can also use gravity fields to pull the debris downward, towards the ground plane.

Note that these guides contain some elements from other Maya tutorials, like on shading, compositing, using particle emitters and fluids, etc. Maya also has a 3D fluid preset for explosions that you can take a look at.


2011-03-29 17:43