It’s easy to work with Harmony’s Particle system.
This fully customizable system places complete control of what the scene will look like into the hands of the user.
The particle system is broken into several components:
The Sprite determines what the particle is going to look like. The Actions are any forces that can act upon the Sprite, such as gravity, wind, etc. The System Composite simply gathers together all of the actions that will act upon your particle. Then, in the Baker, the simulation is run, determining what your final system will look like. Finally the Visualizer flattens everything to a flat plane, and allows you to control the position of your particle system.
To start using the Particle System you should make use of the examples provided with it. You can then modify the examples and custom fit them to your project.
There are many examples of particle systems for you to use, you can find these from the top menu Insert > Particle.
The same examples are also available in your Module Library, in the Particle-Examples tab. These are easy to use and, just like any other nodes in your Module Library, simply drag and drop them into your Network View to add them to your project.
The Harmony Stage User Guide has a full in-depth description of all the modules that you’ll find in the new Particles tab in the Module Library.
If you want to create your own Particle System from scratch, then refer to the Stage User Guide for more information.
For this Tip, let’s start out by adding in the Confetti example. I’m going to re-purpose the Confetti example so that it simulates a pile of money that explodes out of a piñata. Go to Insert > Particle > Replicators > Confetti to add the Confetti example.
The first thing you probably want to do when re-purposing any example is to remove any Colour Cards inside the example. Since you have your own Background layers you don’t need the Colour Card from the Confetti.
Next, you should remove the drawing that represents the Bounce Plane on the floor, so that you can replace it with your own drawing.
A Bounce Plane is simply something that the particles will bounce off when they hit it. It consists of two parts; the drawing, and the physical region that actually forms the bounce plane.
Regions are indicated by a teal green-coloured node, and can be either Planar Regions (flat regions), or 3D regions (Spheres, Cubes, Cones). You can find regions in the Particles tab in your Module Library if you want to add in your own region. Regions can be plugged into a variety of different modules.
When you’re working in the Network View, notice that each node has a top port and a bottom port, these ports are colour-coded. You can only plug a node into a port if both the top port and the node you are plugging it into are of the same colour. If you see the colour on the top port of a node, you know that if you’re going to plug another node into that port, it’s got to be a node of that colour. For example, if you look at the Bounce node, you will see the colour on the top port is the same as the colour of the Planar Region.
If you click on the Planar Region module, and you go to View > Show > Control (from the top menu)you can display the control for the region. You can then modify the position of the Planar Region using the Transform tool. In this case you want the floor to cover the whole camera frame, so you will extend the region out.
Once the region has been extended outside of the frame, you can replace the floor with your own drawing. First, delete Drawing_1, inside the Confetti example, which is the drawing that represents the yellow floor.
Next, import the image of the wooden floor that you want to use instead. When you import the image for the floor, you don’t have to actually put it inside the particle group – because the floor image is independent of the particles. The Planar Region is actually forming the plane for the particles to bounce off, so you can import the floor outside the group if you want to and it will make no difference.
It is easier to create the floor texture as a flat texture, and then to import it and rotate it in 3D space to form the perspective. If you want to, you can also draw the image in perspective on your flat plane – that works too. Since it’s your Planar Region that defines the bounce plane, your floor image doesn’t actually have to be rotated in space.
If you want to import the image and rotate it in 3D space to form the perspective you can do this: click on the yellow options box on your drawing layer to open up the Layer Properties window. From here, check the Enable 3D checkbox at the top of the Layer Properties of your floor image.
Then you can use the Transform tool to rotate the floor plane to the correct orientation. It doesn’t have to be 100% perfect, it just needs to look correct.
Now that the floor is in position (and at this point you might also want to add your own background), you can customize what the particles themselves look like.
The most important module in your Particle group is the Sprite Emitter.
The Emitter takes the Sprite, which in this case is named Drawing, and it multiplies that drawing depending on the parameters in the Emitter. You’ll also notice that there’s a 3D region plugged into the right-side of the Emitter. The 3D region controls where particles are created when they are born.
In this case you will use the Sprite to create dollar bills. First rename the Drawing Sprite and call it Money_Sprite so that you can find it easily later.
The next thing to do is to modify the drawings in the Sprite to replace them with dollar bills. In this example, there are 20 different drawings in the Sprite. If you click on the Sprite layer to select it and then go to the Drawing View, then you can isolate only the drawings in that layer. You will notice that if you scrub through the timeline, each frame has a new drawing up until frame 20. There are a couple of different reasons why you might want to have different drawings in your Sprite. First, you might want to have a variety of different kinds of particle. In this case, there are a variety of different shapes and colours of confetti. Second, you might want to have some animation on a particle. You’ll notice this in the Bees example, or in the Lemmings example, which has the character particles doing a walk cycle. Let’s focus on the first reason, different kinds of particle, since that’s what’s in this example.
If you take a look at the Layer Properties of the Emitter, by clicking on the yellow options box, then you will see what properties define the propagation of the Sprite.
There are many different things that define the creation of particles. For more information about the Emitter refer to the Harmony Stage User Guide.
You can see in the Number of Particles field that 50 particles are created on each frame. We know that they are created on each frame because the Trigger is set to 1, or On. If the Trigger is set to 0, or Off, then no particles would be created on that frame. We also know that it will create 50 particles because the Probability of Generating Any Particles field is set to 100. If this were set to 10 instead, then it would be likely that it would create closer to the 5 particles range than 50.
Pay special attention to the Particle Type 0 and Particle Type 1 fields.
If there were only 10 particles, then these Particle fields to would be set to 1 and 10 respectively.
Adjust these settings depending on how many frames of particles you intend to draw. In this example this was set to 20 and 20 different orientations of a dollar bill image were drawn.
For more information on the other properties of the Emitter, refer to the Harmony Stage User Guide.
At this point you should draw the dollar bills, these will replace the confetti drawings. Select the newly-named Money_Sprite drawing layer, go to the Drawing View, and select the Confetti drawing that’s on that frame, delete it, and draw a dollar bill there instead. Make sure to draw a variety of different shapes and to change orientation of the dollar bills, doing that will produce a more random effect when the piñata is broken open.
Once the drawings are adjusted go back to the Camera View. You should see right away that the confetti has been replaced by dollar bills.
Next you need to integrate this particle system with another drawing, in this case the piñata. Draw the piñata in 3 layers:
Position the particle system to appear in between the front part and the back part of the piñata, so that it appears that the money is pouring out between them. You can adjust the order of the nodes in the Composite to adjust the order that they appear in the Camera View.
The Network View should look like this with the piñata:
You’ll notice in the example that there is a Deformation on the string. If you put a simple curve-style deformer on the string, then it makes it very easy to animate. You can then connect the kinematic output of the string to the piñata, so that when you animate the string, the piñata moves with it. For more information on how to do this, refer to the Deformation chapter in the Harmony Stage User Guide.
Finally, if you take a close look at the example you can see that in your Confetti group there is a peg layer plugged into the right side of the Visualizer, labelled Peg_3. This peg controls the z-depth position of the particle system. This peg layer should be disconnected, disabled or deleted, as you want to use the network order to determine the order in the Camera View.
If the size or position of the particle system doesn’t quite match where you want it to be, here are some other things that you can adjust:
Now take a look at what’s happening in the Camera View, you will see that the particles are spilling out from the centre of the piñata. You should also animate the front and back parts of the piñata so that they break apart as the string rotates.
For further specifics on working with Particles, refer to the Effects chapter in the Harmony Stage User Guide.