welcome to this quick start tutorial for
Phoenix fd4 Maya in this video we look
at creating a gasoline explosion
simulation using a fast preset and then
rebuild it manually to understand how it
works more fully take a look at our tap
water simulation in our previous quick
start video for a little background on
the concepts that we continue here now
we'll start in a blank scene and I'll
create a sphere that will be the source
of my simulation I'll set its radius to
24 with the sphere still selected I'll
choose the gasoline explosion preset
from the Phoenix FD shelf this creates
the simulation container with the sphere
as its source now select the start
simulation
icon I'll elapse several minutes here to
see the Sim progress into this fiery
explosion and I'll stop the simulation
with the Shelf icon as I orbit around
the result we have a nicely detailed
explosion which should remind you not to
smoke at a gas station so we did this
pretty easily using the preset but now
let's take a look at setting this up
manually to get a deeper look at the
workflow click the trash icon in the
Shelf to delete the cache from the scene
select the simulator and delete it also
select the source node and delete that
just leaving the sphere in the scene
in the Phoenix shelf click on the create
Phoenix FD fluid simulator icon and
click and drag to create a volume shown
here in the pink colored lines 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 means our
sphere is 24 M wide as we saw with the
top water Sim in our previous quick
chart video scale is important to an
accurate Sim set the units scale to one
to keep from scaling the Sim any further
so our Sim is about
190x 148 by 100 m which is pretty
sizable I'll place the sphere a little
more centered at the bottom of the
container and now we need a source click
the create fire SL smok Source icon in
the shelf and place it in the scene like
so
select the sphere and then shift select
the source and click add selected
objects in the attribute Editor to add
the sphere as an emitter for the
explosion turn off the temperature and
smoke options and turn on
fuel the discharge attribute controls
the speed of the discharged fluid so
increasing this value will discharge
more fluid into the Sim since we're
creating an explosion we'll need to
discharge a huge amount of fluid over a
very short amount of time so go to frame
one in the scene and set discharge to
2200 and set a key frame go to the next
frame and key frame discharge at
zero select the simulation and in the
attribute editor go to the fuel section
and turn on enable burning which is
generally what happens when I eat spicy
Mexican food click the start simulation
icon and you'll notice that the SIM runs
quite
slowly I'll stop The Sim and back in the
grid section notice that our total cells
count is at 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 about
840,000 total cells for more information
on this please see our previous top
water quick start video start the
simulation and you see the frame rate is
more responsive when it plays back in
Maya but nothing is really happening yet
so stop the Sim again and expand the
fuel
settings 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 300 such
as 290 and then restart the Sim you get
an an ignition inside the container now
the explosion is not looking quite right
yet the blast is clipping at the edges
of the simulator and the preview quality
is a bit ratty expand the preview
section and scroll down to the bottom
and expand the GPU shade preview
subsection and then check on
enable go back up to the grid settings
and change adaptive grid to temperature
SL liquid this expands the grid
depending on the temperature of the
fluid inside when it meets the specified
threshold set the threshold to 800 and
start the
Sim the grid as you can see expands and
the explosion is not clipped like before
stop the Sim and go back to the first
frame set your boundary conditions to a
y AIS of jammed negative this allows the
explosion to react to the bottom of the
Sim container in other words the ground
start the Sim again and I'll elapse
about 30 seconds here to see that the
Sim reacts nicely to the ground but it
looks way too uniform right now go ahead
and stop your sim and 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 that value to 80 the higher
this value the more simulation time is
needed so be careful when going too high
turn on uniform density to allow the Sim
to not consider the mass of the fluid
which is good for smoke and explosions
and then I'll reduce the steps per frame
to speed up the Sim time start the Sim
and as I elapse about 30 seconds again
you can see that the Sim is breaking up
a bit but not quite there yet so stop
the Sim and we need to add a little
noise to the simulation so select the
source object and in the fluid discharge
section increase the noise value to 10
play The Sim and the explosion shape is
looking better and more broken up now
there's a lot of smoke in the result in
the fuel settings reduce the smoke
amount to 0.4 to allow for more burning
for a brighter fire and increase the
smoke threshold to 1.0 which will lessen
how much of the fuel is created as smoke
lower the propagation value to two to
reduce how fast it propagates throughout
the Sim play the simulation and we're
getting better results but it's too
explosive right now too hot so we'll
need to reduce the energy to five and
the fuel depletion to 0.8 to reduce how
fast the fuel is burned up I'll stop and
restart the Sim and I'll elapse about 90
seconds here to show that the result is
looking much more like a large explosion
I'll stop the SIM to take a closer look
at the
result now we need a higher resolution
for a better result in the grid section
set the cell size to
0.75 and resim the explosion to see the
result I'll elapse a little over four
minutes of sim time here to get to this
result which is definitely looking
nicer now let's focus more on the look
itself expand rendering and then expand
the fire subsection
notice there are three options for the
fire opacity mode that will control part
of the look choose U own opacity and the
view panel updates the graph here
controls just the opacity of the fire
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 making it look brighter
drag it up to increase the opacity to
hide more of the internal structure
lower this Middle Point for a gentle
curve down like this click the expand
button to get a larger graph with which
to work now set a few new points and
create a look like this wave I'm making
here to create more visual interest to
the explosion this however thinned out
our smoke so expand the smoke opacity
settings and set the simple smoke
opacity value to 0.9 to give us thicker
smoke in these areas of the
Sim expand the smoke color settings and
set set a darker gray to get a deeper
darker smoke 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 see here in the Sim the fire is
really bright in the fire settings set
the opacity multiplier to 0.3 and the
Fire gets even brighter but if you back
down on the physically based value the
Fire gets a good deal more red and
orange added to it 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 increasing the fire
multiplier to 5.0 gets you more fire
inside the explosion you can select the
color of that fire by sliding this arrow
and double clicking it allows you to
select a color like this green I'll pick
just go ahead and undo that action and
we're back to the red from before what I
really want to do here in these areas is
to cool off the explosion
faster go up and expand the dynamic
settings and increase the cooling value
to 0.3 and we'll get the fire to cool
faster in the Sim head to the grid
settings and lower resolution of the Sim
by increasing the cell size to 1.5 to
speed up the simulation restart the Sim
all a laps of about 90 seconds of sim
time here and I'll stop the explosion
here let's go ahead and render our
result enable VR in render settings and
then renderer frame here in the renderer
we can see that we have my default
lights turned on in the scene so go to
the overwrites tab and under the
lighting heading turn off default lights
these will just add light to the scene
that we don't want render again and
you'll see that our smoke is lit by the
fire itself now let's make a ground
plane go to the create menu and select
vray create vray plane for our ground
I'll move it down just a little bit
click render again and we have a ground
that is lit by the explosion itself it's
really quite bright select the simulator
and in the rendering settings expand
fire lights subsection reduce the light
power on scene value to 0.4 and you can
reduce the lighting cast into the scene
from that fire render a frame and you'll
notice that the ground plane is not lit
as brightly as before go to the grid
section and set the cell size back down
to
0.75 to increase the overall Sim
resolution and then go ahead and restart
the Sim now I'm going to lapse about 10
minutes of time here as we watch this
explosion resolve with a much higher
quality
now let's take a look at using this in a
practical scenario open the scene file
barrel start. and you'll see three metal
barrels in the scene lit by a sunlight
and a rendering camera called camera 1
select the first barrel and then select
the gasoline explosion preset in the
Shelf change your cell size to three for
a faster simulation speed start the Sim
and our Barrel explodes
so let's get the other barrels to
explode as well stop the Sim and take a
look in the perspective view select the
source and press contrl D to duplicate
the source and move it over a little bit
like this select the second Barrel shift
select the duplicated source and click
add selected objects to this new source
now if I start the Sim both the barrels
start explosions at exactly the same
time what I want to do is off set the
barrel as if the first sets off the
second select the second source and set
the discharge to zero and at frame five
set a key frame for it then at frame six
set discharge to 3000 and key frame that
then at frame seven key the discharge
back to zero Again Play The Sim and you
can see that the first explosion clearly
sets off the second
one now like any good pyromaniac let's
add add more fuel to the fire with the
third Barrel stop your sim duplicate the
Second Source with contrl d and go to
frame one select the third barrel and
shift select the third source and click
add selected objects now notice that the
discharge for the third source is
already set at zero and that's because
we duplicated key frames don't transfer
over with a simple duplicate in Maya go
to frame 40 and key the discharge for
the third Source at zero at frame 41 key
it at 3000 and then at frame 42 set
disch charge back to zero and key that
start the Sim I'll elapse just over 2
and 1/2 minutes and as you can see as
the first two explosions begin to cool
off there is a third explosion that
heats things back up again I'll elapse
another 3 and 1/2 minutes to get to this
result and then I'll stop The Sim and
take a look around scrub the timeline to
really see all three distinct explosions
inside this simulation renderer frame
and it looks pretty cool so let's get a
higher detail select the simulation and
set the cell size to 1.5 and restart the
simulation for a more detailed Sim I'll
elapse about 7 Minutes of time to see
this final result my sim here I get a
lovely simulation and a safe way to blow
up three barrels full of gasoline
without burning off my
eyebrows thank you for joining us for
this quick start video on the gasoline
explosion simulation using Phoenix FD
for Maya