Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This page provides a step-by-step guide to for creating a gasoline explosion simulation in using Chaos Phoenix FD for Maya.

Introduction

...

Overview

...

UI Text Box
typeinfo

This is an Entry Level tutorial which requires no previous knowledge of Phoenix. A basic understanding of Maya would be helpful but is not a prerequisite for being able to follow along.

Section
Column
width40%

This tutorial is created using Phoenix 4.30 Official Release and V-Ray 5. You can download official Phoenix and V-Ray from https://download.chaos.com.

The instructions on this page guide you through the process of setting up a gasoline explosion simulation in Phoenix for Maya. By the end of the tutorial, you will be able to create your own

...

explosion

...

simulations, understand how the simulation interacts with other objects and will know the basics of editing

...

some of

...

the main settings

...

of the Phoenix Simulator.

To follow

...

the described steps, you will need

...

the Phoenix

...

for Maya plugin

...

 installed. If you notice a major difference between the results shown here and the behavior of your setup, please reach us using the Support Form.

This tutorial is a companion to go along with the QuickStart video posted on our YouTube channel.


To download project files:

UI Button
colorblue
icondownload
titleDownload Project Files
urlhttps://drive.google.com/uc?export=download&id=1Gd8ERPHFsbf0pD2DYQ9JpX9w_Q7A7i4M




Want to follow along but don’t have a license?:

UI Button
colorblue
newWindowtrue
icondownload
titleDownload Free Trial
urlhttps://www.chaos.com/free-trial?utm_campaign=docs-tutorials&utm_medium=website&utm_source=docs.chaos.com


Column
width60%
HTML
<iframe width="720" height="480" src="https://www.youtube.com/embed/L_UwP61dqis" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
UI Text Box
typeinfo
  • The video is created using Phoenix 3.0, but the text version of the tutorial is updated and uses Phoenix 4.30 Official. In any case of doubt you may refer to the text.
  • Another way to create a Gasoline Explosion is to use the newer and improved version of the Gasoline Explosion Toolbar Quick Setup preset which is included in the Nightly Builds since 16 Sep 2020.


System Units Setup

...

Scale is crucial for the behavior of any simulation. The real-world size of the Simulator in units is important for the simulation dynamics. Large-scale simulations appear to move more slowly, while mid-to-small scale simulations have lots of vigorous movement. When you create your Simulator, you must check the Grid rollout where the real-world extents of the Simulator are shown. If the size of the Simulator in the scene cannot be changed, you can cheat the solver into working as if the scale is larger or smaller by changing the Scene Scale option in the Grid rollout.

The Phoenix solver is not affected by how you choose to view the Display Unit Scale - it is just a matter of convenience.


Go to Windows → Settings and Preferences → Preferences → Settings and set the Working Units to Meters

Image Added

Scene Setup

...

In the following steps we will show how to create a gasoline explosion simulation with the Phoenix Gasoline Explosion Preset.

After that we will explain how to set the simulation manually step-by-step for greater flexibility and control.


Gasoline Explosion Preset

...

Section
Column
width40%

We will begin by using a quick Gasoline Explosion preset.


Create a Sphere with a Radius of 24.0 meters. This sphere will be the source of the explosion.

Column
width60%

Image Added


...


Section
Column
width40%

With the sphere selected, click on the Gasoline Explosion Preset button from the Phoenix Shelf.

Column
width60%

Image Added


...


Section
Column
width40%

Now press the Start Simulation button in the Shelf.

Column
width60%

Image Added


...


Section
Column
width40%

Let the simulation run for a few seconds and you will have a chance to see the results in the viewport, click the Stop button to end the simulation process.

Column
width60%

Image Added


...


Section
Column
width40%

Here is a GPU Preview of the simulation.

Column
width60%

Image Added


...


Section
Column
width40%

To enable the GPU Preview as seen in the picture, select the Phoenix SimulatorPreview rolloutGPU Shade PreviewEnable GPU Preview.

Column
width60%

Image Added

Manual Explosion Setup

...

Section
Column
width40%

Let’s take a look at setting up a gasoline explosion simulation manually.


If you are continuing from the preset steps above, select the Simulator and press the Clear Simulator Cache button from the Phoenix Shelf and then delete the Simulator and the Source objects from your scene.

Column
width60%

Image Added




Section
Column
width40%

If the sphere has been deleted, create a new Sphere with a Radius of 24.0 meters.


