Blender has had an integrated particle system from its early beginnings. Over the years, though, it has grown and matured into a much more powerful system for creating particle-based effects like hair, flock/swarm behavior, and explosions. And the particle system gets more and more powerful with every release.
The controls for Blender's particle systems live in Particle Properties, as shown in Figure 13-1. Initially, this section looks pretty barren, with just a single list box. However, if you have a Mesh object selected and click the Plus (+) button to the right of the list box, a whole explosion of additional panels for controlling particle behavior appear. Adding a particle system in Particle Properties also adds a Particle System modifier to your object. Technically, you can create your new particle system from Modifiers Properties as well, but it's usually much easier to do it from Particle Properties.
Particle systems have a handful of good uses. Each use involves large numbers of individual objects that share some general behavior. Consequently, particle systems are ideal for groups of objects that move according to physics, such as fireworks or tennis balls being continuously shot at a wall. Particle systems are also good for simulating hair and fur. If the path along which an individual particle travels were to be considered a strand, you could use groups of these particle strands to make hair. This technique is exactly what Blender does.
There's also one other use for particle systems: simple flocking or crowd simulation. Say that you want to have a swarm of gnats constantly buzzing around your character's head. A particle system is a great way to pull off that effect. In Figure 13-1, a whole mess of configuration panels appear in the Particle Properties. Figure 13-2 boils these panels down and shows the most used and useful panels in this section of the Properties editor.
After you create your first particle system, the context panel at the top of Particle Properties gives you the broadest controls, allowing you to name your particle system or choose a different set of settings from the Particle Settings datablock. Objects in Blender can have more than one particle system and can even share the same particle system settings between objects. Beneath the Settings datablock is a Type drop-down menu that offers you two types of particle system behaviors to work with: Emitter and Hair. In most instances, you'll probably use the Emitter type. Hair particle systems are the way to create manageable hair and fur in Blender.
If you choose Emitter, the Emission panel has some of the most important settings for controlling how many particles you have and how long they exist in your scene. Here's a brief explanation for each value:
You can associate any particle type (Emitter or Hair) with one of five varieties of physics simulation models stipulated in the Physics panel: None, Newtonian, Keyed, Boids, and Fluid. Very rarely do you have a need to use None as an option, but it's good to have. Typically, the default Newtonian setting is the most useful option because it tends to simulate real-world physical attributes, such as gravity, mass, and velocity. Occasionally, though, you may want to have more explicit control over your particles, such as when you're shaping the hair on a character. This is where Keyed physics come into play. You can use the emitter object of one particle system to control the angle and direction of another one. The Boids option tells your particles to have flocking or swarming behavior, and you get a set of settings and panels to control that behavior. The last option, Fluid, is a physics-based choice similar to the Newtonian option, but particles have greater cohesive and adhesive properties that make them behave like part of a fluid system.
To create a basic particle system, use the following steps:
In this example, I use a simple grid, but really any mesh works. The key thing to remember is that, by default, particles are emitted from the faces of your mesh and move away from the face in the direction of that face's normal.
After you click the Plus (+) button next to the particles list box, all the options available to particles become visible. If you try to play back the animation now (Alt+A), you see particles dropping from your grid.
Newtonian physics are usually the most common type of particle system used, but I'm also pretty fond of the Boids behavior for emitter particle systems. It just looks cool, and they're a lot of fun!
You change this setting from the Velocity panel in Particle properties. For Newtonian physics, you can give your particles some sort of initial velocity. I tend to adjust the Normal velocity first because it gives the most immediate results. Values above 0 go in the direction of each face's normals, whereas values below zero go in the opposite direction. Boid particles don't require an initial velocity, but the settings do adjust how each Boid particle interacts with its neighboring particles.
If you followed the tip in Step 2, you could be playing your particle animation already. If not, press Alt+A and see what your settings make the particles do. If your particles start behaving in erratic or unexpected ways, it's a good idea to make sure that your time cursor in the Timeline is at or before the frame you entered for the Start value in the Emission panel when you start the animation playback. Watch how your particles move and behave. You can now either tweak the particle movement during playback, or if it's more comfortable for you, press Esc to stop the playback and adjust your settings before playing the animation again. I usually use a combination of live adjustments and this back-and-forth tweaking to refine my particle system's behavior.
Figure 13-3 shows the preceding process. Bear in mind that these steps show a very basic particle system setup, and you're just barely scratching the surface of what's possible. I definitely recommend that you take some time to play with each of the settings and figure out what they do, as well as read some of the more in-depth documentation on particles in Blender's online documentation.
After you create a basic particle system, you can have a little bit of fun with it, controlling the behavior of your particles. You control this behavior by using forces and deflectors. A force field is a controlling influence on the overall behavior of the particles, such as wind, vortices, and magnetism. In contrast, you can define collision objects, or deflectors, for your particles to collide with and impede their progress. Generally speaking, forces are defined using specialized empties, whereas deflectors are created with meshes.
All the controls for forces and deflectors live in Physics Properties, accessed by left-clicking the last button in the Properties editor's header. Its icon looks a bit like a blue check mark with a white circle at the end of it; it's really a visualization of a bouncing white ball. For particle force fields, left-click the Force Fields button, and a Force Fields panel appears. If you need collision settings, left-click the Collision button, and the Collision panel appears.
You typically use these panels to add force and collision behaviors to objects that are already in your scene. You select an object and then, from Physics Properties, add force field and collision properties to that object. For force fields, however, you can add them in a slightly faster way: from Blender's Add menu. If you press Shift+AForce Field, you get a whole list of forces that you can add to your scene. Then you can just adjust the settings for your chosen force from the Force Fields panel in Physics Properties.
Now, I could go through each and every option available for force fields exhaustively, but things usually make more sense if you have an example to work with. That being the case, use the following steps to create a particle system that creates particles influenced by a wind force that causes them to collide with a wall and then bounce off of it:
If you need a refresher, use the steps in the preceding section to create a basic emitter particle system with Newtonian physics.
Notice that the Wind force field object looks like an Empty with circles arranged along its local Z-axis. This visual cue lets you know the strength and direction of your wind force. Increasing the Strength value in the Force Fields panel spaces out four circles to help show how much wind you're creating. Play back the animation (Alt+A) to see how your wind is affecting the movements of the particles. While playing your animation, if you rotate your Wind object or adjust its force field settings, the particles are affected in real time. Neat, huh?
This plane is your deflector. Grab the plane (G) and move it so that it's in the path of the particles pushed by your wind force. Rotate (R) the plane to make sure that the particles actually run into it head-on.
Add a Collision panel in Physics Properties. Whammo! You made a deflector! If you play back the animation (Alt+A), your particles should be blown by your wind force into your plane, which they should bounce off of rather than shoot straight through.
Figure 13-4 shows the results of this step-by-step process. And like the section preceding this one, you're just seeing the tip of the iceberg in terms of what's possible with forces and deflectors. You can use all sorts of cool forces and settings to get some very unique behavior out of your particle systems.
It would be remiss of me to cover particles and not say anything about Blender's hair and fur system. Blender uses particles to create hair and fur for your characters. As you may have guessed, you choose Hair as the type of particle system you want from the context panel at the top of Particle Properties. From there, the setup is roughly the same as using a regular emitter system with Newtonian physics, but with two notable differences.
The first difference is that Hair particles are, in some ways, easier to edit than emitter particles because you can use Blender's Particle mode to customize and comb your particle hair. When you start combing in Particle mode, Blender freezes the particle settings that you already set, and you can tweak and customize the hair from there. Figure 13-5 shows a screenshot of an object with particle hair being combed in Particle mode.
If you decide that you don't like the results you created in Particle mode, you can always reset your hair particles to their positions defined by the settings in Particle Properties. To reset your hair particles, left-click the Free Edit button in the context panel of Particle Properties. If you haven't edited your hair in Particle mode, this button isn't visible. But after you start combing, the button appears so that you can easily reset everything.
You switch to Particle mode using the Mode menu in the 3D View's header. With your emitter object selected, left-click the drop-down menu and choose Particle Mode. When you're in Particle mode, you have the ability to directly edit particle hair, including combing, cutting, growing, and smoothing it out. To see these controls, look to the Tool Shelf (T). Particle Mode gives you a circular brush like the one used in Sculpting and Vertex Paint modes. You can adjust the brush's size and strength using the sliders from the Tool Shelf or by pressing F and Shift+F, respectively.
The other thing that differs in the setup of hair particles is the use of child particles. Creating and displaying hair particles can take up a lot of computing power, and when animating, you don't necessarily want to be waiting on Blender to draw all your character's fur in the 3D View. To deal with this problem, you have two solutions, and the results are best when they're used together. The first thing is to reduce the number of viewable particles in the 3D View using the Display slider in the Display panel of Particle Properties. The Display slider changes the percentage of particles being displayed in the 3D View. When you make this change, fewer particles show up in the 3D View, but all of them appear when you render. You get the best of both worlds.
Of course, for characters with a lot of hair, just reducing the displayable particles may not be enough. In this case, child particles are useful. In the Children panel of Particle Properties, left-click the Faces button. Additional particle strands grow from the faces of your emitter, with their locations determined by the particles around them. The Children panel has two amount values on the left column: Display and Render. The Display value dictates how many particles are seen in the 3D View. For speed while animating, I often set this value to 0. The Render value controls the number of child particles that each parent particle has at render time.
With the particle system properly generating your hairs, the only thing you have to worry about now is controlling how Blender renders this hair. Here's a quick-and-dirty rundown of the steps I go through to get the hair to render nicely (I include a reference file on the DVD that comes with this book):
This step tells Blender's rendering engine to render the particles as strands.
Another helpful option in this panel is the Emitter check box near the top. Enabling this option makes the emitter visible, a helpful feature if you're using your actual character mesh to generate the hair.
If you're using the Hair strands preview type in the Preview panel (I recommend doing so), you may notice that your hair is virtually non-existent because of the 0 Alpha value. Don't worry: This setting makes sense in the next couple of steps.
The most important thing here is that the right-hand side of the ramp represents the tip of your hair strand and should therefore be completely transparent. All other color positions in it should be opaque.
The Preview panel should show hair strands that use your ramp gradient along the length of each strand, feathered out to semitransparent tips.
A couple fields are worth mentioning: