Particle Smoke

A large amount of post processed particles can be used to simulate smoke. The following tutorial shows how to do this.

Tutorial level: Medium

Example project: 'tutorprojects/postprocessing/smoke'

1. The first step is to model a cloud of particles. Activate the Particle tool from the Creation toolbar and select the airbrush options like shown below. Drag around the view window to draw an irregular cloud of particles. Select Accept to finish the tool.

Options for drawing a 1D particle cloud
The smoke scene

2. Go to the Simulation toolbar and activate the Fan tool. In the view window click below the particle cloud and click again slightly above to define a vertical axis for the fan (you might want to hold down the shift key to enable movement locking). Define an appropriate width for the fan.

3. To achieve a more interesting animation, place an object above the particle cloud. So go back to the Creation toolbar and activate Analytic Sphere from the Analytic tab. Create a sphere above the particles.

4. You may also add a light source to illuminate the scene (use Light Sources/Point from the Light Sources toolbar).

The scene should now be similar to the adjacent illustration.

5. Next you have to adjust some object properties. Go to the select window and activate the fan object. Open the property window from the popup menu. Go to the Spec tab and set Turbulence to 0.8. The other default settings are OK for our example.

Defining fan turbulence to 0.8
Turning off Scan Line

6. Select the 1D Particle object from the select window. The property window shows three sub tabs in particle's Spec options. Clear Scan Line from Rendering options. You may also check the Geometry tab. It shows the amount of particles in the Count field. You will need several thousand particles. You can easily increase the amount by typing the desired value to the Count field.

7. Switch to the Sim tab of the property window (the particles should still be selected). Set Collision Detection to Affected, because we want the particles to travel around the sphere, not through it. Set Fluid Dynamics to Affected, so that the airflow from the fan will move the smoke.

The simulation options of particles

8. Switch to the Phys tab. Change the Rigidity slider from 1 to zero. This allows individual particles to move freely instead of being a rigid object.

9. Switch to the Col tab. The Surface Properties frame includes a property list and a value gadget for the selected property. First select a suitable color for the smoke, for example a light gray. Then select Fade form the Attribute list and define a high fade value between 0.90 - 0.99. The more particles you created, the more transparent one single particle can be. Do not set fade to 1.0, because then you would not see any particles at all.

Zero rigidity allows particles to move freely in airflow

Defining the color and fade of particles

10. The particles are now ready. Next select the sphere. Go to the Phys tab of the property window and increase the Mass value to 1000 kilograms. The smoke should not move the sphere which would happen if the sphere is very lightweight. Alternatively, we could also make the smoke very light.

11. Go to the Sim tab and set Collision Detection to Cause to enable collisions with the particles.

12. Now select the root level of the object hierarchy. Activate Simulation from the tool control bar icon or from the Spec tab of the property window. This instructs the program to compute physical simulation according to the properties we defined above for the selected hierarchy level.

13. Select Post Particle Effects from the select window. Select New/Particle Discs from the popup menu. The property window now shows the default properties of the effect. Change the name of the effect to 'smokeparticle'. The other properties are quite suitable: each particle has a diameter of 2 millimeters, which should work well. The drawing mode is Replace, which is also OK, because smoke hides objects (i.e. the color of smoke replaces colors of the objects behind it). When creating fire, a more suitable drawing mode would be Add. Now close the property window.

The post effect for drawing smoke particles

14. Switch back to the Geometric Objects tab of the Select window and make sure that root is selected. Go back to Post Particle Effects tab and drag & drop the smokeparticle effect to the view window. This applies the post particle effect to the currently selected level (which is the root level in our example).

The scene is now ready. From the Geometric Objects tab check that your object hierarchy is similar to the example image.

The hierarchy of the completed scene

Having an other object than root selected while dropping the smokeparticle effect to the view window adds a new hierarchy level (which contains the selected object and the mapping). This would confuse the simulation preparations we already made.

15. You may test render the view window to see how it looks like. Adjust the Particle Size of the effect and/or the Fade value of the particle object if you need to change the thickness of the smoke.

16. Open the animation window (from the View menu) and set the frame count to a suitable value (200 - 300). Play the animation to see how the particles behave. If they are not moving fast enough, decrease the mass of particles. Another important attribute for controlling the velocity of particles is the Fluid Velocity attribute of the fan (in the Phys tab of the property window). It defines the terminal velocity of the particles.

The final step is to render the whole animation. See the rendering tutorials if you are not yet familiar with file rendering. Before starting rendering, make sure that Default Effects (or any other post processing configuration you plan to use) includes the Render Particles module.