Click on the Create Phoenix Fluid Simulator button in the Phoenix Shelf and click and drag in the viewport to create a volume to encompass the sphere, while leaving some room for the explosion to spread. Move the sphere near the bottom of the Simulator's volume space. Make sure the sphere is still inside the volume.

Open the Grid rollout and set the following values:

  • Scene Scale: 1.0.
  • Cell Size: 1.0 m.
  • Size XYZ: [ 229, 123, 219 ].
UI Text Box
typenote

Use the Size attributes of the Simulator as opposed to simply scaling the Simulator container with Maya's Scale Tool, as that may adversely affect the simulation.

Column
width60%

Image Added


Image Added




Section
Column
width40%

Click the Create a Fire/Smoke Source button on the Phoenix Shelf and place the Source in your scene.

UI Text Box
typenote

The Source object is a 2D non-renderable icon, so size and placement are only important for being able to select the Source when needed.

Column
width60%

Image Added




Section
Column
width40%

Select the sphere and then shift-select the Source and click Add Selected Objects in the Attribute Editor.

The Object Set of the Source is used to specify the geometry in the scene that will be used to emit fluid into the Simulator.

UI Text Box
typenote

The Source node is where we control the Emitter properties, like the Emit Mode ant the Discharge. The sphere is the actual emitter of the fluid inside the Simulator.

Column
width60%

Image Added




Section
Column
width40%

Within the Fire/Smoke Source menu, we will disable Temperature and Smoke, as they will not be needed for this demonstration. Make sure Fuel is enabled.

Column
width60%

Image Added




Section
Column
width40%

Since we are creating an explosion that will use a large amount of fuel very quickly, we will need to increase the Discharge. The higher this number, the more fluid will be generated per second. In order to create the short but powerful burst of fluid, we will animate the Discharge.

Make sure you're at Frame 0, change the Discharge value to 2000, right-click on the Discharge tab and Set Key.

Then, go to Frame 1, change the Discharge value to 0.0, and set a keyframe.

Column
width60%

Image Added




Section
Column
width40%

Select the Simulator. In the Attribute Editor under the Grid rollout are located the parameters to control the resolution of the volume grid, which greatly affects the look and performance of the simulation.

Currently, there are about 6 million Total Cells. To save on simulation time during the iteration process, click Decrease Resolution several times until the Total Cells are around 825,000.


For more information regarding simulation resolution, please refer to the Basic Liquids QuickStart page.

Column
width60%

Image Added




Section
Column
width30%

Click the Start Simulation icon, and notice that the explosion does not happen. Select the Simulator and navigate to the Fuel rollout. Select Enable Burning.

Column
width70%

Image Added




Section
Column
width30%

Once again, if you click Start Simulation, you will see that the explosion is still absent. This is due to the Ignition Temperature being set at 600.0. This temperature is rather high. By default, Phoenix uses 300.0 as a default ambient temperature. Change the Ignition Temperature to a value slightly lower: 290.0.

Column
width70%

Image Added




Section
Column
width40%

Navigate to the Rendering rolloutSmoke Opacity tab and disable the Scale Opacity by Scene Units option.

Column
width60%

Image Added




Section
Column
width40%

Start the simulation and you will see a puffy preview. To see the explosion more clearly, navigate to the Preview rollout and turn on the GPU Preview by clicking Enable in Viewport.

Column
width60%

Image Added




Section
Column
width40%

Currently, the explosion is being cut off at the top and sides by the Simulator's Grid.

Adjust this in the Grid rollout by turning on Adaptive Grid by Temperature. Lower the Threshold temperature to 600.0 to ensure expansion based on the temperature of the fluid inside when it meets the specified threshold.

UI Text Box
type

 

Align
aligncenter
HTML
<iframe width="960" height="540" src="https://www.youtube.com/embed/L_UwP61dqis" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>

 

...

 

Tutorial Assets

To download the files used in this tutorial, please click the button below.

 

UI Button
sizelarge
icondownload
titleDownload Project Files
urlhttps://drive.google.com/uc?export=download&id=1HgjJj8PSt02P4QM5LAaTHJ0FecCCe0Yo

 

Tutorial Steps

We will begin by using the quick preset, then move on to setting up the simulation manually.

Gasoline Explosion Preset

Starting in a blank scene, create a sphere that will be the source of the simulation. Set its Radius to 24.

 

Image Removed

 

 

