Cameron 2,374 posts
Creating realistic explosions inside 3d studio max used to be a major hassle. But, thanks to "Afterburn" this hassle has been put to rest as it is now as easy to create explosions as it is to do almost anything else.
In this tutorial I will cover what will be needed to create an image like that shown above, but also as an animation which you can use inside a scene in 3dsmax or composited into a film.
This tutorial requires you have afterburn installed and a basic understanding of the max user interface.
This tutorial also contains many pictures, so loading may be slow for those on slow connections but thats ok, its worth it, if some images do not show then just refresh your browser and they will come up eventually.
-------------------------------------------------------------------------------------
To start with, create a SuperSpray particle system with the settings shown to the below and center it on all world axis' (0,0,0).
Name this spray particle system "Explosion".
Explanation/Description of these parameters
Both Spread values give the particles a non uniformity direction, so they spread out as they go up.
The Viewport display options(Ticks, and 100%) are set so we can have better control in the viewport with afterburn settings, if you have a computer that could struggle with these calculations, you can set "Percentage of Particles" to a lower amount, 50% should be fine as we are not using many particles.
The rate of particle emission is changed to 9 as we do not need many particles in this tutorial.
"Particle Motion Variation" is set to 20 to give the particles a more random and non uniform speed.
"Emit Start" we change to 20 so there is a slight pause at the beginning of the animation before the particles/explosion initiates.
"Emit Stop" is set to 35 as most explosions have a short burst, simulating this we will have the particles emitting for only 15 frames.
We change the "Display Until" to 55 as all of the particles of the explosion will have died away before then and we dont want to use up any more system resources than need be.
"Life" is set to 25 with a "Variation" of 2 to simulate once again a non uniformity and have some particles dieing off out of sync to the others.
"Particle Size" is set to 0.0 as we dont want to have unwanted triangles showing up inside the explosion.
Down the bottom left of the picture below, you can see a rough image of what the particles should look like at frame 35.
Now, to simulate a realistic environment inside 3dsmax for the explosion to respond to you will need to create both a gravity and a wind space warp.
Create the gravity spacewarp somewhere in the scene close to the particle system and give it a strength of "0.26". Name this gravity spacewarp "Gravity" and bind it to the Explosion particle system.
Then create the wind spacewarp somewhere close with a strength of "0.043" and name it "Wind".Bind this to the Explosion particle system
(The image to the below is showing the set up that i have created at frame 35.)
The particles are now set up, ready for treatment by afterburn, lets continue with the rest of the scene.
Scene Setup
This tutorial is mainly for the afterburn explosion, so i will not go into any detail about setting up a scene. For now a simple ground plane will be sufficient.
Create a plane in the top viewport, center it (0,0,0), give it a length and width of 1000 and give it 1 segment. Name this plane "GroundPlane"
Lighting
One of the main problems i see when people use afterburn is that they dont light their scene with the correct parameters. It is very easy to do, and once you have done it once you can do it again and again and again....
For this tutorial, all you need to do is create a spotlight covering the whole particle system on a nice angle which will highlight smoke of the explosion when it is created. It is ok if you dont get it exactly right here as you can go back and change it later when the afterburn particles are visible inside the viewport.
Now to make this light project afterburn particle shadows, change the shadow type to "AB Ray trace Shadow" and enable shadows. Scroll down to "Shadow Paramaters" and change its density to "0.7".
Now, the part of this scene which determines the realistic explosion shading and intensities is the "Afterburn Explosion Daemon". This can be quite confusing at first but as with most things is quite simple to understand once you have got the hang of it.
Create an "Afterburn Explosion Daemon" somewhere close to your particle system and make it a size which you can see quite easily.
(This daemon can be found in helpers/Afterburn Daemons)
Instead of jumping straight in an telling you what to put in each field, i think i will explain it all for you: so here goes:
The "On" Checkbox determines whether or not the "Afterburn Explosion Daemon" is to be used in rendering.
The "Color" Gradient defines the color of the explosion being created. It is based on distance, or density depending on what you set in the afterburn parameters which i will go over later.
The "Color Key Shift with Age": Since the explosion intensity varies with time (the outer parts of the explosion cool down first), this AFC (Animation Flow Curve) can shift the Color gradient keys with time. This Animation Flow Curve is found all throughout Afterburn and is highly ingenious. It allows for creating curves to determine the value of a parameter or the position of a gradient depending upon particle age, time, emitter distance e.t.c. At the explosion start frame (20), the hottest parts will be placed on the volume surface. Frame by frame, the explosion then cools down ? the hotter parts move toward the particle center and finally fade to the cold smoke color. Enabling this means that the color of the volumetric will change over particle time and move from the left of the right of the Color gradient.
The "Multiplier" determines the light intensity of the color. You can use the AFC here to simulate the explosion being HOT at the start, with a high Multiplier value on the left, to colder towards the end of the particle life, with a lower Multiplier on the right hand side.
The "Color Blending" Type determines how the color of the explode daemon is going to be used on the afterburn particles:
Add: The color set inside afterburn parameters and the color set here in this daemon will be mixed together as if by adding the colour of the explosion to that set in the afterburn parameter.
Multiply: If the afterburn parameter color is black, then the daemon color will be at its full potential, if the afterburn parameter is white then the daemon color will not be evident.
Replace: The daemon color completely replaces the afterburn color.
Intensity Blend: The opposite of Multiply Color Blend.
The "Perturbation" controls the sampling and overall noise of the explosion.
Scale: Determines the size of the noise pattern.
Amount: Determines the amount of noise used to perturb the sampling.
Levels: Controls how detailed the noise will be.
I will not cover the limiting here as I have so far had no use of it. All it does is limit the effect to a certain radius of each spherical afterburn volumetric.
Now, for the settings to be used for this explosion. Please use the settings i have shown below, I am providing a copy of the explosion color gradient here.
( It can be used by right clicking the color gradient inside 3dsmax, selecting "Load" and choosing the file.)
The color is created like this as it uses the central point their with the bright red/orange to simulate the central explosion part, and the dark black to determine the cold, smoky parts.
The image to the furthest right shows the AFC i used for the color key shift, rotated 90 degrees clockwise. It forms a sort of " S " style curve.
The multiplier is set to 7.5 to simulate a bright intensity in the explosion, the parts which are totally black in the color gradient are not affected by this.
The Perturbation Scale and Amount are set to 0.32 and 0.25 respectively to give the results we are after.
This would be a nice time to save your scene.
Afterburn volumetrics are controlled through 3dsmax's Environment and its Atmospheric Effects, so lets go there and initiate afterburn.
Rendering Menu, Environment
While we're here, i will suggest changing the background color to a nice pale blue, so we can see the full effect of our explosion (149,180,191).
Ok, Under the Atmosphere rollout, click the "Add" button and choose Afterburn.
You should notice that it adds "Afterburn" as well as "Afterburn Renderer" to the Effects list, this is because Afterburn cannot render without its renderer being present.
Now your Environment window should look like that shown below:
Lets get started with the parameters!...
Ok, Scroll down to the Afterburn Manager rollout and change the settings to match the following, and the image below.
Under Source Particles/Daemons click the "Pick Particles/Daemons" button and select the superspray, and the explode daemon.
Under Source Lights, click the "Pick Lights" and select the Spotlight you created earlier.
Now enable the "Show in Viewport" option so you can see the afterburn particles inside the 3dsmax viewports. As you will notice they are too small at the top, the general idea of afterburn is to have the particles overlapping to create a sense of one conjoined volumetric, we will fix this later.
The rest of the settings underneath in the image below show options which I wont really be dealing with in this tutorial. The most important of which is the "Volume Rendering" area. That controls sampling and overall quality of the afterburn particles.
If you wish to learn about these tools, or any other of the afterburn parameters remember to look in the afterburn reference which comes with afterburn.
Next we adjust the Illumination and Shading aspects.
Change your settings to be similar to that shown below.
Shadow Samples is a measure of shadow quality.
We turn on Shadow cast as we have a ground plane for the shadows of the explosion volumetric and we turn on self shadows as this adds a great deal to the depth and realism of anything made in afterburn, including explosions.
Shadow Opacity is changed to 0.75 as the default of 1 is a bit too strong.
Also change the gradient of the Ambient color so that the first key in the gradient is a dark brown as can be seen below.
Leave the rest of the settings to default.
Now comes the coloring.
Settings the same as below, as usual
Right click on the first color gradient box and change it to keyless mode (non gradient), now change the colour to a 20,20,20 blackish grey. Not completely black as there will be shadows being cast.
Make sure that the Shading actuation is set to Distance as we want the explosion to turn to dark smoke after the intial burst.
Under "Particle Shape/Animation Parameters" we get the chance to change the actual particles to fit into the scene.
And again, change the parameters to that in the image shown below.
Change the Low Sph.Radius to 20, enable the AFC and then change the High Sph.Radius to 35. We can leave the variation of it at 10% as that is fine with the explosion we are creating.
Go down a bit to "Type" and change Alignment to Part. Velocity, enable the AFC and change the high value of this auto stretch to 3. This will give the particles a nice elongated shape.
To see a rough copy of the spherical particle we are creating with the noise mapped to it, press the little green rectangle button to the bottom right hand side of this rollout. This can be animated with the horizontal slider just above it. By using this slider we can see how the size and noise animates as it gets older with time.
I think its time for a test render.
Create a Matte/Shadow material in the material editor, check "Apply Atmosphere" and At object depth so that the afterburn explosion can cast its shadows, apply this material to the ground plane.
Then go ahead and render it out at about frame 35.
As you can see below its looking fairly good. There are noticable bad things happening such as bad calculations in the explosion section and overall the noise is not quite right and overall it is a bit too dense. These things at least, we will be fixing as we continue.
Save your progress here.
Ok, Lets continue...
Back in Afterburn Parameters, Under The Noise Shape Controls we adjust the Gain and Bias values to 0.52 and 0.44 respectively.
Then we change the Noise type to smoke to create a more realistic explotion related noise pattern and change the Noise density falloff by Radius to Linear.
Also you can enable the noise preview window like you did before by clicking the green rectangle button, notice that with this one nothing happens when you move the slider. Thats because we have not yet animated the noise.
Your settings should be that as shown below:
Now onto the last section of the Afterburn Parameters: the Noise Animation Parameters Rollout
Change your settings to that shown below:
The Low value of the density we change to 1.0, this is the explosion part of the effect and a density of 1.0 is perfect for it, we give it a high value of 0 as we want the smoke at the end to fade away into nothing. The AFC graph in between is shaped as is in the bottom of the picture shown above.... We then give the Density a variation of 15% to once again give a feeling of non-uniformity.
Change the noise size to 15 to give an overall smoothness, and less noise to the explosion, and then change the noise levels to 6.0 to give adequate detail.
Then we hit render!
Thats about it for now on this tutorial. The only other things i can tell you is to play around with your space warps, experiment with the settings i have here and then go ahead and experiment with your own, add debri, read your afterburn reference, increase quality + samples, add ground smoke and integrate this into a fully functional scene.
-------------------------------------------------------------------------------------
Related Files: