From BlenderWiki

Jump to: navigation, search

This and next page only for Blender Pre-2.45
This wiki page and the next that has more detail are for Blender versions before 2.45. Read these pages only for a better understanding of the basic system, or if you are using an old Blender version.

[edit] Particles

The particle system of Blender is fast, flexible, and powerful. Every Mesh-object can serve as an emitter for particles. The particles themselves can be mass-less, like Halos, or can be objects, like a coin or piece of confetti. These objects can be any type of Blender object, for example Mesh-objects, Curves, Metaballs, and even Lamps.

Particles can be influenced by a global force to simulate physical effects, like gravity or wind. With these possibilities you can generate smoke, fire, explosions, dust, fireworks or even flocks of birds. With hair particles you can generate fur, grass, and even plants.

Start from Frame 1:
To re-initialize the particle engine, it may be necessary to rewind all the way back to frame 1 and play forward after making changes to any settings or to the emitting mesh, so that Blender can re-calculate the particle motion.


[edit] Mini-Tutorial: A first Particle System

Reset Blender to the default scene, or make a scene with a single plane added from the top view. This plane will be our particle emitter. Rotate the view so that you get a good view of the plane and the space above it (The emitter.).

The emitter.

Switch to the Physics Tab (Image:Manual-Interface-Physics_buttons.png) in the Object Context (F7 or Image:Manual-Part-I-Interface-Context-Object.png) and click the button NEW in the Particles tab, which then fills up with plenty of controls - and a new tab (The Particle Buttons.).

The Particle Buttons.

In the Particle motion tab, set the Normal: NumButton to 0.100 with a click on the right part of the button or use Shift LMB Image:Template-LMB.png to enter the value from the keyboard. Play the animation by pressing Alt A with the mouse over the 3DWindow. You will see a stream of particles ascending vertically from the four vertices.

Congratulations - you have just generated your first particle-system in a few easy steps!

To make the system a little bit more interesting, it is necessary to get deeper insight on the system and its buttons (Particles settings.):

  • The parameter Amount: controls the overall count of particles. On modern speedy CPUs you can increase the particle count without noticing a major slowdown.
  • The total number of particles specified in the Amount: button are uniformly created along a time interval. Such a time interval is defined by the Sta: and End: NumButtons, which control the time interval (in frames) in which particles are generated.
  • Particles have a lifetime, they last a given number of frames, from the one they are produced in onwards, then disappear. You can change the lifetime of the particles with the Life: NumButton.
  • The Normal: NumButton used before (Particle motion tab) made the particles having a starting speed of constant value (0.1) directed along the vertex normals. To make things more "random" you can set the Random: NumButton to 0.1 too. This also makes the particles start with random variation to the speed.
  • Still in the Particle motion tab, use the Force: group of NumButtons to simulate a constant force, like wind or gravity. A Force: Z: value of -0.1 will make the particles fall to the ground, for example.
Particles settings.

This should be enough to get you started, but don't be afraid to touch some of the other parameters while you're experimenting. We will cover them in detail in the following sections.

[edit] Rendering a particle system

Maybe you've tried to render a picture from our example above. If the camera was aligned correctly, you will have seen a black picture with grayish blobby spots on it. This is the standard Halo-material that Blender assigns a newly generated particle system. Position the camera so that you get a good view of the particle system. If you want to add a simple environment, remember to add some lights. The Halos are rendered without light, unless otherwise stated, but other objects need lights to be visible.

Go to the Material Buttons (F5) and add a new material for the emitter if none have been added so far. Click the Button "Halo" from the Links and Pipeline tab (Halo settings).

Halo settings

The Material Buttons change to the Halo Buttons. Choose Line, and adjust Lines: to a value of your choosing (you can see the effect directly in the Material-Preview). Decrease HaloSize: to 0.30, and choose a color for the Halo and for the Lines (Halo settings).

You can now render a picture with F12, or a complete animation (Ctrl F12) and see thousands of stars flying around (Shooting stars).