With the sphere still selected, click the Gasoline Explosion preset from the Phoenix FD shelf. This creates the simulation container with the sphere as the source.

 

Image Removed

 

 

Click the Start Simulation icon and Phoenix will begin simulating the gasoline explosion.

 

Image Removed

 

 

When there are enough frames to clearly view the simulation result, stop the simulation using the Stop icon. A nicely detailed explosion is produced.

 

Section
Column
width10%

 

Column
width30%

Image Removed

 

Column
width50%

Image Removed

 

Column
width10%

 

 

Manual Fire Setup

To get a deeper look at the workflow, let’s take a look at setting up this simulation manually. With the simulator selected, click the Clear simulator cache icon in the shelf to delete the cache from the scene.

 

Image Removed

 

Select the Simulator and Fire Source node and delete them, leaving just the sphere in the scene.

In the Phoenix shelf, click on the Create Phoenix FD Fluid Simulator icon and click-drag to create the volume's width and depth around the sphere. Then click-drag again to define its height.

 

Section
Column
width10%

 

Column
width30%

Image Removed

 

Column
width50%

Image Removed

 

Column
width10%

 

 

Select the Simulator and in the Attribute Editor, open the Grid section and change Units to meter so our simulation will be a large-scale explosion. This makes the sphere 24 meters or about 72 feet wide.

 

Image Removed

 

 

Note

It's important that the simulation object is set to the proper real-world scale so that the simulation is correct for that situation.

 

Set the Units Scale to 1.0 to keep from scaling the sim any further. The sim should be about 190x148x100 meters which is pretty big, but it is the right size for the type of simulation.

 

Image Removed

 

 

Move the sphere to be more centered at the bottom of the volume.

 

Image Removed

 

 

Now that the simulator volume is set up, we need to define a source next. Click the Create Fire/Smoke Source icon in the shelf and place it off to one side in the scene.

 

Section
Column
width10%

 

Column
width40%

Image Removed

 

Column
width40%

Image Removed

 

Column
width10%

 

 

Select the sphere and then shift-select the Fire Source and click Add Selected Objects in the Attribute Editor. This specifies the sphere as an emitter for the explosion.

 

Section
Column
width10%

 

Column
width40%

Image Removed

 

Column
width40%

Image Removed

 

Column
width10%

 

 

The Source node controls several simulation settings. With it selected, navigate to the Attribute Editor and turn off the Temperature and Smoke options and turn on Fuel.

 

Image Removed

 

 

The Discharge attribute controls the speed of the discharged fluid, so increasing this value will discharge more fluid into the sim. Since we are creating an explosion, we’ll need to discharge a large amount of fluid over a short amount of time. To do so, we will animate the Discharge. Go to Frame 1 and set Discharge to 2200 and set a keyframe. Go to the next frame, and keyframe Discharge to 0.0.

 

Section
Column
width10%

 

Column
width40%

Image Removed
Key set at Frame 1

 

Column
width40%

Image Removed
Key set at Frame 2

 

Column
width10%

 

 

Select the Simulator and in the Attribute Editor, go to the Fuel rollout and turn on Enable Burning.

 

Image Removed

 

 

In the Grid rollout, notice the Total Cells count is over 353 million. Increase the Cell Size to 1.5 to reduce the overall resolution of the sim to speed it up. This gives us just about 840,000 Total Cells.

 

Section
Column
width10%

 

Column
width40%

Image Removed
Before

 

Column
width40%

Image Removed
After

 

 

 

Column
width10%

 

 

Expand the Fuel rollout. The Ignition Temperature is the temperature at which our fuel ignites and burns. Phoenix FD uses 300 Kelvin as the default temperature in a sim, so if you set a value slightly below that, such as 290 the fuel will ignite inside the volume. Start the sim again, and the explosion will begin to simulate.

 

Image Removed

 

The explosion is not looking quite right yet. The blast is clipping at the edges of the simulator volume, and the preview quality very low.

 

Image Removed

 

To fix the preview quality, expand the Preview rollout and scroll down to the bottom of the section. Expand the GPU Shade Preview sub-section and check Enabled.

 

Image Removed

 

 

Go back up to the Grid settings, and change Adaptive Grid to Temperature/Liquid. This automatically expands the grid volume depending on the fluid temperature meeting the specified Threshold. Set the Threshold to 800 and start the sim.

 

Section
Column
width10%

 

Column
width40%

Image Removed

 

