Drupal for Education and E-Learning — Save 50%
Teaching and learning in the classroom using the Drupal CMS
In this article by Allan Brito, we will see how to use some special effects to put our spacecraft in outer space and even make both weapons shoot! All these effects are created with a mix of particles and composition nodes that generate the effects in a very short time. Both techniques and tools help a lot in this project, and can be used in other 3D modeling and rendering projects as well. It adds even more elements and visual aids to our project in order to bring more realism to the scene.
In the last versions of Blender 3D, the particle system received a huge upgrade, making it more complex and powerful than before. This upgrade, however, made it necessary to create more parameters and options in order for the system to acts. What didn't change was the need for an object that works as emitter of the particles. The shape and look of this object will be directly related to the type of effects we want to create.
Before we discuss the effects that we will be creating, let's look at how the particles work in Blender. To create any type of particle system, go to the Objects panel and find the Particles button.
This is where we will set up and change our particles for a variety of effects. The first time we open this menu, nothing will be displayed. But, if we select a mesh object and press the Add New button, this object will immediately turn into a new emitter.
When a new emitter is created, we have to choose the type of behavior this emitter has in the particle system. In the top-left part of the menu, we will find a selector that lets us choose the type of interaction of the emitter.
These are the three types of emitters:
- Emitter: This is the standard type, which is a single object that emits particles according to the parameters and rules that we set up in the particles controls.
- Hair: Here, we have a type of particle emitter that creates particles as thin lines for representing hair and fur. Since this is more related to characters, we won't use this type of emitter in this book.
- Reactor: With this emitter, we can create particle systems that interact with each other. It works by setting up a particle system that interferes with the motion and changes the trajectories of other particles.
In our projects, we will use only the emitter type. However, you can create indirect animations and use particles to interact with each other. For instance, if you want to create a set of asteroids that block the path of our spacecraft, we could create this type of animation easily with a reactor particle system.
How particles work
To create and use a particle system, we will look at the most important features and parameters of each menu and create some pre-systems to use later in this article for the spacecraft. To fully understand how particles work, we have to become familiar with the forces or parameters that control the look and feel of particles. For each of those parameters and forces, we have a corresponding menu in Blender.
Here corresponding parameters that control the particle system:
- Quantity: This is a basic feature of any particle system that allows us to set up how many particles will be in the system.
- Life: As a particle system is based on animation parameters, we have to know from how many frames the particle will be visible in the 3D world.
- Mesh emitting: Our emitters are all meshes, and we have to determine from which part of those 3D objects the particles will be emitted. We have several options to choose from, such as vertices or parts of the objects delimited by vertex groups.
- Motion: If we set up our particle system and don't give it enough force to make the particles move, nothing will happen to the system. So, even more important than setting up the appearance of the particles is choosing the right forces for the initial velocity of the particles.
- Physics and forces: Along with the forces that we use in the motion option, we will also apply some force fields and deflectors to particles to simulate and change the trajectories of the objects based on physical reactions.
- Visualization: A standard particle system has only small dots as particles, but we can change the way particles look in a variety of ways. To create flares and special effects such as the ones we need, we can use mesh objects that have Halo effects and many more.
- Interaction: At the end of the particle life, we can use several types of actions and behaviors to control the destiny of a particle. Should it spawn a new particle or simply die when it hits a special object?
These are the things we have to consider before we begin setting up the animation.
|Teaching and learning in the classroom using the Drupal CMS|
eBook Price: $26.99
Book Price: $44.99
With the rules and the overall setup of the particles in mind, we can move on to the actual setup of the particles. First, let's create a mesh object to use as an emitter, and for that we will create a mesh circle. In order to set up the circle, choose eight vertices and press the Fill button. Right after the circle is created, subdivide the object three times until we get an object like the one shown in the following image. As particles are emitted by vertices or faces, it's quite important to have an object with plenty of both.
When the circle is finally created, just open the object panel and choose the particle buttons option. Click on the Add New button to create a new particle system, and we will be ready to start. Don't worry if nothing seems to happen when the particle system is created; it's because none of the required elements that make a particle system are set yet. The first thing to do when the particle system is created is to add more particles to the animation. In the Amount option set the total number to 20000.
In the other parameters of the basic elements, choose the following settings:
- Sta: 10.0
- End: 90.0
- Life: 80.0
- Rand: 1.0
These parameters will generate a particle system like the one shown in the following screenshot:
If you can't see any difference in the particles, just move the playback head that controls animation in Blender, and you will see the particles showing up. We can control the animation by using the directional arrows from the keyboard, or we can open a timeline window to see the playback head.
The timeframe between the death and birth of the particles will define how far they will go from the emitter. Together with the life value, it will give the size of the trail of the particles. For us, this set of parameters is very important because we will use them to create the explosive forces going out of the engines. The last parameter randomizes start, end, and life of the particles by a percentage. The number 1 means we are using fifty percent of the random values to generate the particles.
Note the way all particles are being emitted from the faces or vertices. The best way to set up the particles for our project is by using faces only. Set it to emit randomly from the faces by pressing the random button right next to the basic options.
Adding speed and force fields
The particle system is already created, but it's moving at a regular speed and with no influence from force fields around it. To create and add those forces, we will go to the Physics menu of the particles, and there we will find the options to change the force and the speed of the particle system. For instance, if we want to add an extra force to the particle motion based on the direction of the normals of each face, just increase the value of the parameter Normal in the Physics menu.
There are other types of forces that we can use to add speed, like the object itself or the surface tangents.
But, what if the particles come under the force of an explosion or other effect that makes them change the original trajectory? In this case, we can use the options located at the bottom of the menu—AccX, AccY, and AccZ. Each of these options can add a force in the respective axis that will influence the direction and speed of the particle system.
Here is an example of a particle system with a force set to 3 in the Y axis:
Fortunately, we have a set of options to set up the angle and rotation of the particles as they go out of the emitter. We will use the rotation option in the Physics menu to change the rotation of the particles and make them go through a wider angle.
The rear engine
Now that we know a bit more about the particles and how to control them, we can add some objects and particle systems to the rear engine. The purpose of these particle systems is to create an effect of a combustion engine, dumping energy into outer space. To do that, we will use a mix of particles and nodes to create a glow effect. First, add a circle with the approximate same size of the opening for the engine at the back.
Make sure that the circle has several subdivisions on its faces; otherwise, our particle system won't work very well. When the circle is set and created, set up the particles with these settings:
- Amount: 3000.0
- Sta: 10.0
- End: 90.0
- Life: 80.0
- Rand: 2.0
Change the initial velocity of the particles to 2 using the Normal force. With these parameters, we will have a particle system that looks exactly like the following screenshot:
The next step is to add some rotation to the system, and to do this, we will go to the Physics menu and choose the random and rotation parameters. Set these parameters to 3 and 0.15, respectively.
We will end up with particles like the ones shown in the following screenshot:
Now, go to the materials panel to set up a material to the particle system. If it doesn't have a material added to it, add one and set up the material as a halo. Here, we will use a halo with a texture to create a combustion effect to the material. Right after pressing the halo button, go to the textures panel and add a Blend texture to the object.
From the textures panel, go to the Color menu and turn the Colorband button on. With this button, we can use color gradients as textures of objects. Here are a few tips to remember when working with gradients:
- The gradient is made by a set of index colors
- Each color can be changed if its index is selected
- When the index is selected, we can change the alpha and RGB values for each of the colors
To edit and change the colors of a gradient, use the index selector, index display, alpha, and the RGB values shown in the following screenshot:
Set the color gradient until it has a nice gradient ranging from yellow to red.
With the color gradient set up, we can go to the Materials panel again and adjust the halos to make our effect work like rocket combustion. Turn the Flare button on and add more strength to the halo with the Boost and Add sliders. The final image should look like the following screenshot:
In this case, the values that have been used for the Add and Boost sliders are 0.6 and 3, respectively.
With the engine ready, we can begin working on the same effect for the guns, but with a different objective. Here, we will create something like a plasma or ray gun that will be shooting in space. The direction and treatment of the particles will be different, mostly because of the direction of the particles, which will behave like small comets rather than bursts of energy from an engine.
For the guns, our emitter will be a sphere with a reasonable amount of subdivision. Select this object and add a good amount of velocity based on their normals. To make the particles simulate the behavior of a comet, add a force in the X or Y direction of the particles to make the force change all trajectories of the particles and push them in a unique direction.
That's all we need for this particle system. The rest of the process is exactly the same as the particles of the engine. Only the color of the texture should be different and should appear greener.
In this article, we added elements and visual aids in order to bring more realism to the scene. If we use well-planned special effects for any type of object, the overall visual impact of the project can be much greater!
Here is a summary of what we have learned in this article:
- How to use and set up particles in Blender 3D
- How to create combustion flares with particles
- How to create plasma rays with particles
|Teaching and learning in the classroom using the Drupal CMS|
eBook Price: $26.99
Book Price: $44.99
About the Author :
Allan Brito is a Brazilian architect, specialized in information visualization, who lives and works in Recife, Brazil. He works with Blender 3D to produce animations and still images, for visualization and instructional material. Besides his work with Blender as an artist, he also has wide experience in teaching and researching about 3D modeling, animation, and multimedia.
He is an active member of the community of Blender users, writing about Blender 3D and its development for websites in Brazilian Portuguese (http://www.allanbrito.com ) and English (http://www.Blender3darchitect.com and http://www.Blendernation.com).
To know more about the author, visit the website http://www.Blender3darchitect.com, where he covers the use of Blender and other tools for architectural visualization.