Unity VFX - Faking Volumetric Fog (Particle System Tutorial)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey everyone welcome back to another very exciting Unity VFX particle tutorial and today we're going to be working on this volumetric fog effect that you see here in the background now this effect is actually in a lot of ways better than the image effect the global fog image effect that's included in the standard assets package uh that comes with unity because it uses actually real textures for the fog so you can bring out a lot of the intricacies and details uh namely the textures I'm going to be using for this are from my ultimate VFX particle pack which if you have you can follow along or I'll just show you the textures now so you can make something similar I've got this uh huge you know 8 by8 uh fire spreadsheet which I like because again you know it's got a lot of details in the textures of the fire and the other thing I'm going to be using the other spreadsheet is this collection of smoke Puffs these noisy smoke Puffs which isn't an animation unlike the previous one but it does have uh a bunch of them sorted into a Sprite sheet which makes it easy for randomization and you'll see what I'm talking about later when we get to that part another great thing about this effect that effect is that it's actually a local effect you can make it a local effect so for example if if you've got a really you know Shady looking Alleyway in a city you can just place that effect uh you know somewhere in the alley and whereas the rest of the city might be otherwise visually very clear and easy to navigate and before we get started I do want to show you that there are separate components to this effect the first one is just the bottom layer which you know on its own actually looks pretty nice but just to give it some more depth on the height I actually added another layer using the smoke Puffs texture to give it that extra Edge and if I zoom out you can see just like the the previous effects that I've done again it's just you know a boxed emitter of sorts which you can move around and have uh following the player around so that they're enveloped in fog at all times or you can just place it somewhere in the world to create a volume fog effect you can see because I've got a very low soft particle setting it very easily Blends into the environment and goes through through solid objects without looking like there's a bunch of billboards there another cool thing about this effect is that it actually looks good even just using the default particle system so if I just hit the default particle system disable texture sheet animation uh you can follow along that way too if you want so you get this sort of effect instead which I think still looks pretty nice okay so let's just get started of course the first thing we're going to have to do is create a new particle effect so let's just create a new particle system and I'm going to turn the start speed down to zero and just reset this quick and move this up maybe a little bit bit above the ground uh set the shape to a box emitter okay and then make maybe make it 10 1 10 so you can see it's covering an area like so next thing I might want to do is actually select the texture I want to use so in this case I want this real fire texture uh spread sheet which I'm going to open up so just type in real fire the one I want is the alpha Blended one so with half color right here so it fades in and out easier and let's just turn the color over lifetime up so it fades in and out so I've got one here turn this down to zero one here turn this down to zero and then just slap one somewhere in the middle 50% and then turn that Alpha up so now you can see they're fading in out now this obviously looks really bad so what you're going to do is use enable the texture sheet animation module uh but in and this is going to be an 8 by8 uh frame spreadsheet so you can see now it's animated but that isn't really what we want actually what we want is to first of all let's just check which frames we can use so using just the uh constant frame over time mode you can actually see what an individual frame of this texture might look like so we maybe want to use somewhere between around let's say I don't know 24 to 38 or something okay so what we can do is create a random between two constants 24 and 38 the reason we want to do that is just so we have a little bit more of a variation in the texture that's being used right so these are the good frames that we want to use for our uh actual fog texture and then what we we're going to do is enable random rotation cuz right now these look way too uniform that's looking a bit better now if we just turn the size up to maybe I don't know let's say three and five that's a pretty good effect so that looks like fog already it looks really bad because it's Fading Into quickly let maybe make that 12 um turn this down to 128 and then let see how low we can turn the alpha down right can make this actually white but turn the alpha way down down like so and then change the start lifetime to be somewhere like between 8 and 12 seconds Okay so we've got a very rough effect going on here uh we can actually randomize these two colors so copy this paste this maybe this is something like 12 and this is this is fine it's 24 Let's see we can have a few so that's not too bad uh next thing we might want to do is just enable some rotation over lifetime random between two constants sometimes it's -10 sometimes it's 10 so there's a little bit of rotation going on if you want you can actually also uh randomize the direction completely and enable a little bit of speed if you want them to be moving around in this case why not I don't think in the previous effect that was happening but we can make them slightly animated to give it a more uh fluid look and then what we just have to do is actually let me just create a new um new particle system I'm going to make this not emitting disable the renderer this is just going to be our folder particle system in a way so just going to put this one in this one set that to zero set that to point five so that's just containing this particle system because we're going to have another one uh so that's just our base fog layer next we want to duplicate this and this is going to give us some variety so let's move this up maybe 1.5 so it's a little bit more in the air so that looks nice actually this on its own uh is perfectly fine you can make this work right so now that I've duplicated the texture I've got two copies of it one at 05 another one at 1.5 all in some sort of folder particle system the reason I did that is just so the particles I can just hit this right to play the entire effect now you see it takes some time to load in so instead what I want to do is just pre-warm this effect so that when I hit play uh for previewing it's all ready to go for me so this on its own is not bad it's pretty good I mean you can always keep tweaking it so it's not maybe so uh you know in your face or whatever but this on its own could work so next what we're going to do is we're going to take the second particle system we're going to find the smoke puff texture so we just type in Smoke P that's good enough really and just if I type in Alpha after that I get the texture that I'm looking for so I want maybe this one right here okay and the the HC just stands for half color so unlike the other textures other materials this isn't boosted all the way to maximum okay so for this one again the texture sheet has to be modified because this isn't an 8 by8 texture sheet spread animation or Sprite sheet it's 4x4 so I just need to just modify this quickly to 4x4 and because it's not an animation I know that all the frames are good I can use any of these any from 0 to 15 right so 0 1 2 3 4 5 whatever 15 so I can just do um choose any frame randomly between zero and 15 right so that works uh for this one maybe I want it to be little less obvious so maybe I can make it eight and I don't know 20 so it's a little bit more faded out for the bottom one and I think that actually looks pretty good I mean again you can keep tweaking it as much as you want uh if you wanted to be following the player around without you know just immediately dragging around you can just set these to use World space simulation so I'm just going to name this to fog lower and fog upper it's also really easy to layer this system so for example let me just play this and I'll show you something so you've got this sort of effect going on maybe you want to duplicate it again right and move this up so now you got clouds or something if that's what you wanted to go for right so you've got a very in case effect there's a lot of potential with this it's really simple to do as you saw I mean it didn't take us more than you know several minutes I think uh if you wanted to do it again you could probably do it in a minute or two tops anyways thanks for watching I think this looks pretty good on its own uh leave a comment subscribe and check out my asset ultimate VFX I'll leave a link it in the description below it's got all these textures it'll have this exact same prefab that we made I'll just name it like Silent Hill fog tutorial or something and leave it in there and thanks for watching see you guys next time bye
Info
Channel: Mirza
Views: 154,512
Rating: undefined out of 5
Keywords: unity, five, unity 5, storm, weather, effects, tutorial, particles, vfx, particle, shuriken, free, download, game engine, ultimate, particle pack, particle system, particle systems, mirza, beig, particle effects, unity 5 particle effects, unity 5 particle tutorial, 5.5, lightning, 2016, unity vfx, beginner, realistic, volume, fog, volumetric fog, volume fog
Id: DvKRGwCImJ4
Channel Id: undefined
Length: 9min 44sec (584 seconds)
Published: Sun Dec 18 2016
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.