UE4 - Introduction To Niagara

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello and welcome to the game dev outpost in this video we'll be talking about an introduction to niagara and unreal engine 4 specifically unreal engine 4.25 in 4.25 and above niagara is production ready although it still does have bugs so by default it's already enabled if you right click in the content browser and you go to effects you can see that all of your niagara options are here if you're using below 4.25 you want to go to edit plugins and you want to go down to effects and then you want to enable the niagara plugin and the niagara extras after you enable that you'll want to restart the engine so the first thing i'm going to do is i'm going to right click and i'm going to make a new folder for effects and then i'm going to give this a color so i can see it easier and in this folder i'm going to right click we're going to go to effects and we want to make a niagara emitter from here you'll have a few options you can make a new emitter from a template you can inherit from one that's already made you can also copy one that's already made we're just gonna make a new emitter from a template so we'll click next and then we want to click on empty and then we'll click on finish from here we'll give it a name and for good naming conventions we'll just name it n e and then whatever you want and then we'll double click on it to open it up now when you open this up for the first time there's a few things that we don't want to look at because they're distracting and we're not ready to talk about those yet so we want to close the parameters window and we want to close the scratch pad now overall if you've been using unreal for a while the interface is not too different you can slide all these windows and adjust them you have a menu bar you have a toolbar preview window you have a workspace window and then you have a timeline down here in the system overview we have a few hotkeys and mouse controls that we can use if you right click you can move the system overview window if you left click you can drag and select if you middle mouse wheel you can zoom in and out and then if you hit f or if you hit a on the keyboard it'll re-center in focus if you hit c on the keyboard you'll get a comment window you can select it and you can hit delete on the keyboard you can also select the emitter itself and hit c for comment now the niagara meter itself has two types of things in here we have categories which are the emitter settings emitter spawn emitter update particle spawn particle update add event handler and render all of the things underneath of these these are called modules so when you select your emitter you'll see that in the selection window everything shows up every option that you have currently in your emitter the categories and the modules you can also select the categories one by one and that'll show the category and the property you can also just select the module itself to see what's just in there additionally if you want to see two modules at the same time you can multi-select and you can see those in the selection window now the first category we'll look at in the first module we'll look at is the emitter settings and the emitter properties in a later video we'll talk about scalability but this is where you can set but this is where you can set up platform specific stuff or lod kind of stuff in the emitter section this is where we can choose between cpu and gpu you can choose whether or not the emitter is going to be local or if it's going to be world if you end up warning particles of trail this is where you'll turn on local space and then we have fixed balance now there's a multitude of reasons why you would have fixed bounds on if this is a gpu particle you need to have fixed bounds turned on it has to be on with that said in your toolbar you can turn on the bounds so you can visualize where your particles are if you're trying to move around the preview window sometimes you get lost and you can't find your particle it makes it a little easier to find where your particles are and we will come back to the emitter but i'm going to talk about the preview window for a second the first thing to point out are the preview window settings so if you go up to the menu bar and you click on window you'll see preview scene settings click on that and you'll open up a window if you toggle show environment this will turn your environment on and off sometimes you want the environment on sometimes you want it off other notable settings in here are under show you can turn the grid on and off you can also turn on particle count although this is kind of redundant you can see that the particle count here is zero and then also over on the selection window you can see that the particle count is zero here as well to navigate the preview window you use right mouse button to zoom in and out you use left mouse button to orbit and you use middle mouse button to pan you can also wheel in and out to zoom so coming back to the emitter you can see that nothing is spawning right now so our first goal should be to spawn something so we're going to look at render first under render if you click on the plus icon we can render meshes we can render ribbons we can render sprites right now by default we have a sprite renderer and we can see that there's a material associated with it some other properties in here are alignment and facing mode this has to do with billboarding we have sorting modes so how will the particles sort between each other and then we have subuv this is meant for flip books and we'll come back to this in a future tutorial so we are choosing to render something here so the renderer is not our issue next we want to come up to emitter spawn and emitter update so technically you shouldn't really have to add anything to emitter spawn because currently we have an emitter but if we click on this plus icon notice that we do get quite a few options in here and particularly we get options for spawning so we're going to click on spawn rate and once you do that you'll see that we get an error in a lot of situations niagara's going to try and do its best job in letting you know when something isn't correct so if you read in here it'll say reposition this module in the correct order related to emitter state you can dismiss this or you can click on fix issue and what you notice is this just went from emitter spawn to emitter update so we really don't need to do anything in emitter spawn we want to do it in emitter update so once again we'll click on this and we're going to hit delete on the keyboard so we can hit the plus icon on emitter update when we click that plus icon you'll see that we have a category for spawning again and you'll see that spawn rate is in there once again now with the spawn rate module this is saying how many particles do we want to spawn per second so we can set this to a whole number or we can also set this to a decimal number something like 0.5 or something like 3.25 so if i put in one it's going to spawn one particle per second now if we turn this off and we add a different module and we go to spawning we can choose spawn burst instantaneous now this module is saying how many particles do we want to spawn and when do we want to spawn them then turn that off and we'll turn on spawn rate so now you can see that we have something rendering but the simulation isn't playing right now so if you want to play the simulation you want to come up to the toolbar and you want to hit play or you can come down to the timeline and down here you have a play button as well and turn off bounds now each one of these spawns are dependent on the emitter state and the main properties in here have to do with the loop behavior under this life cycle mode if you click on this drop down if you haven't set the system by default for now just change it to self on the loop behavior you can choose if you want it to loop forever or if you want it to loop once and if you choose once you can choose fixed or you can also say once forever you can also choose multiple and in here you can set how many times you want to loop and how long the loop duration is so you can see that this loop duration is set to one second so after one second it's going to loop again you can increase this and you see that it adjusts on the timeline if you come down to the timeline if you hover right over the edge here you can grab this end and you start to pull it in either direction and when you do that it's going to update that loop duration there's two different ways you can change the loop duration right now i'll set it back to infinite or i'll set it back to once now let's look at particle spawn and particle update so the way that i look at parkour spawn is what are the particles doing from the start these are things that can happen when the particles are spawned versus the particle update these are what do you want to change about the particles these are things that can happen after particles are spawned so under particle spawn we do have plus options you can add many different things in here but let's take a look at the initialized particle so in initialized particle we have color we have mass and we have lifetime now this is important to talk about the lifetime the lifetime in the particle is different than the emitter lifetime this is how long the emitter lives and this is how long a particle lives particles can and often will live longer than the emitter in particle update we have particle state which directly relates to the initialized particle this says kill particles when lifetime has elapsed so that directly relates to the lifetime so in particle spawn if we add if we add velocity in here and say we wanted to add velocity on the x in this situation the particles are being spawned with a velocity already so they're going but we can also add another velocity so that we can change it after they're spawned what we'll see in the particle update is if we add this we're going to get an issue because the velocity needs to be in the correct order so we can grab this and we just move this above solve forces and velocity so now if we change this to something like 10 now we're updating the particle even though it's been initialized with a velocity all right so the last thing to go over in the middle is the timeline it's important to note that in the timeline you can right click and add a folder but it's pointless there's no reason to do that in the emitter at all you can also click on track and you do add folder there's no reason to do that you can only ever have this one bar right here down here these are our play settings so we can pause or play we can reverse play or pause etc we can scrub on our timeline so we can play through the particle system we can right click and move left and right so we have a better view if you hold down control and middle mouse wheel you can zoom in and out on the time you can also set the start time and the end time this is just for previewing if you scrub to a certain point and say zero you can right click and you can set the start time and just the same you can right click anywhere and you can set the end time all right let's save our emitter and we'll close out and we're going to go and drag this into the world but what you'll see is you can't bring an emitter into the world it doesn't work that way you can't just bring in it so you're going to need a niagara system there's a few ways to do that you can right click and you go to create niagara system or you can right click in the content browser go to effects and you can click on niagara system now from here it'll be kind of similar to the niagara emitter where it'll ask you if you want to if you want to make something from the selected emitter you can select emitter and make this work maybe you want to use the template or maybe you want to copy an existing system we're just going to create an empty system and click finish name this ns for good naming conventions and then whatever you want and then we'll open that up you'll see that this looks very similar the only difference is that you have this thing right here we're not going to talk about that right now there's a few different ways that you can get your emitter into this system in your content browser if you just grab your emitter and just drag and drop it right into the timeline it'll be in here if it doesn't start playing right away it's either compiling or it's a little buggy so try closing the system and then reopening it other ways that you can add your system is by right clicking and going to add emitter and you want to find your emitter you can also go to the track field and under here you'll see emitter and you find your emitter under there as well you can't duplicate your emitter but you can copy it and you can paste it so now you have two you can see that they space out next to each other in the system overview you can also copy it here and you can paste it now there's a few things to note about the niagara system even though you have an emitter in here you're inheriting you're inherited so if you try and select one of these modules and you hit delete you're going to get yelled at it's going to say this module cannot be deleted because it's inherited what you can do though is you can turn these modules on and off or you can also override settings so maybe you don't want 10 maybe you want 20. when you override a setting you'll get a green revert icon letting you know that you can revert this back to the parent back to the parent emitter all right we'll hit save we'll close out of this and then we'll drag our system in what you'll see is it starts playing right away this up and if you have a problem and if you're having a problem seeing any of this in your environment just hit g on the keyboard and remove the engine ui if this isn't playing right away you can click on for solo and it'll play or of course you can go and play and simulate if you want to learn about some of the other modules and how they work i recommend just going and taking a look at the other emitter templates just check them out and then look at the modules and turn them on and off just to see what they do try and break it all right guys this covers an introduction to niagara and unreal engine 4. if you thought this video was useful and it helped please let me know by commenting down below and liking the video thanks guys you
Info
Channel: gameDev Outpost
Views: 35,424
Rating: 4.9286423 out of 5
Keywords: Get started with Unreal Engine, Unreal Engine 4, Ue4, Getting started with Unreal, GameDev outpost, GameDev, which game engine should i use, Epic Games, Game Industry, indie games, Starting game development, Getting started, Navigating the viewport, Settings, Camera, Content Browser, Import, 3d, Import 3d, material, Shader, PBR, Material Instance, Texture, Niagara, Unreal 5, 4.25, 4.24, 4.26, Introduction, particles, particle, spawn, Emitter, System, Plugin
Id: VEG-Xp92cBk
Channel Id: undefined
Length: 14min 47sec (887 seconds)
Published: Thu Jul 30 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.