How To Make Thick 3D Mist Zones In UE5?

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
complex fog is actually hugging this bush all over the place like it's actually intersecting in three dimensions hi guys my name is baradante and let's talk about making Misty zones for your game so I have a few of these guys right here making the scene looking a lot more atmospheric and Alive I'll say it right away this is not the most performant way of doing it but it is the most beautiful and the most three-dimensional like actual volumetric fog you control it using like a sphere for instance and by the way these are very high poly spheres you can use a much slower one because it doesn't actually take into account the geometry of your mesh and yeah you can place them around you can duplicate them put them in a different place so all the magic is in the material of course it's a special volumetric kind of material I'm sure I'm not saying anything super new in here there are probably probably some kind of videos on YouTube but I just wanted to make my own thing because I found these uh these guys right here pretty exciting so yeah what we have here is a controllable Albedo we can make them like black or red or whatever we want that's looking like a revolution now but for the revolution we also need to increase the speed of the wind so it's not connected to other things but I imagine you can control this setting to the um level scale wind value that would control shaking of the leaves on your trees as well as the movement of the fog and also we have this noise strength right here that lets us uh make the thing a bit more eaten away with the noise like this and we can see how it's moving sideways of course it's a very temporal effect so I don't expect it to show you like a strong very sharp clouds from like a grenade or something that would be moving in the wind really fast we can already see there's some kind of like Trails happening from uh the movement but yeah just Lively somewhat like you just noticed that it's moving around that kind of fog I think it's looking very convincing and most importantly it's like a truly three-dimensional effect that you can see how this complex fog is actually hugging this bush all over the place like it's actually intersecting in three dimensions so it's uh it's quite an intense thing in terms of like Shader complexity it's uh not exactly perfect definitely best not to overlap them the way I have it happening right here but overall like for some kind of very flashy and awesome looking effect this is like not that bad of a complexity definitely don't use it to cover up the whole area you know was just creating a giant sphere to have this noise moving all over the area it will work it will show up as such but it will make everything dark red like this there are actually options in the settings for the Shader like when you set it up that may make things a bit snappier to work with but yeah here's pretty much the setting let's look into it here are the stats if you know how to read those and pretty much this is it so a couple of things yeah I actually have a setting for the optimization thing I was talking about but I don't think it's actually affecting Shader complexity specifically so we might not see any difference in here but like this camera inside toggle if you remove it things are actually calculated a lot simpler but it's best not to move your camera inside of the sphere so if you're planning to walk through this Misty Zone then definitely have this checked then everything will be showing up properly I'll keep some color around so we will see things better but yeah right now I unchecked the toggle for the camera inside and if we move the camera like this actually right now it's looking better yeah there it is so sometimes certain planes that are actually pretty rare in here they will intersect with the camera like this and if you have this checked all of this will be fading in a much more three-dimensional way so you're like seeing the cloud from the inside but overall I did notice like it's sort of like making things noticeably more transparent when you're inside I don't think you can experience the true thickness of this cloud from the inside like it's there it's definitely there but I noticed it becomes more transparent when the camera is inside nonetheless of course this is a very cinematic and awesome looking effect uh I'm not sure like with my incredibly heavy Forest I have going on right now I'm just trying to reach the maximum like the Event Horizon level of detail on the forest to see how things are and then see what I can do from there also yeah by the way this is the performance when I'm I'm not encoding my video with Nvidia GPU so things are not as insane I couldn't figure out at the moment of recording what happened but yeah things are not as terrible as they seemed not sure how much uh actual frames per second gain this tweak does but it definitely is worth keeping in mind because in the actual settings right here this is uh two settings that camera inside switch is changing and both of them mentioned that extra calculations will be needed if you want the camera inside and have all the stuff working properly so I'm not gonna go through every single node and like rebuild everything you guys can see how things are overall I'm using like an RGB and multiply it with time to have the movement of the noise to have the wind happening and here's the actual noise I use this texture based gradient maybe judging by the name maybe like the fast gradient for instance would be a quicker performance I was choosing the one that was looking the best for me and another thing that we combine with the noise is this sphere gradient which is the thing that's making things a bit more complicated with this camera placement so on its own the sphere gradient introduces a fade next to the edges of the sphere so it will look just like these nice soft spheres actually it's not exactly the way it looks it looks a bit more linear and sharp if I skip the smooth curve right here and just connect the gradient to the end result right now it should happen yeah right like this so this is the sphere gradient here and it's an actual gradient that ends in a certain fade at the end but right now we have a very strong thickness of the fog of course but another thing here is that it's a linear radiant so it requires like a smooth curve and then just applying that to the gradient it's sort of instead of making like a linear falloff it makes it to go like this and at the end it will be a very soft fade so yeah like this we can see this fade is happening now these are actual soft nice blobs like this and of course if you lower the thickness it will fade very nicely with the environment but all of that doesn't influence the Shader complexity as well even if we at all disconnect any of the computation right here the Spheres will still show up red like this yeah so now they're like these uh boxes and we still have red Shader complexity which by the way what's interesting is that the Spheres are red but not the boxes something to think about I like I'm not sure how exactly you should pay attention to these colors in here but they're here for us to analyze things there may be other options to do it but as far as I know you can only apply a Shader to an actual mesh you can't use like a volume or something maybe there are other options that would be more optimized in that regard but overall this is pretty much how I managed to make it work another reason why I use an actual sphere is because you really want to see where your fog actually ends like for instance in here we know we have a more problematic situation so I see exactly where this is going on and I can move things around and adjust stuff so there would be no high Shader complexity going on like this so yeah I'm back to more realistic settings I like using thickness of 0.1 it works best when you have a high thickness of the fog in the exponential height Funk settings so something you pretty much inevitably use when you set up a level in Unreal Engine 5 is exponential height fog without it things will look quite weird in many ways so yeah it's an important part of it but with like a bit of a thicker amounts of that fog at the distance and overall like in here this is just this height fog these fears like this Shader really Blends in well and like introduces some interesting variations to liven up your scene a bit I think it's really cool but yeah make sure to use it wisely using like small little spheres here and there to highlight certain areas and stuff like that and yeah in terms of creation right here I used one of the starter pack spheres and just duplicated them and use this what you can actually do in Unreal Engine 5 you can hit shift 5 or choose modeling right here and create a sphere and best to use a box based sphere like box subdivision kind of sphere and the settings should be as such subdivisions should be almost minimum like minimum is literally a box but two will look like this because why use any extra polygons another important thing to set up here is that pivot location should be in the center this way the spawning sphere will show up halfway into the ground and it's important because the gradient like the spherical gradient of the fog is locating itself based on the absolute World location of the object which is literally where the pivot point is another problem with this by the way and if you guys know a way around it like you can't really use this Shader with procedural content generation so far I haven't found a way to do it uh the point is since the gradient is relying on the pivot point of the actor all the gradients will be showing up at the pivot point of the PCG actor which is one actor and all the trees in bushes and all the Spheres of the fog that you'll be generating they will be just components which don't have their own Pivot Point as actors in the scene maybe there is a way to find like a pivot point of the actual component but I I tried several options I didn't find how to do it but overall yeah this is pretty much the best settings I can come up with for creating a quick mesh like this we hit accept and we have our sphere happening one more thing I created it with a radius of 50 that's because my Shader is set up to have the radius of 50 and as you are scaling the object it's set up to be scaling with the objects as well so the gradient and the spherical gradient will be scaling with the object right here object scale is applied to the radius so either use a 50 radius for the sphere or create whatever you want but then adjust the radius right here in the Shader to the same number and now here I'll look for my material instance mist and it's already here right now if I increase thickness we'll see it and yeah moving and scaling totally works it's always a sphere you can't like squish it or anything like you can but it will uh crop the gradient of the sphere in kind of a Sharp fashion as sharp as it can so it's not the best maybe of course there are applications uh to make this work in a good way there are of course Limitless possibilities in you know adding Fades when you are squishing the object as well and make it react differently to that but I just I wanted to make a simple fog that actually works to just liven up the scene you know without going too crazy with it and I think it's pretty cool I'll probably replace all these uh High poly spheres with something more simple I have a missed sphere set up right here I'll go ahead and copier the reference to it and then I'll go ahead and delete the this High poly sphere right here and put the reference right here in the replace reference when you are deleting the object you can like replace it with anything else so here we are now I should go ahead and actually apply the Shader in the actual asset and we're good to go now all of these tiers are a bit more optimized but I probably won't see any difference in the performance all right and so this is what this fog looks like in the actual game as I said it's an actual fog style right here you can see the beam of fog foggy light from the invisible flashlight on John is pretty faint there but if we get into the cloud we can see that it becomes much stronger so it's all compatible and working the same way as the exponential height fog of the whole level does so that's pretty cool like it's a high-end visual effect so yeah use wisely but I think where needed it won't disappoint so yeah this is it let me know what you guys think uh I think it's really improving the looks of the forest making this procedurally generated uh location looking a lot more intentional and elaborate again I know there are simpler ways to do it but they have their own limitations and this is like one of those really cool looking use wisely kind of effects that may really improve things in the special occasions but for now this is it and I'll see you guys in the next video bye also if you turn on the sunlight this thing also casts pretty epic volumetric shadows and everything
Info
Channel: BoroCG
Views: 19,023
Rating: undefined out of 5
Keywords: game, environment, ue5, unreal, engine, fog, mist, atmosphere, realism, 5.2
Id: xW7LL3eFjpo
Channel Id: undefined
Length: 15min 11sec (911 seconds)
Published: Tue Aug 08 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.