Volumetric Fog in Unity using Particles (Any Rendering Pipeline)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey everybody today we're going to learn how to make volumetric fog in unity using particles so you don't have to worry about if you're on the standard pipeline hdrp or urp or anything like that so our first step is going to be to make a new folder to hold all these assets just called fog and then we can open that up and what we need to do is insert an image which should be in the link below for you and this is just a simple fog particle i can open it up right here it's just a simple texture and the next step is going to be to create a material for this particle and we can just call it fog then we can drag this in right here and change the shader from standard into alpha blended and having it in alpha blended it looks a lot more like a little cloud particle right there now our next step is going to be to create a new game object and we can just call this something like gray volume fog and then what we want to do is we want to actually go in and add a child object which we need to scroll down and find the inside effects and then we want a particle system so you can see right here it gives us basically just a sample particle system and we can go ahead and just change this so if we open up the particle system component right here we can scroll down to the bottom and we can see that it has a material so we can go ahead and drag in the fog as the material we want to use so now we just have to do a lot of work changing these different values to actually make it look like actual fog okay let's get started with our changes so the first thing is to change the start speed and we can have it random between two constants so we can have that zero and maybe two after that we can add a few more changes here so we can do a 3d start size and set it to five five and five so that's already starting to look a little bit more like fog so that's pretty nice after that we can go ahead and go down into emission so if we click on this we can change the rate over time and increase it even a little bit more than what it is right now and yeah we actually also want a start rotation and we can set it to just be a curve and we can click on the curve i'll bring that up and we can just drag it all the way down and all the way up so this means that the curve will just basically be completely random just starting at any rotation all right so after that we can go ahead and click on shape inside shape we can change from a cone into a box now we have an actual box that we're using for the fog which is more realistic considering we want a volumetric fog all right so let's just scroll down and go to color over lifetime and enable that what we're going to want to do is add another key in the middle and have the alpha all the way up but then click on the end and turn the alpha down and then also click on the other end and turn the alpha down so this means that when we're in the middle here we want there to be a full amount of alpha so the fog has a little bit more variation in how transparent it is all right this doesn't look bad but we can move up the scale a little bit here and now it's starting to look a lot like an actual fog environment that you would want so if you're trying to simulate the wind or something like that you sort of already have really great fog for that but if you're looking for something a little bit different for example you just want it to look like the fog is sort of settled over in the air then you can add to the shape a randomized direction so now this is going to make just very generic sort of stand still sort of fog and all of these other changes now are completely optional so for example we can also just change down the alpha right here to make it a little bit less obvious that there's even fog right here and yeah so i'm thinking that this looks pretty nice there's definitely fog here and it definitely looks pretty good just for a simple particle system another thing that we can do is change the color so for example i'm gonna change this to more of a gray fog like that since i called this one gray volume fog and the great thing is we can actually drag this in and make a prefab out of it so now this gray fog is a prefab and i could drag in another one over here so now if we have it running there will actually be two volumes of fog let's just wait for it to load to see how it looks and of course you can keep on playing around with the values and adding your own fog effects to it and just making some really cool looking fog all right well thank you so much for watching i hope you learned something useful today and i'll talk to you next
Info
Channel: Etredal
Views: 4,179
Rating: undefined out of 5
Keywords:
Id: UllkvfMR96s
Channel Id: undefined
Length: 5min 52sec (352 seconds)
Published: Sat Aug 14 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.