How to Create SMOKE with Particles in Unity!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
what's up guys justin here with the realtimeessentials.com so in today's video we're going to talk about how to use particles in order to create smoke in unity let's go ahead and just jump into it alright so first thing we want to do is we want to create a new particle system so we're just going to right click over here we're going to go down to effects and we're going to add a particle system we're going to go ahead and align this object with our view so that it's in our view and then i'm going to go ahead and move it back over just a little bit like this move it down and we're good to go so now we've got the particle system in our scene all right so the first thing we want to do is we want to select this particle system and notice how now it's still white like when we created the snow well for the moment what we want to do is we want to take this and change it to more of a gray color so i'm kind of like smoke would look right so we can just go into our particle system settings by selecting our particle system we're just going to go to our start color we're just going to make this kind of a darker grayish material so something like this i'm not going to get too in depth on it for right now just something where it's a little bit closer and so then now this is emitting these little pieces right here well we want to go ahead and we want to make this a little bit bigger right because these are too small they look like little like ash little pieces of ash or something like that and so we're going to go ahead and we're going to take the start size we're going to bump it up a little bit so and you can bump it up as much as you want but if you get too big then it starts looking a little bit weird right so we're going to bring this down maybe call this like two and a half for right now um that's kind of a good place to start and so one thing i'm noticing about this is you still have like this white color in the middle and so we can kind of adjust that by adjusting our color so that we've got kind of a grayish brownish or something like that so if you drag this from the white side to the colored side right here notice how the inside of those is going to be more that color that you select rather than kind of the white on the inside so you can use this in order to adjust that and again we may come in here and play around with the start size a little bit more so just to kind of get a look that we're going for all right so now we've got our colors kind of where we want them to be but we're going to go ahead and drop this speed down because they're really going too fast right like the faster these go the faster they move we want them to move a little bit slower so i'm going to bring this stretch starts me that the start speed down a little bit so maybe we'll go to like a 1.5 or something like that all right so i've kind of messed with these settings a little bit more i've kind of brought my start speed down even more and again just kind of play around with this to get the results that you're looking for but now let's jump into the emission setting let's add more objects so notice how the more of these that i add in here um the more smoke that i'm going to get in my scene so i'm going to go ahead and bump these up delay we'll call it 20 for right now and so you've got this system in here right now and we've adjusted the rate over the time but we can also adjust the shape in which this is being emitted so right now for example notice how this is kind of emitting these in kind of a weird direction so i'm going to go back and reset my rotation so i'm going to set my rotation back to 0 0 0 and then just kind of like play around with that a little bit as well so for example i probably want this to face up rather than kind of diagonally like it was facing so i'm just going to adjust this so this is maybe like negative 90 degrees or something like that so we're just going to get this close so that it's emitting everything in kind of that upward direction like this and then we're also going to adjust the size so the size and angle of the cone is going to affect the angle at which your smoke is generated so if i turn this cone in like this notice how it's going to be more a straight up and down if i move it out it's going to move the smoke more outward right so you can adjust this cone to however you want in my case i'm going to make this more of like a straight up and down situation right here you could also adjust the radius of the object in here so if you wanted this to be larger or smaller notice how you can use this in order to spread your smoke out or more like heavily concentrated like this and i'm more like it like this where this radius is a little bit smaller but again those settings are going to kind of allow you to control what your smoke does inside of your particle system alright so in general this is looking pretty good but um it does look a little bit if you look down here like you've got basically a scene that is emitting particles and so we want to do is we want to use an image file in order to make this look more realistic and so there's a ton of different places you can go to get smoke images so if you just go on google for example and you just google smoke sprite um what you're going to find is you're going to find a bunch of these like different sprite sheets that are in here that are just basically or collections of 2d images that look like smoke in this case i just clicked on this one from smoke aura from opengameart.com so that takes me to a page where i was able to download that you can however go wherever you want and download whatever material that you want but in this case we've got this kind of like smoke material that we've brought down so this particular download gives you a bunch of different smoke options we're just going to include one for what we're doing right here so basically what i've done is i've dragged that smoke material in here and let's go ahead and do it with zero zero one so i'm just gonna drag that material into my materials folder well then i need to create a material and so we need to do is inside of our renderer there's an option in here for material and we're gonna apply this to that box however we can't just drag the image file in there notice how that doesn't work so we need to do instead is we just need to create a new material so we're going to make a material right here and i'm just going to call this smoke sprite right here so that's my new material and i just want to come in here and i just want to under my shader i just want to go to the sprite lit default option right here that's going to allow me to drag my zero zero one image into my texture right here so now that's created this kind of like sprite material like right like a 2d material that we have in here well now i can take that material and drag it into my particle system so i'm going to go find my particle system right here and i want to drag my smoke sprite into my default particle right here well notice how as soon as i do that what that's doing is that's repeating that sprite over and over in here so it's basically instead of doing the like circular particles that we had before now you've got this like sprite in here that's being repeated and so now our smoke looks a lot more realistic so there's a couple other things that you could do in here like for example you can set the size over lifetime function so if i was to check the box for size or lifetime notice how the smoke material is now getting smaller as we go over time and you can just select this and you can use different curves in order to do different things right so the steeper this is the smaller these are going to get over the lifetime so in this case i found that kind of adjusting this up a little bit on the back side is a little bit better for me because it doesn't make these like super small on the top end so you could also adjust like the color over the lifetime if you wanted to do that so you could set this to have like a darker color in the beginning and a lighter color in the end or a more transparent color in the end as well so that's another function that you could use you could also add some noise in here if you wanted this to move around a little bit more so obviously this is too much but if we were to turn our strength way down right so let's turn our strength down to like .25 or something like that that's gonna add just a little bit of noise in here we'll notice how when we add a little bit of noise in here that's just going to make our smoke kind of move around a little bit so again that's just something that you can kind of play around with when creating that smoke inside of unity so if you don't like the color in here for example you can go back up to your initial color and adjust that as well so if you wanted like a lighter smoke material you could create more of a light smoke material you can really do whatever you want once you get those image files in here but notice how that's going to get us a pretty realistic smoke material without having to do a whole lot of extra work inside unity alright so in the future we're also going to talk about how to create fire using particles but leave a comment below let me know what kind of particle system tutorials you'd like to see for unity i will link to some other particle tutorials on this page as always thank you so much for taking the time to watch this and i will catch you in the next video thanks guys
Info
Channel: The RealTime Essentials
Views: 16,898
Rating: undefined out of 5
Keywords: unity, unity software, unity 3d, unity 2020, unity 2021, unity particles, unity somke, unity smoke, unity smoke tutorial, unity particle tutorial, unity smoke particle tutorial
Id: YwGS73QpPt0
Channel Id: undefined
Length: 8min 28sec (508 seconds)
Published: Tue Mar 22 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.