Column
width40%

Image Removed

 

Column
width10%

 

...

note

If you experience clipping of your smoke, set adaptive to Smoke with a Threshold of 0.02.

...

 

The grid now expands as needed, thus preventing the clipping from earlier. However, the simulation is currently expanding in all directions. We can limit the expansion so that the explosion can interact with the bottom of the volume where there might be a ground plane.

Image Removed

Stop the sim, and go back to the first frame. Set your Container Walls to a Y axis of Jammed(-). This allows the explosion to react to the bottom of the volume (which represents the ground).

 

Image Removed

 

 

Simming again will show improved results, but the effect is too uniform.

 

Image Removed

 

 

Expand the Dynamics settings and scroll down to the Conservation section. Increasing the Quality attribute allows the sim to spread out a bit more and to swirl better. Set the value to 80. The higher the value, the more simulation time is needed, so be careful not to set it too high.

Turn on Uniform Density so the sim will ignore the mass of the fluid. This is useful for smoke and explosions. Next, reduce the Steps Per Frame to speed up the sim time.

 

Image Removed

 

 

Start the sim and notice the sim uniformity breaks up a bit. It's a start, but not quite enough yet.

Image Removed

Next, we will add noise to the sim. Select the Source object, and in the Fluid Discharge rollout, increase the Noise value to 10. Sim again and the explosion’s shape will break more.

 

Section
Column
width10%

 

Column
width40%

Image Removed

 

Column
width40%

Image Removed

 

Column
width10%

 

The result currently has a lot of smoke. Let's reduce that a bit to give the simulation a fiery appearance. In the Fuel rollout, reduce the Smoke Amount to 0.4 to allow for more burning for a brighter fire. Increase the Smoke Threshold to 1.0 to reduce the amount of fuel that becomes smoke.

Lastly, lower the Propagation value to 2 to reduce how fast the fuel propagates through the sim.

Image Removed

 

Start the simulation again, and you'll notice better results. Currently, the effect is too explosive.

Image Removed

Now, reduce the Energy to 5 to decrease the explosiveness. Decrease the Fuel Depletion to 0.8 to lower the rate at which the fuel burns up.

Image Removed

 

Stop and restart the sim and you'll see the result better resembles a large explosion.

Image Removed

Now that we have achieved the general effect, let's increase the resolution to get a higher quality result. In the Grid rollout, set the Cell Size to 0.75 and resim the explosion. Note the increased simulation time per frame.

 

...

Column
width10%

 

...

width40%

Image Removed

...

width40%

Image Removed

Column
width10%

 

Next, we will focus on improving how the simulation is rendered. Expand the Rendering rollout and then expand the Fire sub-section. Notice there are three options for the Fire Opacity Mode that will control part of the look. Choose Use Own Opacity.

Image Removed

 

The graph here controls just the opacity of the fire. Double click to add a new point to the curve. Drag a point down to reduce the opacity of the fire, revealing more of the internal fire content, making the fire look brighter. Drag a point up to increase the opacity to hide more of the internal structure. Click the Expand button to view a larger version of the graph in a separate window. Add several new points and create a curve in a wave-shape as seen in the graph below. This will add more visual interest to the explosion.

Image Removed

However, this thinned out our smoke. Expand the Smoke Opacity settings and set the Simple Smoke Opacity value to 0.9. This will produce thicker smoke in areas of the sim.

 

Image Removed

 

 

Expand the Smoke Color settings. Set the Constant Color to a darker gray to produce deeper, darker smoke.

 

Section
Column
width10%

 

Column
width40%

Image Removed

 

Column
width40%

Image Removed

 

Column
width10%

 

 

Reduce the External Scatter Multiplier to 0.5 so that the light inside the smoke scatters less, and you should notice a slight darkening of the smoke.

 

Section
Column
width10%

 

Column
width40%
Image Removed
Column
width40%

Image Removed

 

Column
width10%

 

 

The fire in the simulation is fairly bright. In the Fire rollout, set the Opacity Multiplier to 0.3 and the fire gets even brighter.

 

Image Removed

 

 

If you lower the Physically Based value, to something like 0.7, more red and orange colors are added to the fire. The slider balances between how much of the fire intensity comes from the color gradient plus the fire multiplier versus how much is calculated using the physically-based black body shader.

 

Section
Column
width10%

 

Column
width40%
Image Removed
Column
width40%

Image Removed

Column
width10%

 

 

