Join Craig Barr for an in-depth discussion in this video Creating ambient particles: exhaust, part of Unreal Essential Training (2016).
- Creating effects in Unreal Engine 4 is quite easy and can become quite complex. Complex in the sense of the power of what is available within the Unreal Engine 4 environment. We've taken a look at how we can use simple effects like atmospheric effects and ambient wind driven through a material, to drive our foliage. And we've also looked at how we've created this fog just by simply putting in a particle system. Let's dive a little deeper here into how we can actually create from scratch an emitter to do a couple of other things here.
Now I should point out, if you have access to the content for this course, you will find underneath the Effects folder, a bunch of different pre-built and assembled effects. And these are excellent for really diving in and learning how things are happening within this awesome scene here that Everett has put together for us here. Now, one of the things that I want to do is, I'm just going to click actually on the car, and hit F to frame it and zoom in. And we're going to look at how we can add some exhaust particles here. An effect to, essentially, build some smoke coming out of the exhaust pipe of this car.
So what we're going to first do is, we'll come into our Content directory, actually we can do it in this Effects tab, and we'll right-click and in the Content browser here, we're right-most button-clicking, and we'll just click on, with left-click, Particle System. And it immediately wants to give it a name. So I'm going to call this an ExhaustNEW. I'm just calling it that because we do have another car exhaust here but we're going to use this as our own exhaust setup. And what we can do is drag this into the scene. We're not really going to get anything happening in here simply because we haven't actually defined anything with that particle system.
So let's leave that there in scene and we'll come back and adjust that later and double-click on ExhaustNEW to bring up the editor. Now if you get it in a window like this, a floating window, I'd advise you to just grab the tab and drag it right up to the top tab bar so that you get this full view of the Cascade Particle System here in Unreal. Now again, just really quickly, the basics are our Viewport on the left. This is our Emitter section, where we can build our emitters. And of course, all of our details, all of our attributes and our parameters, all the properties directly related to the particles that we're creating, is all dialed in over in this Details panel.
And down at the bottom right here is our Curve Editor, where we can essentially edit our animation curves as to how everything is working live within the Particle Editor here. So just real quick, a little runaround as to what we're doing here. We've created a particle emitter and the default setup for the particle emitter is going to look very much like this. You're going to have a name up above here and this is where you're going to want to give it a name. In this case, we'll click on Particle Emitter name in the Details panel, and we'll just simply called this ExhaustNEW.
So we've now named that emitter so that, this is important for organizing your emitters as you go. The default setup for the particle emitter is going to give you this stack of different modules here. So a Spawn, Lifetime, Initial Size, Initial Velocity, and a Color Over Life, just the basics to get you going. Before we start working on any of these particles, I think it's important to understand what these little icons represent. So this little icon here is activating or deactivating your emitter system. So if I click that off, this emitter is not doing anything, it's not active.
By clicking that on and having the check mark there, we know that it's active. It's important to note, because if you have an emitter that you've built and something's not appearing and you see that it's on, something needs to be addressed in your module stack here. Over beside that one, we have these different icons, and we'll just click through each one. So this is going to show us our actual particles as to how they're going to render in the Viewport. And you can see right now, the default material that's applied is simply this green, blue and red, to show you where your emitter exists. We're going to change that material in a moment.
But we'll leave it as is. And that's how it's going to render in the Viewport. The Viewport has the same settings in the essence of View Modes, where we have Wireframe, Unlit, Lit and Shader Complexity. By default, we're using Lit. So this is what it's going to look like, or this represents the project viewport, view or look of your particle system. If we click that little icon, we can switch to a couple different modes. One of the modes that you typically are going to work with when you're building something new, might be this Point mode. In this, you can always see this in space, and this is where you're going to essentially dial in the overall shape, density, attributes like acceleration, velocity, any of the, kind of, speed or life existence of your particles as well.
And then of course, we can dial in some different ones here. So you actually get this little cross, kind of point system here, so that you see how the overall scale of things are fading off as they go. So it's useful for that. And this is kind of a Lit view here, and this is turning off any view of it. By default, it does come into the Viewport view. And we'll leave that on for now. We'll come back and change that in a moment. Lastly, is this S key. If you have a bunch of different particle emitters within this Viewport, S will solo that. So this will solo out just this emitter to work with. Here, we're only working with one.
So it doesn't really matter at this point. Now let's go into our basic setup here for this particle system. If we go underneath the Required, the top level one here, we're going to see that we have a base material. Let's change that material. Now we have a material in here that is referred to as exhaust so just type E-X-H, and find the exhaust smoke material, and click that. You'll see that that's going to place this into the scene using this exhaust smoke as our base material to start to build up this overall exhaust smoke. We can see that this is really small in here and it's hard to tell what's happening.
This might be where we might want to start working with the points, just to see what's happening in the scene. If we rotate around by using left-click and drag around, you'll see that we are working in a zed- or z-up and our y and our x are out this way. So we know that these particles are actually emitting straight up right now in the environment. So let's take a look at how we can start to work with this, or start to dial in an overall effect to get something interesting happening here anyways. Once we have our material defined on the Required tab here, let's leave everything else alone for now.
This is fine for what we have. This is where you can define your origin in space as to where all these things live. Let's leave that alone and go into Spawn. Now Spawn is going to give you some important attributes as to how your particles are being emitted, how they're coming out of the emitter point and how they're behaving or interacting. So one of the things that we want to do here is drive a Distribution Float Constant. So you can see that we have different settings in here. Just leave it to this DFC or Distribution Float Constant. And then we can dial in our constant up a little bit to a level of thirties, that we're getting something that's a little more robust in our Viewport.
The next setting, we'll leave this alone here, is down with our overall distribution on the right scale. We'll leave that setting, that's fine. And let's dive into our Lifetime settings in here. Now what we want to do in this is open up the Lifetime tab. Leave our distribution here at Distribution Float Uniform will work fine. But the minimum and maximum is something that we're definitely going to want to adjust. So the minimum for this, for example, is something that we're going to probably want to be a little bit higher, and we can test that out by simply hovering over top and using our left mouse, and dialing that up.
I should point out it's always going to restart any time you make a change. So that might be a little bit high. Maybe something around five. And our maximum distribution will go up a little higher than that. We might want to put this down around a eight. That's fine. We can also type these values in, if we wanted to as well. So our lifetime now, we know that it's going to exist for a minimum of five and a maximum of eight. So this is essentially going to start to dial in our overall timing of this. So we have 244 frames, represents that existence of that spawning of that particle system in there as well.
So let's go to our initial size. And this is where we want to define the overall size of these particles. This might be where we might want to turn on something like that scaling one that I saw, or even our full Viewport view in this. So let's go back to Initial Size by clicking on that. And let's adjust these a little bit. I want everything to appear a little bit bigger in the direction of the camera. So I'm going to use something in here like, leave it at Distribution Vertex Uniform. And maybe bring these values up to an initial size here of something like, we have 25, 25, and 25.
Let's bring them up just a little bit to maybe something like a 30. Here we go, we're making that a little bit bigger. And the minimum, we might want to put down a little bit lower, so that we're kind of varying the size and the scale of those particles as they're being created. Now what I think we'll do, let's leave everything here, Distribution Vector Uniform is fine, let's go down to our Initial Velocity. And this is where we're going to start to dial in the overall settings for how these particles are essentially being emitted out. Their initial velocity as to when they leave the emitter here.
So I'm going to set this one here as a Distribution Vector Uniform, we won't touch that. And I'm going to drive in a much higher speed on this so that in x, we're starting to get a bit of disruption, if you will, in that x direction. So that we are starting to get a bit more velocity in x. In y, we may want to bring this up to around 20. Now, z or zed, we'll bring down to 20 as well. And our minimum, I definitely want to crank this up so that we're keeping it in that x direction a little bit.
Now we're starting to define a bit of a direction for this in here. And in y, we're going to put some negative values in of -20 and a -20 here as well. And let's take a look at our Start Velocity Radial, Distribution Float Uniform, that's fine. That's the default, we'll leave it as that. So it's hard to tell what's happening in our environment here right now, in our Viewport. We might want to take a look at something like this simple little plus sign one, which shows the scale of these particles as they're emitting, and we can see them dying off, or kind of fading out as they go.
And that's fine for now, for what we want. We've defined our initial size, and our overall initial velocity. Let's get into something here like, we might want to add another module here. I'm actually going to remove this Color Over Life. So I'll delete that module. And I'll right-click on here and let's maybe do something with the size of these particles. So this is where we could go into something like a Size By Life, I think, should work out fine. And what this means is that it's the size or the scale of each particle in this system is going to be affected as, the longer each particle lives for, the longer they exist.
So let's go down to the Life Multiplier here and we're just going to make sure this Distribution Vector Constant Curve is selected here. So our particles are coming out and they're getting a little bit larger as they go over time, and I think we'll leave that. Let's see, the default settings should be fine. We have two elements in there. That's fine. We're going to leave that just as a Distribution Vector Constant Curve for now. And then let's add in something that's going to drive the color. So this is where we'll put in our initial color and let's get this back to the way it looks actually in the Viewport, We'll wait for that to restart.
And actually, what we're going to see in the Viewport here is not going to be totally telling as to what we're working with here so we may want to just leave this here in our Point form for now but we're going to have to work with our initial color here to really dial in how we want this to work. So our Distribution in this case, I do want to change this. I want our Distribution Vector to be Uniform, and I definitely don't want these to both be black. So I'm going to bring the RGB up to a white. So we'll just make everything a one.
And we'll leave the minimum here at a black, that's fine. And our starting alpha should be set as a Distribution Float Constant. We'll leave that alone. So we're going to leave that as the default there and our constant at one, that's fine. And now we want to affect the overall acceleration of this here so we'll add an Acceleration module. And in doing that, we want to define how these particles are accelerating in space. So let's define, a Distribution Vector Uniform is what we want it to be, and we're just going to just dial in some different settings here, 30, 30, and around 120.
I'm just doing this quickly for you so that you can start to dial in and see the live effect happening here as we work with it. So let's work with these in a negative scale. So that we start to get this kind of upward gravity motion here so that the exhaust is coming out and it's actually floating upwards into space there and that should be fine. And we can start to see, with the point here, our scaling here, as everything scales up and fades away. So that should be fine. And now let's just check in, we always want Always in World Space, that's fine.
Now we want to do scaling the color over time of life. So we definitely want to have that color change as life goes on for the particle system. And I don't know if we want to change anything in here. We may want to change this to be more of a distribution for color on this here. Let's set Alpha Scale Over Life to Distribution Float Constant is fine. And we want to make sure that constant on that is at a one so that it is going to affect that scaling, that Color Over Life as well, so we get a nice fade-out with that.
Lastly, let's add something that's going to affect the rotation on this. So our Initial Rotation, we may want to have these come out and actually have a bit of a spin to them. So let's dial in some of those numbers there. Distribution Float Uniform is fine but we do want to set how these guys are going to rotate so we'll do a negative value of 0.5 and a positive value 0.5. So that we now get just a little bit of ambient rotation here on these particles, just to kind of break up that overall scene there as well.
Okay, so now if we take a look at this here. I'm just going to click Save on that. And if we go out to our file here. Oh, I should actually go back in and define this to be, it's hard to see in this space in here, I think we need some lighting applied to it. But the particles are in there. And we're seeing that we're getting a little bit of some smoke in our scene. It's very subtle but let's just frame up on that. And there we can see our particle system. I'm going to rotate this in, this is where I'm just using the same controls, much like you would interact with a piece of geometry here.
And let's just bring this particle system, maybe underneath the bumper here a little bit, down towards where the tailpipe might exist. And straight out the back is probably fine. But in looking at this here, we're not seeing it as well as I'd like to see it, but this is where I can actually just scale it. I could simply just start to scale the overall effect of this, using a regular scale, much like you'd work with a piece of geometry. So there, I'm just going to bring this in a little bit towards the side.
And there, we're starting to get a feel of kind of this overall exhaust, and if we wanted to make that even more puffy, I can scale it up. Maybe just a little bit more in there too. And there we go. We have this nice effect here of exhaust, coming out of the vehicle and something that has a nice density to the overall effect of it. So there we've taken a look at how we can actually create an emitter, using the Cascade System, the Particle System, within Unreal Engine 4. And just really quickly, how we can stack up those modules and just rapidly dial in to get our overall effect, to give us the effect we wanted for this exhaust system here.
- Customizing the Unreal UI
- Creating a new project
- Creating landscapes
- Blocking out levels
- Assembling a scene
- Working with materials and lights
- Adding post-processing effects
- Defining bodies of water
- Adding atmospherics, foliage, and wind
- Working with the Blueprint editor
- Creating cinematics
- Monitoring performance
- Packaging a game for distribution