Jump to content
Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Sign in to follow this  
Rss Bot

How to simulate explosions in Maya

Recommended Posts

Explosions are a huge part of our entertainment, from video games to action films. However, most of the explosions you see on screens aren’t real.  

There are a lot of things that go into simulating an explosion. You have to think about the units you’ll be using, and consider the fuel that’s supposedly igniting it. You also have to think about how high the impact will go, the colours that’ll show up and the directions it’ll travel in. All these things and many more combine to give you the perfect explosion that looks stunning on the screen.

In this tutorial, I'll show you how to craft a realistic explosion using Maya’s nParticles and FumeFX.

01. Fire up FumeFX

4ZXGWLdtBnnVzfDyCGdVCh.jpg

Click the icon in the top right to enlarge the image

FumeFX is easy to use with solid built-in tools. It has great interaction with V-Ray and other renderers, making it the go-to option for the industry in both production and video game design. The latest version claims that it works up to twice as fast as version 3.0, so it’s also a great solution for optimising your workflow.  

02. Optimise the scene

RPntsukPQ5CZ5cVnY9rzDh.jpg

Click the icon in the top right to enlarge the image

By having a car going towards the origin point to capture velocity, it can interact with particles at a high speed to make an explosion look realistic. If you want to do something similar, you should optimise your geometry. Make a low-res version of your geometry to use in the simulations, then later it can be replaced with a high-poly version when it comes to rendering.

03. Decide your scales

HZo67pRmz7zfLoVWheX8Bh.jpg

Click the icon in the top right to enlarge the image

Before you get to any of the simulations, you must have a working set-up. You should decide on the unit you’ll be using. Centimetres are good but metres are even better for real-world scale. Use a scale reference, such as a human being, to make sure all of your simulations and objects are proportional. If the scale is off then it won’t look realistic.

04. Generate Particles

2kTEHhrmpcSPhkRuTFPpBh.jpg

Click the icon in the top right to enlarge the image

FumeFX needs something to burn – some sort of initial geometry that the fire of the explosion will come from. So, generate nParticles by changing Maya’s interface to the FX module, going to the nParticles menu and selecting Create Emitter. This gives you an Omni emitter to generate a point or sphere, depending on the version of Maya. These particles will be ignited later on.

05. Ground Plane and Self Collision

Mgu2yDQm6gVb7BkkR7yQCh.jpg

Click the icon in the top right to enlarge the image

Now you need to create an explosion from the particles. The first thing is to add a ground plane. Go to the Nucleus node and then Ground Plane. There, check the Use Plane option and it’ll add an infinite plane for the particles to interact with. Go to the nParticleShape node and under Collisions, make sure Self Collide is checked. You should have a stream of particles on the ground.

06. Change to Volume Emitter

nLUWoftKeXM6iDrJZa4NCh.jpg

Click the icon in the top right to enlarge the image

Go to the Emitter node and under Basic Emitter Attributes, change the Emitter Type to Volume. Afterwards, under Volume Emitter Attributes, change the Volume Shape to Sphere from Cube. Under the same tab, set the Volume Sweep to 180. You should have a hemisphere that’s emitting particles at 180 degrees.

Take the Emitter and rotate it to make sure that the flat side of it is parallel to the ground, where you can then place it. This will give you the basic ‘shape’ of the explosion as it interacts with the scene.  

07. Set the Particle Rate

JJvq5QLnjUSqoZnzKRcfY3.jpg

Click the icon in the top right to enlarge the image

You should have a puddle of particles on the ground, being generated from the Volume Emitter. Let’s make some changes to the particles. Go to the Emitter and change the Rate to something high, like 6k to 10k. Don’t worry about the resource usage on your computer, you’ll only be emitting the particles for a frame or two. Go to the nParticleShape. Set the Particle Size to something comfortable that you can view easily. This will help you to gauge how your explosion is behaving within the scene.

08. Particle production

r3rMFmPKNgqCJuAWgSkyY3.jpg

Click the icon in the top right to enlarge the image