Shooting stars

[edit] Objects as particles

It is very easy to use real objects as particles, it is exactly like the technique described in DupliVerts. Start by creating a cube, or any other object you like, in your scene. It's worth thinking about how powerful your computer is, as we are going to have as many objects, as Amount: indicates, in the scene. This means having as many vertices as the number of vertices of the chosen object times the value of Amount:!

Scale the newly created object down so that it matches the general scene scale. Now select the object, then Shift RMB Image:Template-RMB.png the emitter and make it the parent of the cube using Ctrl P. Select the emitter alone and check the option "DupliVerts" in the Anim Settings tab in the Object buttons, Objetc context (F7). The dupliverted cubes will appear immediately in the 3DWindow.

Setting Dupliverted Particles.

You might want to bring down the particle number shown in the 3D views before pressing Alt A: the numbutton Disp: allows you to set the percentage of particles to show in the 3D views (Setting Dupliverted Particles.). In the animation you will notice that all cubes share the same orientation. This can be interesting, but it can also be interesting to have the cubes randomly oriented. This can be done by checking the option Vect in the particle-parameters, which causes the dupli-objects to follow the rotation of the particles, resulting in a more natural motion (Setting Dupliverted Particles.). One frame of the animation is shown in (Dupliverted particles rendering.).

Original Object
Take care to move the original object out of the camera view, because, differently than in regular Mesh Dupliverts, in Dupliverted particles it will also be rendered! -- This may have been true in older versions but in 2.45 this does not appear to be necessary; the dupliverted object does not show up in the render. If this can be confirmed then this Note can be removed.


Dupliverted particles rendering.

[edit] Making fire with particles

The Blender particle system is very useful for making realistic fire and smoke. This could be a candle, a campfire, or a burning house. It's useful to consider how the fire is driven by physics. The flames of a fire are hot gases. They will rise because of their lower density when compared to the surrounding cooler air (same principle as a hot-air balloon). Flames are hot and bright in the middle, and they fade and become darker towards their perimeter. Prepare a simple set-up for our fire, with some pieces of wood, and some rocks (Campfire setup.).

Campfire setup.

[edit] The particle system

Add a plane into the middle of the stone-circle. This plane will be our particle-emitter. Subdivide the plane once. You now can move the vertices to a position on the wood where the flames (particles) should originate.

Now go to the Object Context F7, Physics buttons, and add a new particle system to the plane. The numbers given here (Fire particles setup.) should make for a realistic fire, but some modification may be necessary, depending on the actual emitter's size.

Fire particles setup.

Some notes:

  • To have the fire burning from the start of the animation make Sta: negative. For example, try -50. The value of End: should reflect the desired animation length.
  • The Life: of the particles is 30. Actually it can stay at 50 for now. We will use this parameter later to adjust the height of the flames.
  • Make the Norm: parameter a bit negative (-0.008) as this will result in a fire that has a bigger volume at its basis.
  • Use a Force: Z: of about 0.200. If your fire looks too slow, this is the parameter to adjust.
  • Change Damp: to 0.100 to slow down the flames after a while.
  • Activate the Bspline Button. This will use an interpolation method which gives a much more fluid movement.
  • To add some randomness to our particles, adjust the Random: parameter to about 0.014. Use the RLife: parameter to add randomness in the lifetime of the particles; a really high value here gives a lively flame.
  • Use about 600-1000 particles in total for the animation (Amount:).

In the 3DWindow, you will now get a first impression of how realistically the flames move (Alt A). But the most important thing for our fire will be the material.

[edit] The fire-material

With the particle emitter selected, go to the Shading Context F5 and add a new Material. Make the new material a halo-material by activating the Halo button. Also, activate HaloTex, located in the shaders panel. This allows us to use a texture later.

Flames Material.

Give the material a fully saturated red colour with the RGB-sliders. Decrease the Alpha value to 0.700; this will make the flames a little bit transparent. Increase the Add slider up to 0.700, so the Halos will boost each other, giving us a bright interior to the flames, and a darker exterior. (Flames Material.).

