Realistic Smoke in Blender

Материал из Blender3D.

Перейти к: навигация, поиск

Содержание

Introduction

Like any other atmospheric effects, creat- ing realistic smoke is not an easy task. Every kind of smoke requires different techniques. If you need to simulate ciga- rette smoke, check out the wonderful tutorial of Meltingman in this Blenderart's issue. It's a really easy way to do it with convincing results. But when you need to simulate a more dense smoke, you have to choose another technique.

Of course, the best tool you could use for that is based on fluid simulation for creat- ing motion and voxels for rendering. For instance, Light- wave provides a powerful tool named «Hypervoxel» to achieve this kind of effect. Because Blender doesn't have those features and because voxels rendering can be a time consuming process, we have to choose another method.

For several years, CG artists working in the special effects' industry have been using particle systems. Controlling the particles flow is not the hardest part, the most difficult part is rendering it. How many particles do you need to create realistic sand movement like the Spiderman 3 scene «Birth of Sandman»? Another example : you have to control billions of particles when you want to simulate an avalanche, how do you render each snowflake and give it the right shading?

For all these kind of effects, such as clouds, smoke, torna- does, waterfall, sand tempest, burning meteorite, plane crash, explosion, and more ... you can used a wonderful technique called «Sprites» ... or «Billboards» in Blender. Let's see how to use them.

Source(s): Realistic Smoke in Blender

A) Creating the emitter and textures :

Step 01:

Create a new Add >> Mesh >> Plane, then leave the edit mode using the "Tab" key if needed.

Step 02:

Press ALT+R and ALT+G keys to place the plane at the center of the world.

Step 03:

Press the N key to show "Transform Properties" in a floating window. Set Scale X, Y and Z to 0.725 and Loc X to -4.

Step 04:

Press the Tab key to switch to edit mode and press the A key to select all vertices.

Step 05:

Press the U key and choose "Unwrap" to generate UV co- ordinates. If the emitter does not have UV coordinates, Bill- boards won't be displayed correctly. Press "Tab" again to exit the edit mode.

Step 06:

In a "Buttons Win- dow", press the F5 key to switch to the "Shading" panel, select the plane and click on "Add new" to assign a new shader to your ob- ject.

Step 07:

In the shading editor, check "Shadeless" to make your smoke visible, even if there's no light in your scene.

Step 08:

Check the "ZTransp" button to activate transparency without using raytracing and set the A ("Alpha") value to 0, using the texture's transparency instead of "global" alpha.

Step 09:

Press the F6 Key to show the "Textures" panel.

Step 10:

Click on one of the blank but- tons and press "Add New".

Step 11:

Set the texture's type to "Clouds" and set "NoiseSize" to 2, "NoiseDepth" to 6 and rename your texture to "Smoke_Color".

Step 12:

Once again, click a new blank field, press "Add New", choose "Clouds" as the type and "NoiseSize" to 1.3 and "NoiseDepth" to 6. Re- name this texture "Smoke_Alpha".

Step 13:

Show the UV/Image editor to paint a new texture and cre- ate an Image >> New.

Step 14:

Set "Width" and "Height" to 512, defining the size of the new texture and press OK.

Step 15:

Press the "Enable Painting Texture" button of the header of the UV/Image Editor to activate the "paint" mode and press N and C keys to show the "Image Paint" and "Image Proper- ties" pal- ettes.

Step 16:

Use the paint tool to create a random white shape, but don't touch the edges of the image. They have to remain totally black. While painting you can press the "Airbrush" button to paint continuously.

Step 17:

Once your texture is finished, name it "Smoke_Mask" and check the "Pack into blend" button. Blender will ask if you want to repack this texture as a PNG file ... just click on it. Step 18: Get back to the shading editor using the F5 Key.

Step 19:

Click on the "Texture" tab, click "Smoke_Color" and switch to the "Map Input" tab.

Step 20:

Check the "UV" button, click on the "Map to" tab and check "Color". Uncheck any other button if neces- sary.

Step 21:

Click on the purple color and set it to white.

Step 22:

Get back to the "Texture" Tab and select "Smoke_Alpha". In "Map Input", check "UV" then in the "Map to" check "Color" and "Alpha" (be careful, don't check the Alpha button twice otherwise the transparency will be inverted).

Step 23:

Click on the purple color and set it to black.

Step 24:

Get back to the "Texture" tab and select "Smoke_Mask". In "Map Input", check "UV" and in the "Map to" tab check only "Alpha".

Step 25:

Set the purple color to Black and change the "Mix" mode to Multiply.

B) Animate your particles flow :

Step 01:

Select the emitter object (here, the plane) and press the F7 Key several times until the Particle panel appears.

Step 02:

Click the "Add New" button to create a new flow, named «Psys».

Step 03:

For "Initial Velocity", set "Normal" and "Random" speed to 0.5

Step 04:

In "Global effects", set the ac- celeration parameter "AccX" to 7, "AccZ" to 3 and "Brown" to 15 (really useful to have a non- linear motion).

Step 05:

Now you have to create a new camera, because we are going to use the famous particle's type named "billboard".

Step 06:

In the "Visualization" panel, set the particle's type to Billboard. Billboard, aka "Sprite" is a sim- ple square always facing the camera (that's why you have to create a camera to refer to ).

Step 07:

Check the "Lock" button to keep all Billboards parallel to avoid intersection between them.

