Advanced Effects using Blender Particle System

Exclusive offer: get 50% off this eBook here
Blender 2.49 Scripting

Blender 2.49 Scripting — Save 50%

Extend the power and flexibility of Blender with the help of the high-level, easy-to-learn scripting language, Python

$23.99    $12.00
by Reynante Martinez | August 2010 | Open Source Web Graphics & Video

In the previous articles, Getting Started with Blender’s Particle System and Getting Started with Blender’s Particle System- A Sequel, by Reynante Martinez, we discussed about the general usage and concepts behind Blender's Particle System and found some cool ways to extend it further. We also discussed several types of the particle system as well as some practical results that can be derived from it like: dust, smoke, fire/flame, bubbles, rock slide animation, and hair/fur/grass.

This time around and as I promised in the previous articles, I'll tackle more advanced usages and features of Blender's particle system which are as follows:

  • Disintegration effect
  • Multiple particle systems
  • Boids

(For more resources on Blender, see here.)

The list above might be a bit daunting to some users but don't worry, I will discuss as much as I could (and bear with me when I ramble a lot) and hopefully I'll succeed in imbibing as much information as possible so when you're done reading this, you're proud to say: “I know Particle System!”, just like how Neo said in the Matrix: “I know Kung-Fu”.

Unlike the previous articles that I've written before where I solely used one version of Blender through the entirety of the process, this time we might switch between the legacy Blender 2.4* and the recently-developed Blender 2.5*. The reason for this is that some Particle System features that we have been happily using in Blender 2.4* isn't merged yet in Blender 2.5*, making it unusable for the moment. I guess that is reasonable enough since Blender 2.5* is still undergoing heavy development and is still in beta stage. But who knows, maybe during this time of writing, it is already being developed or already is.

So in line with that, here are the basic requirements for you to get going:

And just a bonus, we decided to provide you with the .blend files for all of our examples illustrated here. So hop on!

Disintegration Effect

The disintegration effect has been a common and very popular visual effect seen in feature movies, advertisements, and simply an eye candy. Often, it starts by having an object in its original and full form then after a while it will dissipate and disappear as though it was now made of dust. You can see this effect in one of the tests I did before here: http://vimeo.com/6763010. Much of the inspiration came from Daniel (aka NionsChannel in Youtube) who has really some nice effects on his list.

The basic requirements for achieving this kind of effect are: a suitable particle system, highly subdivided mesh, and a force field. With that said, let's go ahead and start tinkering, shall we?

Fire up Blender 2.49b and delete the default Cube (if any).

(Move the mouse over the image to enlarge it.)

(Deleting the Default Cube)

Next, add or model the object of your choice. For purposes of this tutorial, let's add a simple UV Sphere with 256 Segments and 256 Rings, however, if your machine couldn't handle the high subdivision levels, you can lower it down to your liking.

NOTE: The higher number of subdivisions you set, the finer and the more seamless the “shards” will be. Additionally, you can always go to Edit mode and press W > Subdivide to subdivide your mesh accordingly or adding a Subsurf modifier and applying it afterwards.

The higher number of subdivisions you set, the finer and the more seamless the “shards” will be. Additionally, you can always go to Edit mode and press W > Subdivide to subdivide your mesh accordingly or adding a Subsurf modifier and applying it afterwards.

(Adding a UV Sphere)

(Highly Subdivided UV Sphere)

After the UV Sphere has been added, proceed to Edit Mode and check over at the header the amount of faces it has. We'll use this as a base for the amount of particles that we'll be adding later on for the actual simulation.

(UV Sphere Face Count)

While in Edit Mode and all the vertices selected, press W then choose Set Smooth to smooth out the geometry shading. Now go back to Object Mode and proceed to Object (F7) in the Buttons Window then on the Particle Buttons, then click on Add New under Particle System tab to add a new particle system.

(Adding a New Particle System)

Rename the just-added particle system to something more relevant like “disintegration”. Then on the Amount input, we'll be changing the default 1000 to the number of faces our UV Sphere currently has (that's the reason we checked a while back in edit mode). So in this case, type in 65536. This will then correspond to one particle is equal to one face of our uv sphere. Next, change the End value to something shorter than 100 which is default. Let's try 40 for this example, which means all of the 65536 particles will be emitted within 40 frames. Basing from the default 25 frames per second rate, this would mean all those particles will be emitted in less than 2 seconds, which is what we want for this. Next is the Life value which we should be set to something longer as compared to the default 50 which is a little bit too early for our simulation. Let's set Life to 150; this will make our particles stay in our simulation area longer and not disappear earlier than expected. Under “Emit From:” panel, enable Random and Even then leave the other defaults as they are. Then finally, alter the values in the Physics tab and see which ones you are satisfied with. Check the screenshot below for some reference.

(Particle System Settings)

The next part is the icing on the cake, where we'll be adding a force field to generate the particle system's motion as though it was affected by real world effects like wind, turbulence, etc.

With your cursor centered on your UV Sphere, add an Empty, name it “force”, and make sure the object rotation is cleared (ALT R) such that the local z-axis is oriented on the world z-axis.

The UV Sphere and the Empty (“force”) should be in the same layer for the following effect to work.

(Empty “force” Added)

After adding our Empty object, we need to tell Blender how this object will affect our particle system. We'll do this by adding force values to this object. Forces in Blender act as external effectors for physics systems, which includes our particle system. You'll see what I mean in a while. Let's select the UV Sphere object and add a new Material Datablock to the object.

(Adding a New Material to the Sphere)

After adding a new material datablock, you can go ahead and tweak the material and shader settings the way you want to. Just like how I did mine (see screenshot):