Flames Texture.

If you now do a test render, you will only see a bright red flame. To add a touch more realism, we need a texture. While the emitter is still selected, go to the Texture Panel and add a new Texture select the Clouds-type for it in the Texture (F6) Buttons. Adjust the NoiseSize: to 0.600. (Flames Texture.).

Go back to the Material Buttons F5 and make the texture colour a yellow colour with the RGB sliders in the Map To tab. To stretch the yellow spots from the clouds texture decrease the SizeY value down to 0.30. A test rendering will now display a nice fire. But we still need to make the particles fade out at the top of the fire. We can achieve this with a material animation of the Alpha and the Halo Size. Be sure that your animation is at frame 1 (Shift ) and move the mouse over the Material Window. Now press I and choose Alpha from the appearing menu. Advance the frame-slider to frame 100, set the Alpha to 0.0 and insert another key for the Alpha with I. Switch one Window to an IPO Window. Activate the Material IPO Type by clicking the pertinent Menu Entry in the IPO Window header. You will see one curve for the Alpha-channel of the Material (Fire Material IPO).

Note

An animation for a particle material is always mapped from the first 100 frames of the animation to the lifetime of a particle. This means that when we fade out a material in frame 1 to 100, a particle with a lifetime of 50 will fade out in that time. For objects mapped to particles through Dupliverts it seems that this animation technique does not apply/work. Any Alpha IPO added to the emitter seems to be ignored and an Alpha IPO seems to work against the absolute timeline and not anything relative to when the particle was emitted.


Fire Material IPO

Now you can render an animation. Maybe you will have to fine-tune some parameters like the life-time of the particles. You can add a great deal of realism to the scene by animating the lights (or use shadow-spotlights) and adding a sparks particle-system to the fire. Also recommended is to animate the emitter in order to get more lively flames, or use more than one emitter (Final rendering.).

Final rendering.

[edit] A simple explosion

This explosion is designed to be used as an animated texture, or for composing it with the actual scene. For a still rendering, or a slow motion of an explosion, we may need to do a little more work in order to make it look really good. But bear in mind, that our explosion will only be seen for half a second (The explosion).

The explosion

As emitter for the explosion I have chosen an IcoSphere. To make the explosion slightly irregular, I deleted patterns of vertices with the circle select function in Edit Mode. For a specific scene it might be better to use an object as the emitter, which is shaped differently, for example like the actual object you want to blow up. My explosion is composed from two particle systems, one for the cloud of hot gases and one for the sparks. I took a rotated version of the emitter for generating the sparks. Additionally, I animated the rotation of the emitters while the particles were being generated.

[edit] The materials

The particles for the explosion are very straightforward halo materials, with a cloud texture applied to add randomness, the sparks too have a very similar material, see Material for the explosion cloud. to Texture for both..

Material for the explosion cloud.
Material for the sparks.
Texture for both.

Animate the Alpha-value of the Halo particles from 1.0 to 0.0 at the first 100 frames. This will be mapped to the life-time of the particles, as is usual. Notice the setting of Star in the sparks material (Material for the sparks.). This shapes the sparks a little bit. We could have also used a special texture to achieve this, however, in this case using the Star setting is the easiest option.

[edit] The particle-systems

Particle system for the cloud.
Particle system for the sparks.

As you can see in Particle system for the cloud and Particle system for the sparks, the parameters are basically the same. The difference is the Vect setting for the sparks, and the higher setting of Norm: which causes a higher speed for the sparks. I also set the RLife: for the sparks to 2.000 resulting in an irregular shape. I suggest that you start experimenting, using these parameters to begin with. The actual settings are dependent on what you want to achieve. Try adding more emitters for debris, smoke, etc.

[edit] Fireworks

A group of buttons we have not used so far is the Children group.

