Creating realistic fire in Blender 2.5Creation date: 2010-5-1
Last update: 2010-7-24
This tutorial shows how to use Blender 2.5 smoke simulator to create realistic fire effects. You are supposed to have basic knowledge of the smoke simulator so I'm only focusing on points that are related to fire effect.
In this tutorial we create the following scene: Suzanne monkey head on fire:
Check a finished *.blend file and other examples at the end of this tutorial.
Tutorial contents1. Emitter settings
2. Domain settings
3. Creating a fire-like material
5. Samples and tips
In this tutorial I'm using Blender's Suzanne monkey head as my fire flow.
Add a new mesh object and create a new particle system for it to be used as a smoke flow. You also can add the domain cube now or later when we move to domain settings.
To emit fire, you can always use a typical "No physics" particle system but in this burning Suzanne example I have used another method: moving short life particles.
It allows fire to have some random initial velocity causing some cool turbulence and random movement.
For the particle system I used the following setup: 100.000 particles with lifetime of 6. (Lots of particles are needed when using this low life time.) Then "Velocity" settings: I decreased the normal oriented velocity and added some random velocity. Don't use too high values because default "initial velocity" on smoke simulation is quite sensitive.
You can also emit particles from mesh "Volume" to reduce blockiness near emitter if you like.
Now just remove all gravity effect on "Force Fields" tab and particle system is ready. And of course it's good idea to set particle "Render" to "None" and "Display" to whatever you like.
Now create the smoke "Flow" using this particle system. As for the settings: I increased "Temp. Diff" to 2.0 to get faster rising fire. You can lift it even higher if you want it to rise even faster, lower it if you want "slow motion". This also depends on how large fire are you making.
Also note that "Density" should be set to 1.0 because our material settings rely on volume density and any lower density would mess up those settings.
Now I'm going to set up the domain. If you have a still emitter you can simply scale the domain to match emitter and add slight borders and some space on the top. When dealing with fire, it's easier to minimize the domain size needed because fire disappears so quickly.
Remember to scale your domain cube in "Object Mode"! (Scaling in "Edit Mode" will likely cause issues with fire texture coordinates.)
Now domain settings. The most important thing in domain panel is to enable "Dissolve". This will cause smoke to slowly vanish in the given time creating a very fire-like effect. I used "Time" of 21. You can adjust this quite freely depending on how small the emitter object is and how high fire you need. Also if you want to have more smoke coming out of fire you can double this value.
Then enable "Initial Velocity" because our particle system is made to have some velocity. If you are using a Blender build that has my new smoke patch, you can also tweak velocity multiplier and change domain border collision handling.
Resolution is up to you. Final resolution I used was 64 base, but 32 goes well for test simulations.
Second trick to get fire-like simulation is to use "High resolution" smoke with FFT-noise.
So enable "High resolution" and change "Noise Method" to "FFT". Please note that FFT isn't available on some builds. I don't know why.
I used 2 resolution divisions for final render, but you should run some test simulations before even enabling high resolution. This way you don't have to use so much time in resimulating if some values are messed up. :)
Also note when simulating fire that domain resolution changes fire behavior and looks. So using as high resolution as possible isn't the best way to go. High resolutions produce "smaller" flames and eventually it'll look unrealistic. So you have to keep reducing or increasing resolution if you need larger or smaller flames. That's why I "only" used final resolution of 64.
Hardest part is to render the fire properly. The trick is to use smoke density as emission value. This works, thanks to fast dissolve. Smoke is fading so fast that it doesn't lose it's shape and in general the density is very close to the "heat" of fire in similar situation.
In domain object material settings, I've used pretty low density scale and scattering. So set "Density Scale" 4.0 and "Scattering" 0.6. We also need to add emission. Set it to something between 2.0 and 10.0 depending on how bright fire you want.
You also have to significantly lower "Step Size" because bright emission spots cause noise very easily. I used "Step Size" of 0.015.
First you must create a texture similar to the one used to render normal smoke. This one will affect density only.
Now add another texture. It will be used to control emission strength and color. Set it to be voxel data as well.
Image illustrating the effect of emission texture. It controls both emission strength and color.
In texture settings enable texture "Influence" only on "Emission" and "Emission Color" and change "Blend" type to "Multiply". This way we can scale down material emission and color values on spots where density is low and preserve the high emission on dense areas. Now fire brightness depends on voxel data density.
And now the most important part. Scroll back up and open "Colors" tab, enable "Ramp" to use a color ramp to adjust fire color and brightness.
Here is my color ramp. It renders almost smoke free fire that is dark red on the edges.
When a using color ramp on voxel data left side is 0.0 density and right side is 1.0 density. We need high density to be bright and hot fire and it should become colder when density gets smaller.
You can also slide the "left edge" color to the right to add more smoke. If you leave it halfway, smoke with density less than 0.5 will be rendered as regular smoke with no emission whatsoever. In this tutorial I have used quite smoke free setting.
You can adjust color ramp to add more smoke. However you might also have to add more dissolve time to get high enough fire.
And there you have it. If you render now, it should look like fire. We just need to add some post-processing and we are done.
If you are new to post processing / compositing in Blender no worries. Just switch to "Node Editor" from any viewport.
Now click "Compositing Nodes" icon and select "Use Nodes" box.
Composition nodes are used to edit rendered image after rendering. Usually this includes color balancing, blurs and glows.
The effect we are adding is just a simple glow to make fire look brighter. I have used two glare nodes to produce a balanced but nice looking glow effect.
First I apply a "Glare" node to add "Fog Glow". It's the basic smooth glow. Then the second Glare node adds "Streaks" type glare. It's a star like glow and I think it fits very well for fire.
Tutorial sample files
Download the finished burning Suzanne scene: fire_sample.blend
Here is another sample created with almost identical domain settings, just with another particle system.
Download this sample: fire_sample_slide.blend
NOTE: Number of particles has been reduced to 1000 in these *.blend files to reduce file size. Remember to change it back to 30-100k before baking anything.
Other fire examples
Here is two more videos to demonstrate more ways you can use particle emitter to create different fire settings. No *.blend files are available for these, but you can make your own quite easily by editing those previous samples.
Mancandy - the master of fire: Made with multiple fire emitters. One emitting from Mancandy's hands, one for the fire ball and one for the flames in the end.
Flamethrower: Made with a high velocity particle emitter.
Tips to help you out
- For fast test renders, remember to use large step size and disable anti-aliasing.
- Use long lifetime static particles to get "stable" fire, short lifetime moving particles to get turbulence.
- You can see the simulation progress from Blender console window or on mouse cursor as percent.
- If you set material preview to "Cube", you'll get a tiny preview of the fire/smoke domain. You might find this useful when tweaking fire color ramp. Too bad you can't zoom in the material preview as it's kinda small right now. :P
Domain preview visible on material editor
- Blender 2.5 is an experimental version, so it might be unstable. That's why you should always use a recent build and save often.