♪♪♪ Zak Parrish: Greetings and welcome. My name is Zak Parrish. Over the next several videos, I am going to be showing you how to work with particles in UE4. Before we get into that, there is some key terminology I want you to understand. There are a lot of terms involved with creating particle systems in UE4. A lot of them sound alike, and it is important to know the relationship between each one. The first term is going to be pretty straightforward, so I am not going to spend a lot of time on it. The first term is particle. A particle is really just a point in space. You will spawn these and then you will give some behavior. You will make them move around in some interesting way. You can make them bounce off things. They can be rendered out in a lot of different ways. They can look like Static Meshes. They can look like a sprite. A sprite is really just a sheet that is always going to face the camera. They can look like laser beams or lightning bolts. There are all kinds of things you can make a particle look like. A particle is a point in space with some behaviors attached to it. The next one sounds pretty similar. This is a particle system. In UE4, a particle system is the asset that resides in your Content Browser. Here, we can see these. Over inside my Content Browser, there are a lot of particle systems. This is in the Content Examples project. The map you see here may not exist in your Content Examples project. It is something I put together specifically for this video. Fear not because over the next several videos, you are going to create all of these effects. Don't let that distract you too much. I want to show that in this case, here are all the particle systems available in the Content Browser. All I did was go to the Game folder and click Filters. Then, select Particle System so we can see them all. Now, the next term is an emitter actor. Emitter actor. An emitter actor is the object that will reside in your side which will hold a reference to a particle system. I am going to get out of Game Mode by pressing the G key. You can see these tiny starburst icons. These are each particle actors. In the Details panel under the Particles category, you will see a property called Template. Template holds the particle system that you want this to show. For example, I can change this from the GPUSprites to P_black_body. I can drag-and-drop that onto the Template property. Now, this particle emitter actor is now using an entirely different particle system than it was a second ago. I want to press CTRL+Z so I can jump back. Or, not jump back. Go ahead and drag-and-drop GPUSprites onto the Template. The important thing to keep in mind is there is a difference between a particle system an an emitter actor. The particle system sits in your Content Browser. The particle system is the asset you create to define some sort of particle effect. The emitter actor sits in the scene and holds a reference to that particle system. Another important term is particle system component. I have to be a little careful here because a particle system component is actually a part of the Blueprint system. I don't want to compound matters anymore than I have to, but this is kind of important. Take a look here. I have a Blueprint I put together just to show these off. If we are going to talk about emitter actors, we should also talk about particle system components. I am going to take this ParticleBP, and drag-and-drop it into my scene. All it is going to do is spawn an explosion every random x number of seconds. I have to click Play in order to watch this happen. You see it is exploding over and over again. Let's take a look at the Blueprint itself. I will open up the Blueprint Editor. We are not worried about the Graph tab right now. I want to focus just on the Components tab. The only component in here is a particle system component I have named MyParticles. If you go under Add Component and start typing "Particle", you will see Particle System right there. If you take a look in the properties for this particle system component, you will see a Template property just like on an emitter actor. That means this is the component you will use to make a Blueprint emit some kind of particles. Minimize the Blueprint Editor. I am going to delete that particle because seeing it explode over and over again is just going to be distracting. Press G to get out of Game Mode. I didn't put an actual icon on that, so I have to delete it from the Scene Outliner. That is kind of funny actually. Good. That is all gone. Over on the chalkboard, let's go to our next term which is Cascade. Cascade is the particle editing system inside of UE4. It is the same as it was in Unreal Engine 3 (UE3) actually; it got a little bit of a face lift. If you are familiar with creating particle systems in UE3, then the transition to UE4 should be fairly straightforward for you. To show this off, I am going to grab some random particle system. Let's get something a little more interesting than the ones I have prepped for this video. I am going to go to my Game folder. Filter by Particle System. Let's look for that explosion effect I was using a second ago. There is P_Explosion_Bomb. I will double-click P_Explosion_Bomb, which opens Cascade. I will go over what you are looking at inside of Cascade in a little bit. The important thing is that you are familiar with the concept of that Cascade is the particle editor. You can access it by double-clicking on any particle system in your Content Browser. That is the primary means of getting to Cascade. Our next term is an emitter. An emitter is not the same as an emitter actor; it is something else entirely. Let's jump back over to UE4. Inside of Cascade, I am going to open up P_Explosion_Bomb effect again. In the central area of Cascade is this big window called the Emitter List. This has all of the different emitters for this particular particle system. Each column you see here is a separate emitter. This can be a little bit confusing at first if you are completely unfamiliar with creating particle effects in UE4. You might wonder why you have all these different columns. The reason you have these separate emitters is to break apart the different aspects of a single particle effect. Here, we have an explosion which is made up of lots of bits and pieces. For instance, we could take a look at the first emitter. All the first emitter is creating is this sort of little orange shockwave. The next emitter is adding the fire. The next emitter is adding the sparks that fly out in all directions. The next emitter is called Bits. You can see that is some shrapnel. Then, we have a light source (fire_light). It has a Light module on it, so it really would be emitting light into the scene. Finally, we have some smoke. When you add all of these different aspects together, you get a complete particle effect. In this case, the effect is our full explosion and that is why you have separate emitters. To be an effects artist for UE4, you have to be able to think of a complete effect as a group of individual aspects. Consider a campfire. It would have flame, it would have smoke, and it would have sparks. Each one of those things would be its own individual emitter inside your particle system. That moves us on to our next topic, which is a module. A module is a modular component of an emitter that defines some single aspect of behavior. That is kind of a mouthful, but it is easy to understand if you take a look. Inside my Emitter List, you see all the different columns. Each one of these is a separate emitter. Within these columns, you see each of these rectangular objects which are your modules. Each module controls one aspect of behavior for the particles in that emitter. We will go into Solo Mode for one of these emitters real quick. Under Bits, click on the S icon to go into Solo Mode. Now all we see are the little pieces of shrapnel flying out. Each one of these objects in the list are the modules. We have one that controls the Lifetime, which is how long these particles are going to live. We have one for the Initial Size, which is how big these are going to be when spawned. Size By Life is how their size is going to change as the particles live. Over their lifetime, the particles are either going to get bigger or they are going to get smaller in some way. I want to share some notes about that. You will notice there are some modules that are the same throughout. You have the Required module that will always be there. You have the Spawn module that will also always be there. You can't get rid of those; they are always going to be present. You can add or remove every other module as you need to. You can right-click and you have all of the modules available for this particular type of emitter. The type of emitter is something I will address in a moment. You will notice each one of these is actually a submenu, so you just have to think about what you want to do. For instance, you can change the rotation of these. Maybe we want them to spin as they fly through the air. Right-click and go down to Rotation Rate. Select Initial Rotation Rate to set the rotation rate for these objects and make them spin as they fly through the air. You can also move modules between different emitters. We can select Size By Life and drag it over to another emitter, or drag it back. We could press Alt+drag Size By Life to make a copy of it, just like you do in most things in UE4. You can press Alt+drag to copy something. Click the S icon under Bits to unsolo the emitter. You can also press Shift+drag and that will copy and share the module. That means if you change one module, you are effectively changing the other as well. It is kind of a way to create an instance of a particular module. We will go ahead and remove Size By Life and put everything back the way it was. At a glance, that is what a module is. An important thing to note is modules execute from top to bottom. If you have the same module twice, the bottom one is going to override the top. Generally, you don't want to do that. If you have one Color Over Life module, you don't need another one later. That one module would control all of the color for the lifetime of the particle. You don't necessarily need to repeat any modules inside your emitters. Again, the important thing is modules calculate from top to bottom. Also, each emitter is calculated from left to right in the Emitters List. That takes us to our next term, which is type data modules. Type data modules control what kind of particle you want to create. These are special modules. Only one module can exist on any given emitter. You see a couple of them right here. The sparks and the Bits emitters have GPU Sprites type data modules associated with them right now. That means these are GPU Sprite emitters and not just regular sprite emitters. We will go over the difference between those a little bit later as we create one of each of the different types. I can also show them to you. I will minimize Cascade for a moment. We can take a look around the scene. Here, we have a standard sprite emitter. It is kind of being a bit overshadowed by the GPU Sprite emitter, who wants all the attention apparently because it is flinging particles everywhere. It really needs to calm down. Meanwhile, the standard sprite emitter is pumping out some basic sprites. A sprite is just a polygon sheet that always faces the camera. It is kind of like a little picture of something. In this case, it is just a picture of a tiny spark that is stretching in the direction it moves. You will see how to set all that up later. Next to this, we have the GPU Sprite emitter which is doing all kinds of cool and fun things. This is very similar to the standard sprite emitter. A GPU Sprite is just a sprite; it is a picture or polygon sheet that is always facing the camera. What makes it special is the moment each one of these particles is spawned, it is passed off to the GPU for all of its calculations. Hopefully, your GPU has a lot of processing power. You can probably do great things if you are using the 400-500 series of NVIDIA graphics cards. Of course the more powerful your GPU, the better your gaming experience is. The GPU Sprites get calculated on the GPU, allowing you to have tens of thousands, or hundreds of thousands, or potentially millions of particles, if that is what you wanted to try. Next door to this, we have a mesh emitter. A mesh emitter is made of particles that each have a Static Mesh attached to them. As the particle moves around, it moves a mesh around with it. It looks like Static Meshes cascading around and falling, and bouncing on a surface. Next, we have a beam emitter. This is a simple beam. In this case, it looks kind of like lightning. We provide two (2) points: a target and a source. We have controlled the location of those points, but also their tangents to create that upward arc. Later, you will see how to set up the beam emitter including adding the noise to make it jitter and look like lightning. Next, we have a ribbon emitter. The actual ribbon is a secondary particle system. Again, you will see how to set up each one of these. We have one (1) particle emitter. Let me open up the particle system for this because it will be easier to explain. We have one (1) particle emitter, which is just creating the particles that go up in the air and fall back down. Then we have the ribbon emitter, which is creating the ribbons that follow each particle as it flies around. You can see how that works. Finally over here at the end, we have some AnimTrails. The AnimTrails required we have an animated Skeletal Mesh. I need to click Play to simulate and show that. You can see those AnimTrails following his arms around in sort of a very awesome disco Queen music video kind of way. Let's jump back. You have seen all of the type data modules. The last term I want you to be familiar with, or at least know about, is distributions. Distributions are really just ways to handle different types of numbers. That sounds like a really complicated way to put this. I have seen distributions scare some people and put them off, so let me show you what a distribution actually looks like. Any of these will do. I am kind of picky. I will grab this cow particle system, and open it up. If we go to just about any of the major properties, you will see the word distribution pop up. There are several different types of distribution. The one to choose depends on what type of number is expected. This is the Initial Size module, which is the size the cow meshes will be the moment they are actually spawned. This is expecting a vector value of X, Y, and Z size. In this case, we are going to see vector distributions. We have DistributionVectorConstant, DistributionVectorConstantCurve, DistributionVectorParticleParameter, DistributionVectorUniform, and DistributionVectorUniformCurve. At a glance, this means DistributionVectorConstant will be a number you set and it is never going to change. DistributionVectorConstantCurve is going to be defined by way of a curve, which is why we have a Curve Editor in here. If you had a property that needed to change over the life of a particle like something that made these meshes get smaller over time, you could do that. You would use something like a DistributionConstantCurve so that they would steadily get smaller. DistributionVectorParticleParameter is something you would use if you wanted to talk to a parameter via Blueprint, code, or even Matinee if you wanted to control something from outside the particle system. A DistributionVectorUniform is going to give you a Min and a Max value. Then, you can get a random number from between those. A DistributionVectorUniformCurve will give you a curve. Each point in the curve has its own Min and Max values. If you would like more details than that, I highly recommend the documentation. I don't usually open up documentation in the middle of a video, but this is pretty good. There is a Distributions page in the UE4 docs, which has some nice graphs to explain what each one of those does. There is a DistributionFloatConstant, a DistributionFloatUniform, there are curves, etc. You can see kind of how the numbers disperse across all of the different types of distributions. If you have never seen distributions before, they can be a little bit confusing. Don't be alarmed. Keep in mind what type of number you want. Let's say you want a little bit of randomness, which is wanted wanted for the color. We selected Initial Color. I knew I wanted a random color so we set the Distribution to DistributionVectorUniform, which gave me a Min and a Max. I set the Min to 0.0 and a Max of 1.0 for X, Y, and Z which correspond to Red, Green, and Blue in this case. Therefore, I was able to get a random value between black and full color. The values are between 0 and 1.0 for each of the color channels, and that gives me a random number. With that, we have covered all of the key terminology I want you to know in order to really utilize the particle system in UE4. You know what a particle is. A particle system is the asset that sits in your Content Browser. The emitter actor is the actor in your scene that is going to hold a reference to a particle system so you can put particles into your scenes. A particle system component is a component inside of a Blueprint that holds a reference to a particle system. Cascade is your particle editor in UE4. You are going to play with Cascade a lot as you create various particle effects. An emitter is a single column in Cascade that represents a single aspect of an overall particle effect. In the case of our explosion, remember we had just the fire, just the smoke, or just the shrapnel. Each one of those was its own emitter. A module is a modular component that controls one aspect of behavior within an emitter. Modules go into emitters. Type data modules are special types of modules that control what kind of particle you want to create. Do you want to create a GPU Sprite particle? Do you want to create a mesh particle? Do you want to create a beam particle? Finally, a distribution is a way to handle numbers in a special way. Do you want just a constant value? Do you want a Min and Max value? Do you want a value that changes along a curve? You will change between different types of distributions depending on your needs. That is going to wrap up this video. Thank you very much for watching. ♪♪♪