Prepare and add a particle system to the plane. Adjust the parameters so that you get some particles flying into the sky, then increase the value of Prob: to 1.0. This will cause 100% of the particles to generate child particles when their life ends. Right now, every particle will generate four children. So we'll need to increase the Num: value to about 90 (Children buttons). You should now see a convincing firework made from particles, when you preview the animation with Alt A.

Children buttons.

When you render the firework it will not look very impressive. This is because of the standard halo material that Blender assigns. Consequently, the next step is to assign a better material. Ensure that you have the emitter selected and go to the Shading Context and Material Buttons (F5). Add a new material with the Menu Button, and set the type to Halo.

Firework Material 1.

I have used a pretty straightforward halo material; you can see the parameters in Firework Material 1. The rendered animation will now look much better, yet there is still something we can do. While the emitter is selected go to the Editing Context F9 and add a new material index by clicking on the New button in the Link and Materials Panel (Adding a second material to the emitter.).

Adding a second material to the emitter.

Now switch back to the Shading Context. You will see that the material data browse has changed colour to blue. The button labeled 2 indicates that this material is used by two users. Now click on the 2 button and confirm the popup. Rename the Material to "Material 2" and change the colour of the halo and the lines (Material 2).

Material 2.

Switch to the particle parameters and change the Mat: button from the Children group to 2. Render again and you see that the first generation of particles is now using the first material and the second generation the second material! This way you can have up to 16 (that's the maximum number of material indices) materials for particles.

Further enhancements
Beside changing materials you also can use the material IPOs to animate material settings of each different material.


[edit] Controlling Particles via a Lattice

Blender's particle system is extremely powerful, and the course of particles can not only be determined via forces but channeled by a lattice. Prepare a single square mesh and add a particle system to it with a negative z-force and the general parameters in Particle settings.

Particle settings.

This could be good for the smoke of four small fires in a windless day, but we want to twist it! Add a lattice and deform it as in Lattice settings.

Lattice settings

Add a Lattice Modifier to the particle emitter and set the Lattice Modifier's Ob: to be the Object Name of the Lattice. If you now select the particle emitter, switch to the Object context (F7), Physics buttons, and press RecalcAll (note: in fact, the recalcl will usually be automatic), you will notice that the particles follows, more or less, the lattice (Lattice deformation effects on the left). As a further tweak, rotate each horizontal section of the lattice 60 degrees clockwise in top view, incrementally, as if you were making a screw. After this, recalculate again the particles. The result is in Lattice deformation effects on the right.

Lattice deformation effects

The twist is evident, and of course you can achieve even stronger effects by rotating the lattice more or by using a lattice with more subdivisions. If you give the emitter a halo material and you render you will see something like Normal particles, left; Vector particles, centre; and DupliVerted objects following the particles, right. on the left.

Normal particles, left; Vector particles, centre; and DupliVerted objects following the particles, right.

If you select the emitter, turn to Physics buttons and press the Vect button from the Particles tab, the particles will turn from points to segments, with a length and a direction proportional to the particle velocity. A rendering now will give the result of Normal particles, left; Vector particles, centre; and DupliVerted objects following the particles, right. in the middle. If you now Duplivert an object to the emitter, by parenting it and by pressing the Duplivert button (Object buttons}}), the DupliVerted objects will have the same orientation of the original object if the particles are normal particles, but will be rotated and aligned to the particle direction if the Particles are set to Vect. By selecting the Original Object and by playing with the Track buttons you can change orientation (Normal particles, left; Vector particles, centre; and DupliVerted objects following the particles, right. on the right).

[edit] See Also







Redirects to fix

  • BSoD/Physical Simulation/Particles → Doc:Tutorials/Physics/BSoD/Particles
  • Manual/DupliVerts → Doc:Manual/Modelling/Duplication/DupliVerts
  • Manual/Lattice Modifier → Doc:Manual/Modifiers/Deform/Lattice
  • Manual/Particles → Doc:Manual/Physics/Particles
  • Manual/Static Particles (Hair) → Manual/Static Particles
  • Sandbox/Particles-Startpage → Meta:Sandbox/Particles/Startpage