In the Emitter node, key in the Rate. Before the frame you want the explosion to happen, set the Rate to 0 to ensure that no particles are born before that frame. In the frame of the explosion, set to your desired Rate, for example, 6,000. Then set the following one or two frames to that same high rate.

09. Ending particle production 

WWZgxjq9d2T8HppPH9SuV3.jpg

Click the icon in the top right to enlarge the image

After you’ve started the explosion, you should have three keys. In the frame you want the explosion to end, set another key for 6,000 and set it to 0 in the next frame to make sure the particle production stops abruptly. You can also make the Emitter smaller or bigger to control the size of the explosion. This won’t affect the velocity of the particles, just the timeframe in which they begin, continue exploding, and abruptly stop.

10. Adjust the particles’ lifespan

84w2nVM3oUGbm4nsyKu9Z3.jpg

Click the icon in the top right to enlarge the image

Go to the nParticleShape and under Lifespan, change the Lifespan mode to Random range. Set the Lifespan value to something like 0.2 or 0.3 and the Lifespan Random to a similar value. You can use your own values according to your settings – you want the particles to be generated, then stop, and start dying, but feel free to to tweak the timing.

11. Tweak particle velocity

26MJGmw95Gttq9YkbdzhZ3.jpg

Click the icon in the top right to enlarge the image

You can’t make the particles slow down (move outwards slower) under the Basic Emitter Speed Attributes since the Speed attribute is greyed out, thanks to the Emitter type being set to Volume. So, to change the velocity, go to the Volume Speed Attributes tab and change Away from Center as required. Some particles should move at different speeds for added realism.

12. Create the FumeFX node

iViN9wMXE4Vyfx4QyEHrsT.jpg

Click the icon in the top right to enlarge the image

You should have a dome of particles being generated, spreading out and dying, some moving at different rates to others. Next, you can start simulation in FumeFX. Simply go to the FumeFX shelf and click the icon on the far left that’s called Create FumeFX node. A cube should appear in the scene. This is the working area of the simulation – the area where the simulations will be calculated.

13. Optimise the FumeFX node

bv9HKLeqHCyiFur2H2BZsT.jpg

Click the icon in the top right to enlarge the image

Click the newly formed cube. You should be in the fumeFXShape node. First, set the Width, Length and Height to fix the explosion area better. Then you can focus on the Spacing. The lower the spacing, the better and more resource-heavy the simulation will be.

14. Further optimisation

QPvoTqGHsTafjZ7enuxstT.jpg

Click the icon in the top right to enlarge the image

The Boundless setting has an X, Y and Z setting. Change it to +Y to make sure the simulation goes as high as possible. In the same area, you’ll find the path where the simulation data will be saved, often in gigabytes. In the Viewport tab, you can also set whether or not to see the simulation in the viewport.

15. Particle source in FumeFX

S7Ucp8VQuXp7KGEd3iFurT.jpg

Click the icon in the top right to enlarge the image

Now you can generate the first simulation. Make sure you have the FumeFX shelf selected and then, from the Outliner, select the nParticles object. With that selected, click up in the shelf to the fourth button from the left. You will have a new object in the Outliner that ends with ‘_source’. FumeFX now knows that these particles are to be ignited during the simulation.

Next page: Add turbulence and sparks, and finish up your explosion

16. Caching the particles

yCWz3zriHuYzLJy5wDoatT.jpg

Click the icon in the top right to enlarge the image

Select the nParticles Object from the Outliner and go up to the nCache bar. Select Create New Cache>nObject. This will re-simulate the particles you created and store them in the computer to make them easier to use again and make sure nothing changes in the simulation over time. If you want to delete a previous Cache, you can do so via nCache>Delete Cache.

17. The first bang

MPYdrDHHVasXzHT8c2GQJd.jpg

Click the icon in the top right to enlarge the image

Select the fumeFXShape node again. You should see some icons: a picture frame and a play button. Click the picture frame to open the simulation display, then click the play icon to start the simulation. If your explosion looks more like burning debris than an explosion, you need to go to the particle_source object and change the Radius to give it a bit more oomph. Experiment until it looks right.

