blenderNetwork patreon blender-logos d heart user th book photo pencil map-marker chevron-right comment comments twitter facebook rss chain navicon google-plus envelope linkedin calendar-o tumblr reddit stumbleupon share-alt blogger flattr flag

Generating Smoke

Blender 3d tutorial

Creating Smoke

Like the other simulators in Blender, smoke is a very popular physics based visual effect that people like to tinker with. To create smoke in Blender 3D, we will learn how to create various smoke objects, find out where settings are located and what they do, and then render some smoke in Cycles. When we are all done, you will have learned the basics of creating smoke and fire.

Quick Smoke

Much like fluids in Blender, smoke requires the use of a domain and an inflow. The domain controls the boundaries of the simulation and the flow object will emit the smoke. An optional smoke object is the outflow, which will remove smoke from the domain.

To quickly generate these objects, we will be using the quick smoke function. This saves you a bit of time when it comes to adding objects and applying the initial smoke settings to them. To use this function, select the object that will emit the smoke (I'm using the default cube), press the spacebar in the 3D view window, type in 'quick', and select Quick Smoke.

You should see a new wireframe box appear. This is the smoke domain. Scale the domain up by a factor of 2 (S -> 2) and move along the Z-Axis by 3 units (G -> Z -> 3). I also scaled the emitter by a factor of 0.5 (Select the emitter -> S -> 0.5). This will give us a bit more room to work with.

Domain Settings

If you select the domain and go to the physics panel of the properties window, you will see a wide array of settings to play with. The first setting I always change is the Smoke Adaptive Domain. Until I get to my final render, I always have this turned on because it helps speed up the baking by skipping calculations in areas of the domain that have little to no smoke.

The drawback is the possibility of cutting out some smoke. The Threshold setting and the Margin setting can be used to change the amount of smoke that might get skipped over. A higher margin or a smaller threshold will result in less smoke being skipped over, but take longer to bake. The vast majority of the time, I just stick with the default settings.

After that, I make sure the Smoke High Resolution is turned off. Having this on will cause Blender to take much longer to bake your smoke. Usually I will keep this off until I have the general movement of the smoke complete. This is especially important if your computer takes a very long time to bake smoke.

The First Bake

To see your smoke, you can hit the play button in the timeline window. The first time through, the animation will play slowly because Blender must calculate the smoke physics. After that, the animation will run faster because Blender will remember the calculations until a smoke setting is changed.

You can also use Smoke Cache. The smoke cache is in the Physics panel when you have the Domain selected. To bake your smoke, hit the Bake button and let Blender work its magic. If you need to re-bake, you can create a new slot by clicking on the plus button or by pressing Free Bake and then hitting Bake again. I tend to prefer using multiple slots as it allows me to compare different settings. When done baking, you can watch your smoke by pressing the play button in the timeline window.

Smoke Movement

To change the movement of your smoke, select the smoke emitter and go to the physics settings. In here, the Density, Temp. Diff, and the Flow Source settings will alter the movement of your smoke. A higher Temp Diff and/or Density will make your smoke rise faster.

The Flow Source settings lets you emit from the mesh itself or with particles. I won't use particles in this tutorial, however, the process is simple. Set up particles to move however you like, change the Flow Source setting for the smoke emitter to particle system, and the smoke will emit from the particles, assuming your particles are within the domain.

Now select the domain and look at the smoke section. Most of the settings in the smoke section of the Physics panel are useful for smoke movement. The Time setting allows you to speed up and slow down the simulation. Density and Temp Diff are used to increase or decrease the strength of the Density and Temp Diff values for the emitter. Negative values here will make smoke go down rather than up. Finally, vorticity makes the smoke more turbulent and move a bit more randomly.

I highly recommend simply playing around with each of these settings to see what they do for yourself.

Smoke Appearance

Now that we've looked at the movement of the smoke, let's see how we can alter the appearance. Select the emitter again and find the Flow Type setting. This allows you to choose between smoke, fire, and both. You can also make it an outflow, which is only useful when you have a separate object emitting smoke into the domain. I am going to change this setting to Fire + Smoke.

If you tested out the Density setting in the previous step, you probably noticed that it also effects how thick the smoke is. After the flow type, this is probably the most important setting. The other settings of interest are the Smoke Color and Flame Rate. Smoke Color isn’t very useful if using nodes to color the smoke, but Flame will adjust how big of a flame you want your smoke to have, if using fire.

When you have the domain selected, the settings of interest are in the Smoke Flames section. Each of these settings mainly adjust how much flame is created and how much smoke is created by the flames. Again, I recommend changing settings and testing them out to see what they do.

One last setting is the Smoke High Resolution setting. Earlier in this tutorial, we made sure this was off, however this will make a huge difference in the appearance of your smoke by making it much more detailed. At the end of this tutorial, I will show a couple of renders that will include a comparison of high and low resolution smoke.

Smoke in Cycles

To render our smoke in Cycles, start by changing the renderer to Cycles Render and change the window layout to Compositing. With the domain selected, check the Use Nodes setting. A couple of default nodes should appear. Because of the Quick Smoke function, a material has already been created. However, it has been set up for the Internal renderer, so we have to do a bit of work.

While there are plans for a smoke node in the future, for now we have to make use of attribute nodes to access the smoke data. So start by deleting the Diffuse node, and add an Attribute node (Add->Input->Attribute) and change the name to density.

After that, add a Volume Scatter (Add->Shader->Volume Scatter) and a Volume Absorption (Add->Shader->Volume Absorption) node and combine them together with an Add node (Add->Shader->Add), as shown above. If you want, you can add a Multiply node (Add->Converter->Math) to gain a bit of control on how dense the smoke is. This is quite nice if you've want to edit the density without baking again.

Changing the color in these two will alter the color of the smoke. In this case, I left the color white. Keep in mind that your lighting will drastically effect the coloring of your smoke. Finally, add a Mix Shader (Add->Shader->Mix) and plug the output of the Add shader into its first input. In the next step, we'll deal with the flame.

Flames in Cycles

To access the flame data, add another Attribute node (Add->Input->Attribute) and name it flame and plug the Fac output into the Mix shader we made in the previous step. Then add an Emission node (Add->Shader->Emission). If you want to control the brightness of the flame, add a Multiply node (Add->Converter->Math) before the strength input of the Emission node, as shown above.

For the color, I've seen people use a color ramp, but here I used the Blackbody node (Add->Converter->Blackbody). This node outputs a color depending on the given temperature. If you check out the Wikipedia article on blackbody radiation you can see the color scale that it generates. Perfect for fire!

Unfortunately, you cannot just plug the Flame data into this node without adjusting the numbers. The flame attribute gives you values from zero to one, but we need values in the 1000s. This is what the Multiply and Add nodes do.

The multiply node will adjust the range of temperatures our flame will have. Here, it changes the range from 0 to 1 into 0 to 3000. The add node shifts the temperatures up. In this case, it changes the range to 1500 to 4500. If you take a look at the scale in the Wikipedia article, you'll see that this gives us a range of red-orange to a white-orange.

Finally, don't forget to take the output of the Mix shader and plug it into the Volume input of the Material Output shader.


Before I end this tutorial, let’s take a look at some differences between some settings. First of all, I think it is very important to note how drastic the changes are when High Resolution Smoke is turned on. Don't get too attached to how your smoke looks early on if you plan on using this setting!

Next I have some density comparisons. These were done by changing the Value setting of the Multiply node that comes after the Density attribute node. The higher you multiply those values the more dense your smoke becomes. The great thing about this is that it doesn't require rebaking the simulation to alter the density.

In the third row, the first two renders have different temperature ranges to alter the color of the fire. I only changed the value of the Add node just to shift the range on the color ramp. That said, you certainly aren't limited to the blackbody color range. You can easily replace the blackbody node with a color ramp and choose any color you like!

Keep Learning!

No single tutorial will cover everything, so if you want to dig deeper, here are some resources for you to check out. If you have other resources you think I should add to this list, feel free to let me know!

Blender Docs



Popular Now