Increasing the Fire Multiplier to 5.0 creates more fire inside the explosion.

 

Section
Column
width10%

 

Column
width40%
Image Removed
Column
width40%

Image Removed

Column
width10%

 

 

Next, let's adjust how quickly areas of the explosion cool off. Expand the Dynamics rollout, and increase the Cooling value to 0.3. This change will affect the simulation behavior, so we will need to simulate the explosion again.

 

Image Removed

 

 

In the Grid settings, lower the resolution of the sim by increasing the Cell Size to 1.5 to speed up the simulation. Restart the simulation.

 

Image Removed

 

 

Simulate enough to see the new changes. Enable V-Ray in Render Settings, and then render a frame.

.

Section
Column
width10%

 

Column
width30%

Image Removed

 

Column
width50%

Image Removed

 

Column
width10%

 

 

With the render, it becomes clear that the Maya default lights are affecting the scene. In the Render Settings, go to the Overrides tab and under the Lighting rollout, turn off Default lights.

 

Image Removed

 

 

Render again, and notice that the smoke is lit only by the fire itself.

 

Image Removed

 

 

Let's add a ground plane next. Navigate to the Create menu and select V-Ray > Create V-RayPlane. Move it down slightly so that it is below the volume grid. Render again and we have a ground lit by the explosion. Currently, it is lighting the plane a bit too much.

 

Section
Column
width10%

 

Column
width40%

Image Removed

 

Column
width40%

Image Removed

 

Column
width10%

 

 

To reduce the bright lighting cast from the explosion, select the Simulator, and in the Rendering settings, expand the Fire Lights sub-rollout. Reduce the Light Power on Scene value to 0.4.

 

Section
Column
width10%

 

Column
width40%

Image Removed

 

Column
width40%
Image Removed
Column
width10%

 

 

 

Go the Grid section and set the Cell Size back down to 0.75 to increase the sim resolution, and restart the simulation to see this explosion resolve with a higher quality.

Here is a look at the final simulation in the viewport:

 

Section
Column
width100%

Videoautoplayloop
0FinalSimulation.mp4
3true
4false
5true

Applying the Sim setup to a Real-world Example

Open the file Barrels_start.ma provided in the Assets section above. It includes three metal barrels in the scene lit by a sunlight, and a rendering camera called camera1. Select the first barrel on the far left and select the Gasoline Explosion preset in the shelf. Set the Cell Size to 3.0 for a faster sim speed.

 

Image Removed

 

 

Start the sim and our barrel explodes!

 

Image Removed

 

 

...

Column
width60%

Image Added




Section
Column
width40%

To prevent the explosion from expanding the bottom, go to Container Walls and select Jammed (-) in the Y axis. This will act as a floor. 

Column
width60%

Image Added




Section
Column
width40%

Start the simulation. The resulting explosion looks very uniform.

Column
width60%

Image Added




Section
Column
width40%

To add variation, select the Fire/Smoke Source and increase the Noise value to 10.

Notice the variation that is added to the simulation.

Column
width60%

Image Added


...


Section
Column
width40%

Start the simulation once more. While it is running, select the Simulator and go to the Rendering rollout → Fire tab.

Under the Fire settings, there are a few Fire Opacity Modes available: Use Smoke Opacity, Fully Visible, and Use Own Opacity.

Select Use Own Opacity, and stop the simulation.

When you use Own Opacity mode, the fire curve will control the opacity of the fire instead of the intensity. The intensity in this mode is controlled by the color gradient and can be boosted or lowered using the Fire Multiplier

Column
width60%

Image Added


...


Section
Column
width40%

The graph in the Color and Opacity rollout controls only the opacity of the fire. Double-click to add a new point to the curve and drag it down to reduce the opacity of the fire, revealing more of the internal fire content and making it look brighter. Drag the point up to increase the opacity and hide more of the internal structure. Add points in the middle for a gentle curve.

Click the Expand button for a larger graph to work with.

Column
width60%

Image Added


...


Section
Column
width40%

You can further adjust the opacity with the Opacity Multiplier above the graph. For this example, we will lower this value to 0.5, and notice how the fire increases in brightness.

Column
width60%

Image Added


...


Section
Column
width40%

The Physically Based setting blends between artistic and physically accurate results. Change Physically Based to 0.75 and observe the more "fiery" look in the simulation. This parameter balances between how much of the fire intensity comes from the color gradient plus the fire multiplier versus how much is calculated using the physically-based black body shader.

Column
width60%

Image Added


...


Section
Column
width40%

To change the color of the fire, double-click on the carrots above the graph and select a new color. Select Cancel to return to the previous color.

Column
width60%

Image Added


...


Section
Column
width40%

To adjust the explosion to look less contained, navigate to the Dynamics rollout and under Conservation, adjust the Quality setting. This setting allows the simulation to spread more and gives it a swirling motion. Increase Quality to 80. Note that increasing this value will increase simulation time. Start another simulation.

Column
width60%

Image Added


...


Section
Column
width40%

The explosion is breaking up a bit more, but it's not quite there yet. Open the Rendering rolloutFire again. Disable the Fire for now. We can see there is a lot of smoke as a result of the fuel burning so much. Stop the simulation to address this.

Column
width60%

Image Added


...


Section
Column
width40%

In the Fuel settings of the simulation, reduce the Smoke Amount to 0.4 to allow for more burning and a brighter fire, and also increase the Smoke Threshold to 1.0. The Smoke Threshold will lessen how much of the fuel is created as smoke. Reduce Propagation of the fuel to 2 to reduce how fast it propagates through the simulation.

Column
width60%

Image Added


...


Section
Column
width40%

In the Fire rollout, remember to set the Fire's Based on parameter back to Temperature before restarting the simulation.

Column
width60%

Image Added


...


Section
Column
width40%

The fire now looks too hot. Go to the Fuel rollout and reduce the Fuel's Energy to 5 and restart the simulation.

Column
width60%


Image Added


Image Added


...


Section
Column
width40%

The explosion is starting to look good, but it stays hot for too long. We need to increase the cooling of the fire by going to Dynamics rollout and increasing Cooling to 0.3.

Column
width60%

Image Added


...


Section
Column
width40%

Our smoke looks very thin. In the Rendering rollout, expand the Smoke Opacity tab and increase Simple Smoke Opacity to 0.9.

Column
width60%

Image Added


...


Section
Column
width50%

 Image Added
Simple Smoke Opacity: 0.5

Column
width50%

 Image Added
Simple Smoke Opacity: 0.9


...


Section
Column
width40%

Expand the Smoke Color rollout and reduce the Constant color slightly to make darker smoke. In this example, we used a Value of 29. Also, lower the External Scatter Multiplier to 0.8 so that the light inside the smoke scatters less.

Column
width60%

Image Added


...


Section
Column
width40%

The fire looks a little weaker now. Under the Fire rollout, increase the Fire Multiplier to 5.0 so the fire is hotter inside the explosion.

Column
width60%

Image Added

Rendering

...

Section
Column
width40%

To prepare your scene for rendering a simulation make sure V-Ray is set as your Renderer in the Render Setup window.

Column
width60%

Image Added


...


Section
Column
width40%

Here is how the render looks so far.

Column
width60%

Image Added


...


Section
Column
width40%

We need a ground plane, so create a floor by navigating to the V-Ray Menu → V-Ray Plane, and place it in the scene. Set it a little lower than the simulation and give it a gray color.

Column
width60%

Image Added


...


Section
Column
width40%

Do another render. 

Column
width60%

Image Added


...


Section
Column
width40%

Notice some areas of the floor are too bright. You are able to control this in Rendering → Fire Lights rollout.

Set the Light Power on Scene value to 0.5 and re-render the frame. By reducing this value, the light is more evenly distributed.

Column
width60%

Image Added


...


Section
Column
width40%

Here is the new render.

Column
width60%

Image Added


...


Section
Column
width40%

To get finer detail for a final render, increase the Resolution of the Grid. In the Attribute Editor, go to the Grid rollout and click Increase Resolution a couple of times to have about 6.1 million Total cells and re-run the simulation.

Column
width60%

Image Added


...


Section
Column
width40%

Here is how the final render looks.

Column
width60%

Image Added

Example Scene

...

Section
Column
width40%

Now let's apply what we've learned to a real-world example and make these barrels explode!

The following scene file can be downloaded from the Overview section above.

Column
width60%

Image Added


...


Section
Column
width40%

Select the blue barrel, pCylinder3, and apply the Gasoline Explosion Preset.

Column
width60%

Image Added


...


Section
Column
width40%

Select the Simulator and change the Cell Size to 3.0. This will decrease the Total Cells to around 573,000 and will save you time during the iteration process.