18. Create sparks

YDW8b53Ho9wXZFkqkiViHd.jpg

Click the icon in the top right to enlarge the image

To create sparks flying off the explosion, create another Emitter. You’ll need to go through all the steps again but this time, generate fewer particles, speed them up, and make them live longer. Create a second particle_source and connect it to the main FumeFX node by going to the relationship editor in the node and selecting the second particle_source as well. This is optional, though.  

19. Burn rate

mcBxSJ2qHwJm5Y8i4iQYJd.jpg

Click the icon in the top right to enlarge the image

If the explosion seems to end too quickly, go into Simulations>Fuel>Burn Rate and edit that. If you’re playing with settings, run a simulation after every single tweak.

20. Adjust Turbulence Noise

GNpqTbNdePTMevRYja4BKd.jpg

Click the icon in the top right to enlarge the image

If your explosion looks too small you can use two settings: Vorticity and Turbulence. In the FumeFX node, under Simulation>Turbulence Noise, make the Scale smaller and play with the Detail slider. This brings more detail into the explosion, making it appear bigger. You may find that you need a larger or smaller number for your scene.  

21. Adjust vorticity

b3KEUbcv4tv8fMGswqtDJd.jpg

Click the icon in the top right to enlarge the image

In FumeFX node under Simulation>System, you’ll find the settings for Vorticity. This means the small orbiting bubbles that form due to the rising hot air. Change the Vorticity type to Vorticity II and play with the Vortices Scale to find a good look for the explosion.  

22. Tweak smoke

EgXZ5DZR6eLNK3SdmF3RX9.jpg

Click the icon in the top right to enlarge the image

Mosts explosions won’t look right without the smoke. To tweak this, go to Simulation>Fuel and turn on Fire Creates Smoke. You’ll also find Smoke Density under that, plus a tab dedicated to Smoke. The settings in there are fairly straightforward. Smoke Buoyancy, for instance, makes the smoke rise up. while Dissipation Strength controls how quickly the smoke disappears.  

23. Prepare for Render

w2qedNotNf8qWCBMjL4xU9.jpg

Click the icon in the top right to enlarge the image

At this point, you probably have a nice explosion that runs perfectly but doesn’t look all that good. Some settings still need editing before rendering. In the FumeFX node, you’ll find a tab called Rendering Settings, which contains sub-tabs for Fuel, Smoke and Fire. Explore these settings to learn more.  

24. Experiment with fire

smAyXFLcgEaUnLpPRC3aU9.jpg

Click the icon in the top right to enlarge the image

The colours of the fire generated from the explosion are driven by a gradient by default. You’ll find it in FumeFX>Rendering Settings>Fire>Fire Color Tab. From left to right, the colours show how the fumes will progress. The ideal look is hotter at the centre. Experiment to see what looks best. Also, the Intensity setting in Fire affects the alpha channel.

25. Edit smoke

bj324pJWQKbHn9bbA5feV9.jpg

Click the icon in the top right to enlarge the image

Making changes to the Rendering Settings doesn’t mean redoing the entire simulation. You’ll even see the impact of your changes in real-time in the FumeFX Preview window. To edit the gradient of the smoke, go to FumeFX>Rendering Settings>Smoke>Smoke Color Tab. Try darker colours – from 20 to 40 – as explosions usually have dark smoke.

26. Remember to simulate

qWSNzdoYJqfNMKZEhsjeU9.jpg

Click the icon in the top right to enlarge the image

Rendering the explosion is fairly simple. You can use lights from your rendering engine of choice to make the explosion more realistic. If the explosion doesn’t cast shadows by default, you can find these settings in the Rendering Settings tab as well. You can create a number of amazing things using these techniques, just remember to simulate after every single tweak. Continue tweaking until you’re happy with the outcome.

This article originally appeared in 3D World issue 223. Buy it here.

Related articles:

View the full article

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×