Blender has a surprisingly powerful and flexible physics simulator capable of producing photorealistic smoke and fire simulations. Unfortunately the documentation for the tools required to produce these simulations are, at the time of this writing at least, is either non-existent or severely lacking. There are a few great tutorials out there however by other blender users, and that’s what I used to get started. That said, there are plenty of parameters and features that I have not seen covered by any tutorial thus far and so I decided to experiment myself and write a guide — mostly for my own reference, but for others as well.
The smoke/fire simulator is not new to Blender 2.60, however that is the version of Blender I am using at the time of this writing, hence the screenshots and descriptions will apply to that version. This guide will be a work in progress with plenty of placeholders and notes until such time as it can be completed.
Basic steps to create a smoke simulation
- Create a Domain. Smoke in Blender can only exist within a specified domain. Fortunately, creating a domain is very easy. To create a domain, select the object that will bound the domain volume (cubes work good), select the physics tab, select smoke from the choices, and then select domain. This converts the selected object into a domain. Important notes: i) When scaling the domain, do so ONLY in object mode. Scaling in edit mode confuses the physics simulator and the smoke will not render properly.
- Create an emitter. Smoke will be generated within the scene from the object designated as the smoke emitter. Any object can become an emitter, however the object must be placed within the domain created in the above step. Select the object, click on the physics tab, select smoke, and finally flow. This will turn the object into a smoke emitter. Ensure that the particle system box has been populated with a particle system name. If it has not, create a particle system manually and then ensure its name is added to this box. Important notes: i) When locating the emitter within the domain, ensure that the object is away from the edges of the domain. Being too close to the edge causes unpredictable behavior during simulation. ii) In prior versions of Blender, it was necessary to first manually create a particle system on the emitter, however in 2.60 a particle system is automatically created.
- Setup the material. Select the domain object. Click on the materials tab and add a new material. Choose Volume as the material type. Change Density to 0.0 – otherwise the entire domain will be rendered as solid smoke. Change Density scale to about 5, and also change Scattering to about 4. This will make the smoke more dense so it will render properly.
- Setup the texture(s). Click on the textures tab and add a new texture. Change the texture type to Voxel data. Ensure that the domain object box points to the name of the domain object. Under Influence, ensure that Density is the only box checked.
- Bake the simulation. Select the domain object and go back to the physics tab. Under the smoke cache dropdown, enter a name for the cache (it can be anything). If this area is greyed out, it is because the scene file has not been saved yet, so do this now. Click on Free all Bakes, and then change the resolution to a random number and then back to the original number (default 32) to ensure that the cache is clear. Finally, click on Bake all Dynamics. This performs all the calculations for the smoke simulation.
- View the results. Animating the scene or scrubbing through will show the movement of smoke within the domain. You should be able to render any frame or animation at this point as well, however the results will not be overly impressive without some more fine tuning of the many parameters available. These parameters and features are covered below.
With the domain object selected, click on the physics tab to bring up the settings for the domain itself. Following are the various pulldowns that are available along with descriptions of the parameters.
Resolution: Defines the level of detail for the simulation. A low number of divisions results in a grainy smoke, but is very quick to bake. A higher number results in very smooth smoke. The default resolution of 32 is perfect for testing purposes, while a resolution of 64 is usually good for final renders. A side effect of changing resolutions, is that it also drastically changes the behavior of the smoke. See the following video for an example of changing resolutions. This occurs because an increase in the resolution, increases the grid size in all three axes. A double in resolution therefore, doubles the size of the x, y, and z axes for a 2 x 2 x 2 = 8 times increase of the domain. To compensate, the number of particles should be increased in the particle system. If the emitter object is a three dimension object, the number of particles would be increased by 8, and if the emitter is a two dimensional object such as a plane, the particles should be increased by 4 (2 x 2).
Time: This setting provides a means to set a time scale for the simulation. Values here can range from 0.2 to 1.5, meaning that the speed of the simulation can range from 20% to 150% of the base simulation speed. See the below screen captures for an example.
Border Collisions: There are three options here, and they define how the smoke behaves when it reaches the outer boundaries of the domain.
- Vertically Open makes the smoke disappear when it crosses the top or bottom of the domain. Smoke that collides with the sides of the domain are treated as hitting a wall and remains inside.
- Open makes the smoke disappear when it crosses any boundary of the domain.
- Collide All treats all of the domain boundaries as walls, and serve to prevent the smoke from escaping.
Density: This setting defaults to a value of -0.001 which is not very intuitive as to what it actually represents. This number affects how “buoyant” the smoke is — in other words how fast it rises. The default setting results in quite naturally buoyant smoke, but as the numbers decrease to more negative numbers, the smoke will actually start to fall instead of rise, and larger numbers make it rise much faster. I have not been able to correlate how this number here physically correlates to the other density settings and parameters set elsewhere. As far as I can tell, this is just a unitless number that must be found by trial and error to get the desired effect.
Temp. Diff: This setting defaults to a value of 0.1 and also allows control over how much the smoke rises or falls based on the temperature of the smoke. The smoke’s initial temperature is set in the physics panel for the flow, described below. Larger numbers for the temp. diff parameters mean that the smoke will rise or fall faster. A value of 0 means that temperature does not affect the smoke’s buoyancy and it will remain stationary unless acted on by some other force. This setting must not be confused with the similarly named Temp. Diff. parameter on the Flow tab, which actually has a different effect. See below for more details.
Vorticity: Affects the amount of turbulence within the smoke, and has a default value of 2. This can be varied between 0.1 and 4, and produces a very subtle effect.
Dissolve/Time/Slow: Selecting the dissolve option makes the smoke fade and disappear after a specified period of time. This time is set in the time box, however I am not sure of the units. I have confirmed it is not seconds or number of frames, and may simply be a unitless number. If that is the case, it must simply be adjusted by trial and error. Finally, the slow option makes the smoke dissolve based on a log scale; it will dissolve quickly at first, but then slow down drastically.
Smoke Groups Pulldown
Flow Group: Unknown what this does.
Collision Group: Unknown what this does.
Smoke High Resolution Pulldown
High resolution smoke is an option that must explicitly be selected using the checkbox for this feature. Once activated, a number of other settings become available, shown above, for control of the finer detail in the smoke simulation.
Resolution: This resolution is completely separate from the resolution under the general smoke settings. Increasing this setting adds more detail to the simulation, however does not consume as much memory. Note that this setting not only affects the detail of the smoke, but also its behavior, especially if increased to values higher than 2.
Smooth Emitter: This option smooths the smoke at the emission point to remove blockiness, and should always be turned on.
Show High Resolution: This toggles whether or not to display the high resolution smoke in the 3D viewport. Sometimes having this option on will slow the computer down drastically, and this is the only reason you would want to turn this one off.
Noise Method: There are two choices available here, Wavelet and FFT. These are two different algorithms to add additional noise to the smoke simulation and make it more interesting. Wavelet is the preferred noise method for smoke, and FFT is typically used for fire simulations.
Strength: This works hand in hand with the noise method to determine how much noise to apply to the simulation. A higher number here means more noise.
Smoke Cache Pulldown
In order for a smoke animation to be rendered, it must be baked to disk. Baking is simply a term meaning that the physics of the smoke will be calculated and stored for each frame. In this way, during rendering the results need only be loaded into memory.
Compression: Baking has the potential to use a very large amount of disk space. Setting compression to either light or heavy controls the size of these files, at the expense of a longer bake time. As a trial, I recently baked a 250 frame simulation with a domain resolution of 64 and a high resolution division of 1. This occupied 4.2 GB on disk at light compression. The same simulation with compression set to heavy required 3.6 GB but over 5x the amount of time. Unless disk space is an issue, it is usually better to leave compression set to light.
File Name: It is possible to store more than one bake for a simulation on disk at the same time. Commonly this is used to store a low resolution and a high resolution version. Setting the filename here allows the user to distinguish which one is active. Bake files are generated for each frame of the animation and are stored in a separate subfolder in the same directory that the .blend file is saved. The folder will be called blendcache_[blend filename] and inside there will be a separate bake file for each frame. These file names will be prefixed by the bake file name specified in blender.
External: This overrides the default of saving bake files in a subfolder of the .blend file and allows the user to specify another disk location explicitly.
Start/End: This allows the user to specify the start and end frames for which to bake the simulation.
Bake: This actually begins the baking process, performing the physics calculations and saving the results to disk as described under File Name above.
Bake All Dynamics: ??
Calculate to Frame: ??
Free All Bakes: This releases the parameters that affect the smoke simulation and allows them to be modified. Doing so however, renders the current bake invalid. Note that freeing all bakes does not automatically delete the bake files from disk as you would expect. To delete the files it is necessary to perform a little trick by incrementing and then immediately decrementing the domain resolution by one. This works because any change to the domain resolution automatically deletes the bake files from disk.
Current Cache to Bake: ??
Update All to Frame: ??
Smoke Field Weights
Since smoke is a physics system, it is capable of being affected by force fields that are applied to the scene. How much each field affects the smoke is controllable by changing the values under smoke field weights. A value of 1 will allow the normal effect of the field. A value of 0.5 would cut the field effect in half, and a vale of 3 would triple it. The All parameter is sort of a master controller and reduces or increases all field weights.
The flow settings are accessible by selecting the emitter object and going to Physics -> Smoke -> Flow. These parameters allow setting of the domain object the smoke system is to be contained in, as well as some additional options that affect the smoke behavior.
Outflow: Checking the outflow box causes smoke to be deleted from the system when it collides with the object, effectively turning the object into a consumer rather than an emitter. Note: This feature does not appear to be working currently.
Particle System: Smoke is actually created from a particle system attached to the emitter object instead of directly from the object itself. The Particle System selection box allows the user to specify which particle system is attached to the object.
Initial Velocity: The particles in the particle system can be given a velocity, and this checkbox indicates whether the smoke generated from these particles is to inherit this velocity or not. The multiplier parameter allows you to apply a factor to the particle velocity for more flexibility.
Absolute Density: When enabled, emitter behaves just like before: adding smoke exactly with the density given. Without it, however, emitter can work as an additive source. For example having 0.1 density can still give very dense smoke but smoothly, slowly increasing the previous density.
Temp Diff.: While named the same, the Temp. Diff parameter under the Flow settings, operates differently than the one set under the domain. The flow version of this parameter sets the initial temperature of the smoke. This is also referred to as the Heat of the smoke. Negative values cause the smoke to fall while positive values cause it to rise. The temperature of the smoke is also accessible by textures via the Heat voxel data source. This could be used to color the smoke depending on temperature for example. I have also confirmed that smoke will gradually lose heat and cool down to the ambient temperature.
Particle System Settings
Smoke is generated from the particles in a particle system, which in turn is attached to an emitter object. As such, the particle settings greatly effect the behavior of the smoke. Following we will explore the relevant settings. Note that not all settings will be covered, as not all of them are important for smoke simulation.
Amount/Start/End: This specified the amount of particles to be generated. It is important to realize that particle emission occurs over time, and is defined by the values in the start and end parameters below. In the example above, both the start and end time are set to frame 1, which means that all 100 particles will be created at the same time. If the end time were set to frame 100, then 1 particle per frame would be generated.
Lifetime/Random: The lifetime parameter specified how long the particle will exist for, in number of frames. A lifetime value of 100 means that the particle will disappear after it has been in existence for 100 frames, and it will continuously emit smoke each frame it is alive. The random parameter allows some variance to the lifetime.
The remaining emission parameters have very little effect on smoke simulation.
Applying velocity to the particles enables the user to impart motion to the smoke. These settings define the direction and speed of the particles that emit the smoke. These parameters are very closely tied to the Initial Velocity checkbox available under the Physics -> Smoke -> Flow options for the emitter itself.
Emitter Geometry: Specifying a value for Normal here specifies the direction to be normal to the object’s surface. Likewise Tangent will impart a velocity tangent to the object’s surface.
Emitter Object: Specifying an X, Y, and Z component allows the user to specify an exact vector for the direction and magnitude of the particle’s velocity.
Object: This causes the particle to take on the velocity of the object the particle system is attached to.
Random: This allows for some variation in the velocities of the particles that are emitted so that they are not all the same.
The Physics parameters define the size of the particles and also whether or not physics are applied and what type. For smoke simulations, set the No option if you do not want the particles to have any motion, and set Newtonian to follow the velocities specified in the Velocity Pulldown above.
The only parameters here that should be changed is to select the None option, and to turn off the Emitter. This will cause Blender to not render the particles themselves or the emitter. We only want the smoke, not the particles to be viewable during render time, and in most cases we do not want the emitter to be visible either.
These parameters affect how the particles are visulized in 3D view (but not during rendering). Usually the display is set to Point so that the behavior of the particles can be monitored and tested, and the other values are left at their defaults.
Domain Material Settings
In order for the smoke to be visible during a render, the domain must be given a material and texture(s). The relevant settings are explained below.
Material Type: For smoke simulations, the material type must be changed to Volume. This is a special material type that allows Blender to map textures to the interior of the domain object instead of to the outer surface like a normal material. Also, it is usual to select the cube for the preview menu to match the shape of the domain. At first the preview cube will appear to be full of smoke, but we will change that with the density setting below.
Density and Shading
Density: For smoke to work properly, the density must be set to 0 on the material. This is because we don’t want the domain to contain smoke uniformly spread throughout its volume; we want the smoke to be visible only where determined by our simulation.
Density Scale: The density scale parameter is used in conjunction with the Scattering parameter below. This can be used to adjust the smoke to make it appear more or less dense, and essentially acts as a multiplier on the Scattering value. The default of 1 is too low for the density scale. Usually this must be set to a value of 4 or 5.
Scattering: This parameter affects how much light gets scattered out by the smoke. Increasing this value causes more light to be scattered, meaning that there is less penetration. Normal values for scattering are between 3 and 4.
Emission: This determines how much light is emitted from the smoke, and is the primary means of turning smoke into fire, when used in conjunction with appropriate textures as will be explained below. For a normal fire, emission levels of around 5 work well.
Step Size: This is one of the most important parameters to achieve a realistic looking smoke render. Integration affects how noisy/blocky the smoke is when rendered, independent of what the actual physical resolution is set under the physics tab. This parameter also greatly affects render time. For test renders, a good value for the integration parameter is 0.2 and for final renders it is normal to set this to 0.05 or even smaller. Setting this parameter too low can make your smoke look very blurry or out of focus, so it is important to strike a balance between noise and blur.
The other parameters under the Integration pulldown are not normally changed for a smoke or fire simulation.
Domain Texture Settings
Texture settings are ultimately what affect the appearance of the smoke or fire and cause it to become visible. For normal smoke, just a single texture is required. To simulate fire, a second texture is overlaid on top of the first texture, as described below.
Smoke texture (required for all smoke and fire simulations)
Type: For smoke simulations, the type must be set to Voxel Data. This means that the texture is going to take the smoke volume information created by the physics module and translate this into a visible texture. For preview, it is usually helpful to set the display to Both and the preview model to cube.
Voxel Data Pulldown
File Format: This must be set to Smoke, to specify that the physics data we will be using is from the smoke simulator.
Domain Object: Next, we must link this texture to the Domain object by means of this box. Select the domain object here. It is not clear to me why this step is necessary. The texture is already attached to a material, which in turn is applied to the domain object already. I suppose this setting may allow the user to use voxel data from a different domain, but I am not clear on what this would accomplish. Some more experimentation may be necessary on this one.
Source: For the smoke texture, this must be set to Density. This means that the Density information from the smoke simulation will be used to apply the texture depending on the influence settings below.
The remainder of the settings in this pulldown are not useful for smoke simulations.
Influence: For the primary smoke texture, we want the Density checkbox selected only. When I first went through this I found myself being confused as to why we had to select Density here as well as in the Voxel Data settings as well. It actually makes sense though. What we are telling Blender to do is to take the Density information from the physics simulator (Voxel Data), and to use it to influence the Density of the smoke in the texture!
Blend:This should be set to Mix.
The remainder of the texture settings are not relevant for the primary smoke texture.
Rendering the Smoke
Rendering with the basic smoke texture alone produces very realistic, thick, grey smoke.
Flame Texture (Optional – only required for fire simulations)
To create fire in Blender, we start with a basic smoke texture as described above. We then apply a second texture over the top and set it to change color. In this way we can have smoke and fire in the same simulation. Anything that meets the color criteria of the overlay texture takes on the color of the flames. The transparent portions of the flame show the bottom texture through, which is smoke. This is the basic idea behind a fire simulation.
Type: It is common to name the two textures differently to easily distinguish between them. I usually name the primary smoke texture Density and the fire texture Flame or something to that effect. The type of this second texture is also set to Voxel Data. Again, turning on the preview to Both and Cube provides the easiest way to gauge how changes to the texture will appear when rendered.
Voxel Data Pulldown
All of the options for Voxel Data on the flame texture are exactly the same as for the first smoke texture. The only exception is potentially the source. Although the Density data works well for flame coloring, it is also possible to use the Heat setting, which will use the temperature of the smoke instead of density. This can be more realistic in some situations. Also, an easy way to increase the intensity of the flames if necessary is to adjust the Intensity setting at the bottom of this pulldown. This will apply a multiplier to the Density / Heat data to make it more intense.
Influence: For the original smoke texture we used the physics density data to influence the density of the texture. For the flame texture we now want to use the same density data (or heat if going that route) to determine the color of the smoke and also how much light it emits. We do this by checking both the Emission Color and Emission checkboxes as shown above.
Blend: We want the flame texture to overlay on top of the smoke texture, not mix. To accomplish this we set the blend type to Multiply. What this means is that where the flame texture isn’t producing any color (zero value) we are multiplying by zero which equals zero contribution from the flame texture — our smoke texture shows through 100%. If this were set to mix we would essentially be taking an average between our smoke color and nothing, which would weaken our smoke significantly.
To apply colors to our smoke and produce a flame, we need to adjust the colors appropriately. The Ramp checkbox must be checked, which allows us to apply colors based on the intensity of the voxel data we are operating on — either the density or the heat. usually four steps are required in the ramp as shown above. New steps are added by clicking the Add button, and each can be selected by either right clicking or stepping through them with the arrows above the color bar.
The way the color bar works is that the color on the left will be applied to the density/heat data with a value of 0. The color on the right side of the ramp will be applied to density/heat values of 1 (100%). The gradient in between is applied appropriately. Usually, the far left color will be set to 100% alpha. This will cause the fire to show smoke in the low density regions, as though the fire has burned out leaving only smoke and ash behind. The colors are then red, yellow/orange, and white from left to right, each set to completely opaque. Depending on the type of flame, blue is sometimes used on the far right color to simulate extremely high temperatures.
A common problem is that the colors on the color ramp are not applied to the smoke. This is usually caused by one of two things. It is important that the Emission level on the Material tab is set to a non-zero number, usually between 2 and 10. Secondly, it may be possible that the smoke is simply not dense/hot enough to get beyond the alpha range on the left of the color ramp. This can be fixed by sliding the color ramp steps closer to the left of the ramp, or more commonly by increasing the density of the smoke by changing the smoke parameters. If there is not enough smoke left over after the flame burns out, increasing the dissolve time of the smoke will make it linger around longer for added effect.
Rendering the Fire
If everything is done properly, when rendered, there will be a colorful flame, accompanied by wispy smoke.
Minimize the Domain Size. The domain should be sized so that it is just larger than the extremities of the smoke within the simulation. This will minimize render time and also allow you the ability to increase the resolution settings higher than would be possible otherwise due to the reduced memory requirements of the computer. It is important to only scale the domain in object mode however, as scaling in edit mode will cause problems when texturing (repeating textures, wrong location, etc.)
Don’t change the longest side of the domain. The resolution of the domain is defined by the longest side of the cube. Changing the longest side therefore changes the shape and size of the grid units that make up the resolution and will affect the appearance of the resulting simulation. For this reason, once the simulation has been tested and you are in the process of fine tuning, do not change the longest side or else you may need to start from scratch perfecting settings/parameters all over again.
Work in your final resolution. The resolution should be switched to final quality early on during the scene preparation process. This is because resolution changes drastically affect the appearance of the smoke. To offset the much longer render times, bake and render only a small subset of the total frames in the simulation (20 – 40 frames is usually sufficient).
Allow light to pass through the domain. By default, the rendering engine treats the domain cube as a solid object with respect to lighting. This means that even though the domain itself is not visible in the scene, it will cast ugly shadows as though it really were there. This can be fixed by going to each object that should be receiving light, and turning on Receive Transparent under the Shadows pulldown of the object’s Material Tab. This will allow light to pass through transparent objects such as the domain and provide light to the receiving object.
Why is my smoke so faint? Very faint smoke during rendering is usually caused because the density scale and scattering values are too low in the domain material properties. Try setting the density scale to 5 and the scattering to 4, and this should resolve most problems.
Below are several tutorials that provide direction to do some pretty cool effects using smoke and fire in Blender. The only caveat is that all of these tutorials are based off of older versions of Blender and some of the parameters and interface has changed since then. They are still useful for gaining understanding of overall concepts however, and only some of the steps will require changes.
- Introduction to Smoke & Fire Simulation in Blender (Video)
- Blender Guru: Introduction to Smoke Simulation (Video)
- Blender Guru: Creating Realistic Fire (Video)
- Blender Guru: Creating a Flamethrower (Video)
- Creating a Photorealistic Candle Flame (Video)
- Creating a whirling drum of smoke (Text)
- Mixing Smoke of two different colors (Text)
- Creating Realistic Fire in Blender (Text)