(Adding Material to the Sphere)

With the Sphere still selected, head over to the Texture buttons under Shading (F5) and add a new texture slot.

(Adding a New Texture)

Next, choose Clouds as the Texture Type, increase the Noise Size and Noise Depth accordingly and just leave the Noise Basis to the default Blender Original, this will ensure a better distinction for the form that our particle system will exhibit later on. And the last but not the least, increase the Contrast of the texture, which will exaggerate the shape of our particle form later on.

(Cloud Texture Settings)

Blender 2.49 Scripting Extend the power and flexibility of Blender with the help of the high-level, easy-to-learn scripting language, Python
Published: April 2010
eBook Price: $23.99
Book Price: $39.99
See more
Select your format and quantity:

(For more resources on Blender, see here.)

Head back to the Material buttons under Shading (F5) and on the Texture panel, uncheck/disable the texture we just added. But why you ask? After all our efforts on modifying it. Since in Blender 2.49, you can't add textures to arbitrary objects, as in our case, the empty, we created a placeholder for the texture that we'll be using as a force later on. So simply put, this texture will not be a shading texture but a force texture.

(Disabling “cloud_tex” in the Texture Panel)

Let's go back and select the Empty object which acts as our force. Go to Object (F7) then to the Physics buttons and a Texture Field.

(Adding a Texture Force Field)

Type the name of the texture we just added a while back into the Texture: field. Increase the Strength of the force then max out the Nabla accordingly. The Strength defines how much effect this force field has on the physics system.

(Texture Force Field Settings)

When the settings are done right, we should see something like this in the simulation:

(Particle System with Texture Force)

And here's a sample animation:

(particle_texture_force.avi)

Unlike the first test animation we had, this one has more dynamism in it and much more realistic in the way that the particle flows through space. To make the particle flow even more exciting, we'll make it such that they emit from one end and then finish off on the other. Something like an easing motion and not a simultaneous eruption. You'll see what I mean later on.

To do this, let's select our Sphere object again and add a new Texture, this time choosing Blend as our Texture Type. Leave the Blend Type as the default Lin (Linear), then create a Colorband and adjust it accordingly (check the screenshot below for a reference).

(“blend” Texture Settings)

By default, this texture we just added will only affect the color of our material, and just that. But we need it to affect the flow of particles instead. To do this, head back to the Material Buttons under Shading (F5) and scroll over to the texture's Map To options. Disable Col and enable PAttr (Particle Attribute). After enabling PAttr, new options appear (replacing the previous mapping buttons). In this new options, simply enable Time. This will tell Blender to use the blend texture as a map for the particle's attribute which is time (if animated).

(“blend” Texture Mapping Options)

(Sample Frame of the Particle System)

And here's the sample animation from this current setup we have:

(particle_blend.avi)

To extend it even further and so the transition won't look to sudden and sharp, we'll add another Cloud Texture below the Blend Texture we have now. And make the mapping the same as that of the blend texture. Leading us to this result:

(Additional Texture Affecting Particle Attributes)

And here's the video animation:

(particle tear.avi)

So far, everything looks right EXCEPT the sphere not affected by the particle system at all. That's because we haven't told Blender yet. We've only told the sphere to emit particles and to be part of the system. Doing that is an easy step. Select the Sphere and go to Editing (F9) and scroll down to the Modifiers tab. Add an Explode modifier then under this modifier, enable Split Edges.

(Explode Modifier)

Then lastly, disable the particle display in the 3D Viewport since we don't need that anymore and enable the rendering of the Emitter, or else we see nothing.

(Disabling Particle Visualization)

And here's a hardware render of the disintegration effect:

(particle_disintegration.avi)

There you have it! Your particle disintegration effect in Blender. And please, if you have some amazing samples to show what you came up with, email me.

And here's the .blend file: disintegration.blendl

Summary

This article tackled the disintegration effect in Blender's Particle System. In the next article, we will take a look at the multiple particle systems and boids in Blender.


Further resources on this subject:


Blender 2.49 Scripting Extend the power and flexibility of Blender with the help of the high-level, easy-to-learn scripting language, Python
Published: April 2010
eBook Price: $23.99
Book Price: $39.99
See more
Select your format and quantity:

About the Author :


Reynante Martinez is a self-learnt graphic designer, illustrator, web designer, and 3D generalist. His interest in CG started nine years ago and was directly introduced to The GIMP as one of the open source image editing applications available in Linux. Aside from being an animator at work, he also has experience in mentoring and has been a speaker and workshop conductor at several occasions during the past few years. He is also the co-founder of PinoyBlender, a Filipino Blender User Group. Since his discovery of Blender six years ago, his passion for CG art grew even more, with more upgrades coming now and then and with an active and helpful community of Blender artists being one of the most exciting factors in his career.He can be reached through the email or through his weblog and you can also view his online gallery.

Books From Packt


jQuery 1.4 Reference Guide
jQuery 1.4 Reference Guide

Blender 3D 2.49 Incredible Machines
Blender 3D 2.49 Incredible Machines

Papervision3D Essentials
Papervision3D Essentials

Blender 3D Architecture, Buildings, and Scenery
Blender 3D Architecture, Buildings, and Scenery

SketchUp 7.1 for Architectural Visualization: Beginner's Guide
SketchUp 7.1 for Architectural Visualization: Beginner's Guide

NetBeans Platform 6.9 Developer's Guide
NetBeans Platform 6.9 Developer's Guide

Flash with Drupal
Flash with Drupal

Joomla! with Flash
Joomla! with Flash


Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Resources
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software