Step 08:

Set the "Tilt" (rotation value, which seems to be expressed in "Radian" unit) to 0.015 and set the "Rand" value to 0.4 to give each billboard a different angle at birth.

Step 09:

In the "Particle System" tab, set the "Amount" value to 300, "End" to 200 and "Life" to 75 ... or a little bit more, until your billboards go off-screen when you look through the camera.

Step 10:

Save your scene somewhere on your hard drive. I'm not kidding, it's really important !

Step 11:

Click on the "Bake" tab, just next to the present one and click on "Bake". A new directory is created next to the .blend file you saved on your hard drive, (do you understand now why it was so important?), filled with a bunch of files (one per frame) where all particles data is stored. FYI : Once your data is baked (or "cached" in other words), you can still edit all parameters that won't affect the parti- cles' motion (like size, color, transparency, children, ...)

C) Animate the billboards twist and size :

Step 01:

Now that your particles' flow is baked, select the emitter ob- ject (here, the plane) and switch to the IPO Editor.

Step 02:

Click on the "Show IPO type" combo list and choose "Particles". Now you can see different particles' parameters on the right of the editor.

Step 03:

Click on "BBTilt" (meaning Billboard Tilt). This parameter is used to rotate the billboard according the camera view and particles' age.

Step 04:

Press CTRL key, and click with the left mouse button around the coordinates 0.0/0.0, adding a new point (use the right mouse button if "Select with Left mouse button" is set in your Blender's preferences).

Step 05:

Once again, create a new point around the frame 200 with a value of 2.0.

Step 06:

Tweak the tangents' knots to mimic a logarithmic curve.

Step 07:

Click the "Size" param- eter, on the right of the IPO Editor, and create a new point at 0.0/0.0 as the same way you've done for the "BBTilt" parameter.

Step 08:

Add a new point around frame 200 with a value of 20. Leave the default interpolation unchanged. Now if you press "Play" you can see your billboard growing and twisting along the animation.

Step 09:

Press F12 to start render and see what happened. Yes, now you have heavy and dusty smoke !!!!!

D) Enhance your render with compositing :

Step 01:

OK, now your smoke looks realistic but looks too flat and needs more details and contrast. So, just open the "Node editor" and press the "Composite Nodes" and "Use nodes" buttons.

Step 02:

If you have no "Render Layers" in your composite graph, add a new one via Spacebar >> Add >> Input >> Render Layers.

Step 03:

Create a new Spacebar >> Add >> Output >> "Composi te" node and a new Spacebar >> Add >> Output >> "Viewer"

Step 04:

Create a new Spacebar >> Add >> Distort >> "Displace", plug the out- put parame- ter "Image" of the "Render Layers" into "Image" and "Vector" of the "Displace" Node.

Step 05:

Set the "X Scale" and "Y Scale" of the "Displace" to 20. The Dis- place is used to give to the smoke a more "fluid" motion.

Step 06:

Create a new Spacebar >> Add >> Filter >> Filter and set it to "Kirsch" mode.

Step 07:

Plug the output "Image" of the "Render Layers" to the "Image" input of the "Kirsch" node.

Step 08:

Set the Fac of the "Kirsch" to 1.0 if needed. Kirsch is used to generate additional details that will be mixed to the original render.

Step 09:

Create a new Spacebar >> Add >> Color >> Mix, plug the "Image" output of the Displace to the first "Image" in- put.

Step 10:

Plug the "Image" out- put of Kirsch into the sec- ond input of the Mix, set the "Fac" value to 0.15 and click on the "A "("Alpha") button.

Step 11:

Create a new Spacebar >> Add >> Filter >> Blur and set the X and Y parame- ters to 2. This Blur is used to give to the smoke a softer look.

Step 12:

Plug the "Image" out- put of the "Mix" into the "Image" input of the "Blur" node..

Step 13:

Add a Spacebar >> Add >> Filter >> "Glare" node. Set it to "Fog Glow" mode and plug the output of the blur node into this single Input.

Step 14:

Set the "Mix" value to 0.15, "Threshold" to 0.40 and "Size" to 9. Now your smoke looks more contrasted, visually increasing the density.

Step 15:

To finish, plug the Glare's output into "Composite" and "Viewer".

Step 16:

In the "Buttons Window", press F10 key to switch to render settings and check "Do Composite".

Step 17 :

Set the "output" path where you want to save your rendered frames and press "Anim" to render your animation.

Conclusion

With Billboards, you can achieve a lot of wonderful and realis- tic effects. A standalone piece of software called «Particle Illusion» (http://www.wondertouch.com) is a sprites' based special effects tool, working exactly the same way as Blend- er's Billboards ... but in realtime (I'm waiting for all the devel- opments created by the Apricot project, especially GLSL support in the 3D view that will make possible the visualiza- tion of the billboards in realtime, with shading and alpha).

Take a look at this incredible tool ... it will certainly give you some ideas of what is possible with this technique. The next step is to provide Blender the same kind of libraries available with «Particle Illusion» to easily create those effects, like a scene containing several Psys (smoke, waterfall or fire), ac- cessible by any emitter in the scene and imported via File >> «Append or Link».

Make your own libraries and share them with everyone : All the particles effects could be collected in a single website, like www.blender-materials.org for instance and available for everyone. Together, we can make it ! So, lets play with bill- board and particles and enjoy !!!

Личные инструменты