Column
width60%

Image Added


...


Section
Column
width40%

Select the Source and set a keyframe on the Discharge to 3100 at Frame 1.

Keep the keyframe on the Discharge set to 0.0 at Frame 2.

Column
width60%

Image Added


...


Section
Column
width40%

Start a simulation and you'll see that the blue barrel explodes. Now we will focus on the other barrels.

Stop the simulation.

Select the Fire/Smoke Source and press Ctrl+D to Duplicate it and move it over a little so it's not

...

overlapping the original.

Notice that the Discharge is set to 0.0, because we duplicated the Source, and the keys don’t transfer over with a simple Duplicate in Maya.

Column
width60%

Image Added


...


Section
Column
width40%

Select the red barrel pCylinder2, shift-select the duplicated

...

Source and

...

click Add Selected Objects

...

.

Notice that this barrel laying on its side is slightly outside of the Simulator. Select the Simulator box and move it over to hold all three barrels.

 

section

Image Removed
Viewport selections

 
Column
width10%60%

 

Column
width40%

Image Added


...


Section
Column
width40%

Image Removed
Source 2 Attribute Editor

 

Column
width10%

 

 

Now if we start the sim, both the barrels start exploding at exactly the same time. We will offset the second barrel to make it look as if the first explosion sets off this second explosion.

 

Image Removed

 

 

...

When you start the simulation now, you will see that only the blue barrel explodes.

Stop the simulation.

Column
width60%

Image Added


...


Section
Column
width40%

Select the second Source and set a keyframe on the Discharge to 0.0 at Frame 5.

At Frame 6, set Discharge to 3100 and keyframe.

At Frame 7, key the Discharge back to 0.0.

Run the simulation, and you can see that the first explosion sets off the second explosion.

...

Column
width60%

Image Added


...


Section
Column
width40%

Now when you start the simulation again you will see two explosions, the second being delayed by five frames.

Stop the simulation.

Column
width60%

Image Added


...


Section
Column
width40%

For the third barrel, press Ctrl+D on the second Fire/Smoke Source to make a third copy and add pCylinder1 to it.

Column
width60%

Image Added


...


Section
Column
width40%

For this last barrel we are going to let the explosion cool off some before ignition.

Select the third Source and set a keyframe on the Discharge to 0.0 at Frame 41.

At Frame 42, set Discharge to 6000 and keyframe.

At Frame 43, key the Discharge back to 0.0.

Column
width60%

Image Added


...


Section
Column
width40%

Start the simulation and let it run. The third explosion starts as the first two are cooling off.

Do a test render to see the results. If the fire is too bright, go into the Fire rollout and decrease the Fire Multiplier value.

Column
width60%

Image Added


...


Section
Column
width40%

Go to the Rendering → Fire Lights tab and change the Light Power on Scene to 0.1.

Column
width60%

Image Added


...


Section
Column
width40%

To make the final simulation, go into the Grid rollout and increase the Cell Size to 1.5. This will increase the Total Cells to about 4.5 million.

Set the Adaptive Grid to Smoke and the Threshold to 0.002.

Column
width60%

Image Added


Image Added

 

Image Removed

 

 

Now we'll add the third barrel to the explosion. Stop the sim. Duplicate the second source with Ctrl+D and go to Frame 1. Select the middle barrel and shift-select the third source and click Add Selected Objects.

 

Image Removed

 

 

Notice that the Discharge for the third barrel is already set at 0.0 because we duplicated it, and the keys don’t transfer over with a simple Duplicate in Maya.

 

Image Removed

 

 

Go to frame 40 and key the Discharge for the third Source at 0.0, At Frame 41 key it at 3000 and then at Frame 42, set Discharge back to 0.0. Start the sim and you can see, as the first two explosions begin to cool off there is a third explosion that heats things up again.

 

Image Removed

 

 

Render a frame, and see what we have at this point.

 

Image Removed

 

 

Select the Simulation, and set the Cell Size back to 1.5 and restart the simulation for a more detailed sim.

 

Section
Column
width10%

 

Column
width40%

Image Removed

 

Column
width40%

Image Removed

 

Column
width10%

 

 

And here's what the final rendered scene looks like:

...


...


Section
Column
width100%

Videoautoplayloop
0BarrelFinalRender.mp4
3true
4false
5true

 

 

40%

Run the final simulation and make a final render.

Column
width60%

Image Added

...