Easy Falling leaves! Beginners Guide to Niagara Particles In Unreal Engine 5

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello this is a beginner's guide to Niagara particle simulations I'm going to be showing you the basics of how to create Niagara systems and emitters inside of those systems how to use presets within Niagra emitters to Kickstart your effect and how to adjust that to achieve the results that you're looking for then at the end of this video I'll be showing you how to switch that over to be a geometry simulation which will give you the highest quality results let's get into it I'm going to be using this Forest to build our effect inside of if You' like to know how to make this sort of thing using using procedural generation I have some videos on how to do that which I will link in the description to this video but the first thing I'm going to do is right click in the content browser and make a Niagara system this is going to pop up a dialogue box here to choose what we'd like to start the system as whether it's a new system from an emitter we've already made or creating a new empty system we're going to choose create a new empty system the way Niagra works is that you have Niagra systems and then you have Niagra emitters inside of those system systems you will notice that you can right click and create under effects create a niagar emitter then we'd have to create a Niagra system around it and for me this feels like we're working backwards so I always like to start with the Niagara system so I'm going to right click on that system and name it something like NS for Niagra system underscore Falling Leaves we're going to double click on that to open it by default you will see something like this just very roughly what we're looking at here is a display on the top left corner which will show us how our effect is looking as we're working on it we'll have a graph area where most of our emitters will live we have variables on the left we have the timeline playing through our effect on the bottom here and on the right all of our details as you might have in our standard details panel so I'm going to right click in the empty space here and you can always move the graph by right clicking and dragging and I'll click in this empty space and add an emitter when we choose add an emitter it's going to allow us to start with some templates usually I like to start with a template instead of making an empty emitter because it gives us a head start in our case the effect that we're building is falling leaves and so we have this blowing particles preset which we're going to use to start and it's very close to the effect that we'll want to build but we also have Fountain and bursts and beams and things that we can use in future effects so I'm going to choose blowing particles and each emitter inside of our system will look like this and remember we can have multiple emers inside of our partic systems this is just going to be one for now so looking at this card this is how the emitter works it's sequential so it might seem like a lot is going on but in a simple way what we're just doing is starting at the top of this card and working our way down and that is affecting how the particle emitter operates so if I zoom in here we're sparting with an emitter spawn so the emitter is coming into existence the m is updating in order to spawn particles the particles are being spawned here and then the part particles are updating over time and in each of these sections we can add modifiers like wind or drag or Collision to adjust how the effect looks remember that when we come back here to adjust how this effect actually looks in our environment so I'm going to go ahead and hit save and minimize this and drag our new Niagra system into our environment here and I'll move it up a little bit so you can see it actually is looking quite a lot like leaves already and the only difference here is that we're looking at these little spheres which represent what will actually turn into the final look of the leaves and these little spheres are called Sprites a lot of emitters by default are emitting Sprites they're the most efficient in terms of processing power and you can have the most number of particles on screen at once when you're using this type of Niagara particles and they're basically just flat planes with a texture assigned to it so you can see here these are just really small flat planes with a circle and they have an alpha which is an image that cuts out the outside to make it transparent they have an alpha image that's a circle and so that's how they look the way they look so in order for us to make this look like leaves we need a texture and we need a material to add that texture too now I'm going to link in the description a pack of leaf textures that I'm using it's very inexpensive and they look quite realistic so I'm going to be using that for this tutorial but I need to make a material first so I'll right click and choose material I will call this mcore leaf and then I'll call it version two since I already have one I will double click on that material to open it and if you're unfamiliar with how to use materials I will link a tutorial for that as well below this video jump on that if you need a refresher in how materials work but I'll still walk through this in a very basic way so in order to adjust this material to have a leaf texture all we need to do is drag that actual Leaf texture into this graph area of the material so I'm going to scroll over here to where I have my leaf textures in the content browser I'll scroll down to a texture of leaf that I like to use for this effect let's choose this one texture number nine I'll drag in that texture and I'll connect the RGB to the base color in the material by default all of these also have an alpha assigned to them so if I double click on the leaf here you can see the texture is cut out of the background with an alpha and we can even look at the alpha by unchecking the RGB Channel we'll see the alpha here that's everything that is white is going to be visible and everything that's black is going to be transparent now this is a very important concept for Sprites because that's all they are they're basically colorless and Alphas so I'm going to come back to the material here take this Alpha output in the texture and drag it in to meet my opacity section now you can see that it's grayed out because our material by default is an opaque material so I need to click on the material card here come over to the blending mode under material drop it down and choose translucent now we can even see in our material preview here that we have a Lea texture that's cut out all right so this is good enough to add to our Niagara system so I'm going to jump back over to my folder that I made the material in and make sure you save that material before you go and add it to your system so I'll come over here to my particle emitter and right down at the bottom we see our render section remember everything's happening in order so the last thing in the sequence of things that happen is rendering and that's where the material goes it's very logical and how these things are built so I'm going to click on the Sprite renderer section and we can see that there is a Sprite material already assigned which is why it looks like little spheres here so all we need to do to make it look like leaves is drag our new Leaf material straight onto that material section go ahead and hit save and now give it a minute to load and our particles should look like leaves however there's a little strange thing happening here and that is that when the plane is facing camera it looks visible and then it turns the other side it's transparent and so when we make materials for our Sprites what we need to do is come to the material and under the material section here by clicking on the card I need to switch it to a two-sided material click on that go ahead and hit save now when the particles flip over to the other side they won't become transparent and invisible so this is starting to look good but we definitely would like to maybe add higher number of leaves so now let's start to take our Niagara system and modify its properties to make the effect look more like we want okay so I've contracted the window here so we can see how it's updating in our level so like I said we wanted to add a higher number of leaves so logically let's read down this list here where we might make that change so it's probably going to be in the emitter settings section not in the particle update section so I have emitter update and we have the emitter state which is how it exists in our level and then we have spawn rate spawn rate is exactly what we want here because it's the rate at which the particles are spawned so here under spawn rate we can see we're only spawning 15 particles over the length of our effect which is looping so if we up that to 100 for example suddenly we're going to see a lot more leaves but they're also kind of tiny they're a little bit too small so I need to adjust their size as well coming down the list here it's probably not going to be in the emitter properties it's probably going to be in the particle properties so if I come down the list we have particle spawn initialize particles if I click on particle spawn it's going to show us a bunch of stuff about particle spawning like just like the name and so on the right side here I'm going to scroll down till I find Sprite size mode and this is going to be how the system scales its particles or scales them over time Sprite size mode that we have set up here by default is random uniform this means it's going to be a random size between this Min and Max number and it's a uniform size so you know it's going to scale equally in all the axises but we just want it to be bigger so I'm going to maybe up the max to 15 and the Min to five and see how it looks minimize this for a second we can see a lot more leaves are now falling down which is great however they're kind of like spinning very fast now that we can see more of them they're spinning like tops kind of and I don't like that effect quite as much so I'm going to open up my system again and come down here under particle update this is really going to be your forces like gravity wind things that are going to modify how the particles move around your space for example and under here we can see that there is a wind force and underneath the wind Force there is a aerodynamic drag and so I'm going to click on that and under aerodynamic drag we have rotation strength and I'm going to drop the minimum and maximum rotation strength here to.5 and one now if we look at our leaves here you can see they're still turning but at much slower rates it looks a lot more like leaves next thing we're going to modify here is the wind force and this is a great way to really adjust the look of your effect in your environment to give either the feeling of a strong storm that the wind is blowing very fast or more of a gentle breeze is blowing the leaves down and they're kind of coming down to rest and I would like a more of that gentle look so I'm going to come down to the wind Force here and on the right side here we can see all these different settings related to the wind Forest I'm going to be choosing under wind and wind speed we can see it's giving it a 200 unit speed in the x axis which is why it's blowing this way in front of our camera and I'm just going to go ahead and lower that to 100 I'm halfing now we can see that the leaves are blowing to the right side at a much slower pace so this might be good enough for many effects in fact this is probably where we would leave it if we wanted to keep the effect the most performant for example if you're working on a game but what if we wanted to push this effect even further and make the highest quality looking effect possible in this case I would recommend switching to a geometry simulation right now like I said with Sprites each of these are little flat planes they're paper thin so as they turn in space you're seeing a slight frame or two where they're invisible so in order to up the rendering quality what we would need is to add some thickness add some geometry that actually is bending a little bit the way Leaf might bend and we can do that with this same simulation we'll just need to modify a few things so down here in this simulation under Sprite renderer I can click on it and what I'm going to do is disable it and we're going to click this little plus button this is the first time we've added something to a nagr emitter and in this case what we're going to be adding is a mesh renderer and you can even see one of the options here right away without even searching is mesh renderer and the plus buttons on the rest of the card here work exactly the same you know if we wanted to add wind if we didn't have wind we could click on the plus button under particle update and add wind wind force or gravity add a gravity force so if you want to add or remove sections from these effects that's it's very easy to do that so I'm going to come here to the mesh renderer that we just added and is giving me a little bit of an error this sometimes happens in Niagra systems or emitters because things are very interrelated sometimes you'll have different types of physics being simulated in a row or things that need to reference each other and unreal does a pretty good job of letting you know when something is broken and how to fix it so in this case it just says that the renderer mesh renderer is an opaque material this renderer uses a material with mask or Pig blend mode which writes to the dep buffer and you don't actually need to know how to fix this problem because it have gives you this handy little button here and that says fix issue and suddenly we will see some temporary meshes rendering into our scene and actually it's pretty cool with these because you can see that our collision with the ground is actually working which is really cool about this preset that we started with is it already comes with Collision set up so this will allow us when we're using the leaf geometry that they will actually come to rest on the ground and kind of get blown along the ground which will add a lot of realism to the effect so now I need to add an actual mesh for my leaves which thankfully comes with that leaf pack I was using but you can always make your own as well I'll come over to my leaf pack under meshes here are all my leaf meshes and if I come to the mesh renderer in the Niagra system I click on it and under meshes on the right side in the details panel I can expand it and we can see that this is the mesh that it's using by default so that's why it looks like this this is the mesh it's using so I will just need to replace that with a leaf mesh and I'll scroll through here and choose one that I think will look good maybe this one so we can see now the meshes look like those leaves but we can actually add more different types of leaves which is cool we don't have to stick with just this one leaf it will add a lot of realism to the effect if we have multiple leaves all simulating at the same time multiple different types of leaves so under the meshes section here I can hit the plus button two or three times to add additional leaf type and I'll drag in some other meshes here maybe this one and by default you won't really see much change in the effect here and that's because we need to adjust one thing to tell our Niagara system that it's using multiple meshes and that is adjusted up here in the particle spawn section so under the particle spawn we can see we have these headings for Point attributes for sprite attributes and finally mesh attributes so this will be related to any mesh particles that we're simulating and under the mesh renderer array visibility section this is what we need to change and we're going to switch it from unset to random again we will get a bunch of errors and that's just because in this section here where it says mesh renderer we need to tell it to reference this mesh renderer that we added at the end of the system and so then I'll choose the drop down here and you'll see the mesh renderer that we added if you had named it something different it would show that name in there and now suddenly our leaves are are looking much more varied and a lot more realistic for that reason now since they are meshes now they're looking a little bit too big for my taste and the adjustments that we made to the size of the Sprites for example won't adjust the size of your mesh particles that's done in the mesh size settings so we'll need to go back here to the under the mesh attributes here we can see that is also onset so I'll hit the drop down here and choose random uniform just in the same way that we had for the Sprite renders and here I'll maybe adjust it to.5 to 1 as the max maybe even 8 as the max maybe that would look better okay that looks much better now if you've been paying attention here you'll notice a slight weirdness about these leaves when they hit the ground and if I click on my emitter here it might make it a little more obvious that as the leaves make contact with the ground they're kind of stuck to this up and down position even as they're blown along the surface so that is kind of a slight adjustment that we need to make to this preset because thinks that it's supposed to be using Sprites and so it has a few settings that are a little bit matching a Sprite simulation better and so the one we use to fix this little problem is under the Align particles with Collision plane and you could probably have told that this is the setting that we would need to adjust just by the name of it but we need to click on this and under here where it says particle alignment we have allow alignment on X which is why it is aligning to the X Plus plane as it hits the Collision plane and so all I need to do is uncheck that and now our leaves should just stick to the orientation when they land at which they hit the surface but even to make it look a little bit better I want the leaves to actually hit the ground and go flat against the ground and so the way I would adjust that is just by instead of having the allow alignment on X I would just switch it to Z and now we can see that our leaves are hitting the ground and then they're going flat as they align to the up and down ZX one more thing I want to mention is that this simulation here is in a pretty small area and this can be something that you hand Place throughout your environment as you see fit but what if you actually want this to be covering a much larger area that's very easily adjusted in this simulation all we need to do is come to the shape location under particle spawn and it's using a sphere in order to simulate from so it's using a sphere shape and everything in that shape is going to be where the particles are spawn so if we increase the this sphere radius to something like a th it's going to be spawning those leaves in a much larger area and in this case we might need to adjust our spawn rate to compensate for that change as well get the same number of leaves maybe up it to 500 and this will cover a much larger area and you know you can use other shapes for example you could use a cube or a cone in order to spawn these leaves but you'll need to adjust this to your particular environment so there you have it I hope you found this video helpful if you did hit that thumbs up button and if you have questions about this or you're running into problems drop them in the comments below I will do my best to answer them as I see them as well as if you are curious about learning more about Niagara effects with me I have an online course specifically devoted to taking beginners through the process of using Niagra systems for different kinds of effects like snow like rain or like sandstorms if you found this video super helpful and you like to keep learning that with me defin jump on that course I will link that below this video and I will see you in the next one
Info
Channel: Aziel Arts
Views: 13,123
Rating: undefined out of 5
Keywords:
Id: gekQTr74y3E
Channel Id: undefined
Length: 18min 33sec (1113 seconds)
Published: Wed Jan 03 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.