![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/9d603a197300373.662e78f8c8436.jpg)
HOUDINI - PYRO SIMULATION (FLAMES)
INTRODUCTION
In this module, we are going to discuss how to create basic flames (or fire), and how we can modify the setup to create an explosion effect.
HOUDINI SETUP
The most important attributes responsible for simulating flames are 'fuel' and 'temperature'.
We are going to create the basic pyro setup like we learnt in the previous pyro module.
In this case, we are going to choose 'source fuel' on the pyro source, and this will create both fuel and temperature attributes for us.
In the basic setup, we have already connected the noise attributes, and we included a 'attribute adjust vector' node to create velocity noise, since velocity is a vector quantity.
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/disp/38aa57197300373.662e67f9244a2.png)
Right now, if we play the simulation, we won't see anything in the viewport. This is because under the pyro solver sourcing, the source volume name is "burn" instead of "fuel" which was what we originally added. So when we change this to "fuel" instead, and we will now see the flames.
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/disp/c54729197300373.662e67f923169.png)
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/disp/3c3a0e197300373.662e67f9217d4.png)
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/b68369197300373.662e67f925a6c.png)
We see that right now, we don't see any smokes. If we want the flames to emit smokes, we will need to add the 'density' attribute on the pyro source. We will also need to rasterize this attribute on the VRA node.
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/disp/3b8439197300373.662e67f924a57.png)
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/24bf68197300373.662e67f921c29.png)
Now we will see the smokes emitting from the flames.
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/c47786197300373.662e67f924e7f.png)
We can fine tune the look of the flame under the pyro solver shape tab like we learnt in the last module.
Let's turn off the density for now so that we can see the various ways we can improve the look of the flames.
Let's set max substeps to 2 to make the flame simulation smoother. Under the shape tab, let's enable 'shredding'.
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/b1e5ef197300373.662e67f922ba9.png)
Shredding is used to add higher frequency details to the flame. It can also help to break up some undesirable smooth features in the smoke.
If we also enable 'Flame Expansion', this will make our flame to expand as it's name suggests.
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/disp/fc9dd8197300373.662e67f9221c9.png)
We can control the lifespan of the flames under the 'fields' tab, 'flames' attribute.
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/disp/3c195c197300373.662e67f923efa.png)
If we choose not to use a density attribute, we can still emit the smokes by enabling 'emit from flame' as shown above. We can increase the amount of smoke emitted by increasing the emission scale.
Play around with all these settings to get different results for your flames.
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/d3c22e197300373.662e67f925468.png)
With the attribute adjust vector, we can introduce some noise into the simulation to add some more effects. We have to make sure a 'velocity' attribute is added to the pyro source and it is rasterized on the VRA node.
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/928844197300373.662e67f923592.png)
If we add a pyro bake volume node, we can really do a lot of interesting things with the look of the flames.
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/disp/2449c7197300373.662e67f92115c.png)
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/f2ea9a197300373.662e67f923b20.png)
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/b259f1197300373.662e67f9225ba.png)
LET'S CREATE AN EXPLOSION!
Now we are going to dive into more fun stuff. We will create an explosion effect in this section.
EXPLOSION SOURCE
Let us start by creating an empty geometry node named "explosion" and dive into it's SOP level.
Next, we will create a 'add' node which is going to add a point for us in the viewport. If we click on the '+' button, we will add 1 point to the viewport. This single point will serve as the emission point of the explosion.
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/5b01f8197300373.662e69b20710e.png)
Next, let us add a pyro burst source node. This node creates a basic explosion shape for us. In the guide display 'quick setups', let's choose 'pyro simulation' to automatically setup the nodes for us.
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/214865197300373.662e78f8c96a2.png)
If we playback the simulation, we will see an explosion burst. All we have to do from this point on is to modify the various parameters and settings of the explosion to get a much improved result.
NOTE: We can also use this pyro burst source node to simulate effects like dust or giant storms, or tornado etc.
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/70c5df197300373.662e78f8ca25c.png)
The first thing we notice is that the smokes emitted dies off too quickly. We want the smokes to still remain after the explosion happens. So let's decrease the dissipation of the smoke under the 'density' tab of the fields subtab to about 0.02.
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/disp/93fb8d197300373.662e78f8c29e2.png)
Next, we want to see more expansion on the smokes as they emit, so let's go under the sourcing tab and crank up the divergence to say 100.
NOTE: Divergence is the ability of the pyro volume to expand. This attribute is useful in creating a believable explosion.
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/5ee6a8197300373.662e78f8cb90f.png)
EXPLOSION TRAILS
Now, let's add some trails to the explosion to make it more interesting.
To begin with, we will add a 'pyro trail path' and a 'pyro trail source' nodes, and use a merge node to combine them with the pyro burst source node as shown below:
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/1c255b197300373.662e78f8c64d1.png)
If we select the pyro trail source node and navigate to the 'trail components' tab, let us add a temperature source and a burn source.
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/884799197300373.662e78f8c562e.png)
If we isolate the trails and play the simulation, we will see that the trails have been generated:
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/ca8b0f197300373.662e78f8c6c9a.png)
We can improve how these trails look and behave as well as their amount on the pyro trails path node.
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/ea625f197300373.662e78f8cb2b2.png)
Let us do the following settings (NB: these settings are subjective depending on what you want to achieve, but for our case here, we will use these settings):
1. In the 'Source' tab;
- Increase the number of trails to 100;
- Increase spread start angle to 35;
- Set the spread angle to 70;
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/6afc34197300373.662e78f8c33b3.png)
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/9eadc6197300373.662e78f8c7350.png)
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/00c8e2197300373.662e78f8ca8da.png)
2. In the 'Trail Generation' tab:
Currently, the trails emit uniformly and at the same time. We can actually offset this behaviour by enabling 'offset per point' under the 'start frame' tab, and we can set the offset frames or use the seed.
We can also determine how long the trails last by increasing or decreasing the 'trial duration'.
Take the time to fine tune all these parameters settings until you achieve the desired results.
Take the time to fine tune all these parameters settings until you achieve the desired results.
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/70026f197300373.662e78f8c3dd1.png)
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/ae5ffe197300373.662e78f8c8a87.png)
EXPLOSION SHOCKWAVES
Now let's generate a ground shockwave for our explosion.
Just like we did earlier, let's create a new set of pyro trail path and pyro trail source nodes:
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/99840f197300373.662e78f8c9b93.png)
On the pyro trail path node, let us first set the gravity under trail generation to zero to straighten the paths. Let's also enable 'offset per point'.
Next, let us set spread angle to 0 and spread start angle to 90 to flatten everything.
Next, we will crank up the number of trails to 1000.
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/2993a0197300373.662e78f8c45cb.png)
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/e6b8ae197300373.662e78f8c9080.png)
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/e39f78197300373.662e78f8c7a2e.png)
On the pyro trail source, let's first add the temperature attribute.
Then let's enable 'scale along trailing'.
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/01e2e6197300373.662e78f8c4e8c.png)
We should be getting a pretty nice result already:
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/cef15d197300373.662e78f8cade7.png)
COMBINING ALL THREE COMPONENTS
Now let us combine the three explosion components that we have created so far using the merge node.
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/b32bf9197300373.662e78f8c5da4.png)
We get the result below:
We can connect a pyro bake volume node to fine tune the look of the explosion. Note however that this is just for mere look development, it will not affect our final explosion effects.
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/8bbb66197300373.662e84822420a.png)
CREATING MULTIPLE (OR CHAIN) EXPLOSIONS
In the previous section, we looked at how to create a single explosion effect. In this section, we will create multiple explosion effects in a sort of chain reactions.
Let us start by creating a single explosion like we did above. So we have the explosion setup like below:
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/5a2ed0197300373.662e848222b91.png)
Earlier, we used a single point as the source of our explosion on the 'add' node. So we are going to take advantage of this to create multiple explosions. Reason why this will work is because we can actually translate the point(s) around.
Let us quickly perform the following settings on the pyro burst source node:
- In the burst shape, let's reduce the spread angle to about 70;
- In the burst components, let's enable 'scale over duration' and 'scale along trailing';
- In the output, let's enable 'add velocity noise' and adjust the settings there to your taste;
On the pyro solver node, let's perform the following settings:
- Decrease flame lifespan to 2.5;
- Enable 'emit from flame' under the density field and set it to 10;
- Enable 'remap flame range' and tweak the graph as shown below;
- Set disturbance to 25;
- Set turbulence to 0.5;
Feel free to play around with all these settings like we've discussed before to get different results.
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/30796f197300373.662e8482224c9.png)
Let us also quickly setup the pyro trail by creating a pyro trail node, which will automatically setup the path and source like we did before.
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/a175e9197300373.662e8482233d2.png)
Let's do the following settings on the trails:
- Increase the drag a bit to about 3;
- Lower the mass a bit to about 0.3;
- Lower trail duration to 24;
- Lower the radius of the trail source to 0.05;
- Lower the length to 0.8;
- Turn on scale over duration and scale along trailing;
- Get rid of density component and add burn and temperature;
We can reduce the thickness of the trails by lowering 'particle scale' under the VRA node, and reducing 'minimum filter size' as well.
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/f02fc1197300373.662e848221dc5.png)
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/10cfab197300373.662e8482239a1.png)
We have a basic explosion that works.
Now, let us set up the multiple explosions.
There are several ways we can approach this, whether via gradient scatter points node or lines node etc. Let's use a line in this example. Connect it like so:
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/925268197300373.662e85b9ad20e.png)
Let's point the line along the direction where we want the explosion to grow along (x axis), and increase it's length to 10 and number of points to 5. We will notice that the number of points is the number of chains we want the explosion to have, and the length is the distance along the selected direction we want the chain explosions to propagate.
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/b199d2197300373.662e85b9ac9ae.png)
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/67373f197300373.662e85b9ace26.png)
If we play the simulation, we will see that they all actually start at the same time.
If we go under the Burst Animation tab of the pyro burst source (and also the Trail Generation tab of the pyro trail path), we will see a drop down next to start frame with 'set uniform'. If we change this to 'set varying' for example, we will get a different result.
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/821853197300373.662e8c26826d4.png)
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/disp/af7dda197300373.662e8c2682d3e.png)
If we set the variation to same values (say 6) on both pyro burst and trail nodes, we will get some gaps between each explosions.
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/c29493197300373.662e8c268c8f0.png)
If we want the explosions to happen sequentially one after the other, we are going to set the dropdown (on both pyro burst and pyro trail nodes) to 'use attribute'.
If we click on the dice icon that is next to the dropdown, it will automatically create an attribute adjust float node for us with the attribute name set to "startframe".
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/bb52da197300373.662e8c268a772.png)
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/3c54e9197300373.662e8c268bd9f.png)
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/e259cb197300373.662e8c268ac55.png)
So now we know the attribute name we need which is "startframe". So let's copy this name, delete the attribute adjust node, and instead create an 'attribute wrangle' node.
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/a47d4c197300373.662e8c268c247.png)
In the attribute wrangle VEXpression, let's type:
f@startframe = @ptnum;
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/fb9eec197300373.662e8c268b296.png)
So this assigns point numbers (from the line node) to the start frame, and the explosions will be generated based on the point numbers (that is, sequentially). Thus if we play the simulation, the explosions will happen sequentially.
However, it's currently too fast. So let's multiply the VEXpression by an integer, say 4, to space out the timing more:
f@startframe = @ptnum*4;
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/79afb8197300373.662e8c268b781.png)
Now we get a proper gap between each explosions.
If we want to randomize the sizes of the explosions, say we want to start with smaller explosions, then as it propagates, it becomes bigger over time, we can also do that via the 'initial size' parameter on both pyro burst and trail path nodes.
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/35734b197300373.662e96e96ace5.png)
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/2266cf197300373.662e96e96a42e.png)
We can also change the initial size on both nodes to 'use attribute' instead of the 'set uniform' as well. And just like above, the attribute we need to create is called 'pscale';
Let's select the line and resample it with a resample node; turn off 'maximum segment length', and turn on 'curve U' instead.
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/8eac3d197300373.662e96e96c777.png)
On the attribute wrangle node, let's type the VEXpression:
@pscale = chramp("size", @curveu);
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/9ae2a4197300373.662e96e96a890.png)
Click the '+' icon to create the color ramp attribute; When we play the explosion, we will see that their sizes actually grow bigger based on the color ramp
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/2a7827197300373.662e96e96bc50.png)
So now, we can reshape the color ramp to determine how the sizes of the explosions grow overtime.
If we set the start point to say 0.5, and the end point to say 2, we will see the result;
If we set the start point to say 0.5, and the end point to say 2, we will see the result;
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/disp/e7406b197300373.662e96e96ce8b.png)
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/56276d197300373.662e96e96d605.png)
If we reshape it like below, we will get a different result as well. So as usual, feel free to play around with these settings.
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/14546b197300373.662e96e969c29.png)
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/12d20a197300373.662e96e96b0e5.png)
Now we have a chain explosion that works!
The possibilities of what we can create in Houdini is endless. We just need to really go in and play around with different settings and parameters to get different types of results.
The possibilities of what we can create in Houdini is endless. We just need to really go in and play around with different settings and parameters to get different types of results.
Below is a playblast of the chain explosion in Houdini:
Like we have learnt before, we can also cache out these simulations and export them as vdb files to render in a third-party software.
Below are the viewport and render previews of the explosions in Maya:
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/79a7c3197300373.662e96e96b831.png)
![houdini HoudiniFX houdinivfx vfxbreakdown visualeffects CGI vfx](https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/b48530197300373.662e96e96c383.jpg)