How to Add MIST AND FOG with the Compositor!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
what's up guys Justin here with the CG essentials.com in today's video we're going to continue our series on the compositor and blender by talking about how to add mist and fog using the compositor let's go ahead and just jump into it okay so for today's video we're going to use the wanderer demo file that you can download from the blender demo files page I'll link to that in the notes down below this is an awesome model by Daniel bysted who's had multiple different models used as demo models and splash screen models for blender all right so when we're we start off in this model we want to go ahead and we want to jump into the compositor tab so you can click on this tab right here notice how this is set up to allow you to create a composite of the image I actually really like the way that this ended up being laid out but um one thing to note about this is you can hit the zero key on your numpad right here and what you can do is notice how as I drag this slider this is going to rotate this image this is going to basically move your camera and I'm going to use that to select a viewport in here or view Direction in here that's got something in the background but then I'm just going to tap the Z key and jump over into rendered mode so we can see this and so the other thing that you want to do for this tutorial is jump into your scene settings and toggle off that volumetric lighting that volumetric lighting is another way to add mist and fog it's a little bit heavier on your computer but it can give you a different and a lot of the time better result but this is going to be a lot faster and a lot easier on your computer but now what I want to do is I want to render this image now notice if we come into the compositor and try to render this image it's going to give us an error and say there's no render output node that's because those nodes that are usually in the compositor aren't in this file for some reason so you just want to do a shift a and you just want to add an output composite node and you should be familiar with that node if you've been watching these tutorials but you want that node and then you also want an input node of your render layers right and remember those are just your layers that this generates when it creates a render so if I drag the image into the image and then I say render image it's going to do exactly that it's going to render this out and so one thing that I want to do is I want to come over here into this tab right here and I just want to adjust this to the image editor and I want this to be my composite or my render result so if I type in render result right here this is what the rendered image is going to look like so now I've got two windows in here and what I want to do is I want to start adding the missed data and so to do that we need to add that as a render layer and so you want to come over here into your view layer properties and make sure that you've checked the box for mist and so when you do that notice how that gives you an additional pass right here now we're going to go ahead and we're going to do a shift a and we're going to add a viewer node and we're going to go ahead and we're going to drag that missed pass into the image right here and so this is actually going to show us that viewer node but notice how it's completely black right now that's because we added this as a render layer but haven't actually rendered with this as one of the layers so we're just going to want to go into render re-render our image so that we now have that data in here and so now if you look at this notice how in the lower left hand corner if you look at the viewer node you can see what that missed pass is doing that missed pass is basically coming in here and it's adding a pass on top of your render that basically figures out distance from your camera location and so notice how we get this kind of like grayscale effect where things that are closer to your camera are dark things that are further from your camera are light now one thing to note about this is if you jump over into your World Properties we want to go into our missed pass settings you can adjust the depth of this Mist right so so what that means is that means you can set the Mist where it starts closer to your camera so I might set this to a two and you can set it where it fades all the way out further away from your camera so I might set that to like a hundred and then if I re-render this image it's going to redo the missed pass notice how this mispass changed right here because we've set it where the Mist starts really close to our camera and then it starts fading out okay so now what I want to do is I want to add that to my composited image so what I can do is I can do a shift a add a mix node in here like this and we want to take our image into our first slot and our missed pass into our second slot right here and so when we do that notice what that's doing is it's really just kind of like overwhelming the image right so you can use the factor in here to kind of get a result but you don't want this to be just like you don't want it to replace that image so what you want to do is you want to change this from a mix to an ad and so when I change that to to an ad what that's going to do is that's going to add that mist effect on top of our image like this the cool thing about this is we don't have to do anything with like volumetrics or anything like that in order to get this result now at the moment though I don't really like this because I don't have a ton of control over the image that's being created and so to change that what I want to do is I want to do a shift a and I want to add a color ramp node so we're going to add a color ramp right here we want to make sure we drag this image into the viewer as well and so what the color ramp is going to do is it's going to allow us to adjust the lights and darks which is also going to allow us to adjust things like the depth of the fog right so notice how when I do this what this is doing is this is actually changing those lights and darks in my scene and you can kind of see what that's doing in my render result as well if I drag this dark way in here like this notice how we're basically changing how far away from our image the Mist starts now in this case it doesn't really make sense for that mist to be all the way behind our character like this so we really maybe want to play a little bit more with this setting right here which notice how that's basically affecting that the Mist is closer and so one thing we can do with this color result is if we click on this second Little Triangle right here the little marker and then you click on this option right here notice how you can use this in order to adjust the color of that mist and you can kind of play around with the depth pass in here like maybe this will look better with a depth of 50. so you can click in here and re-render that and notice how that's going to kind of change um where that mist is coming in but again you can use the slider to kind of set like where that starts where it stops other things like that if I drag this out a little bit further notice how it's putting the strongest part of the Mist Way in the background like this so you can use this in order to adjust both the strength of that pass as well as the distance from the camera now one other thing you might do with this is right now right we're just using this Factor there's kind of a factor slider in here and you can adjust how strong this is you can definitely just use the factor value in here but if you want a little bit more control of that what you can do is you can add another color ramp so if I had a color ramp right here click I'm going to drag my image into my Factor so when I do that notice how again I can use those darks and whites to kind of dictate where that mist is going to happen like this right so notice how this just gives me a little bit more control over the way that that pass is happening inside my scene so you might use a color ramp node in the factor in order to get just a little bit more control all right so that's where I'm gonna end this video I'm making all the files from this series available at the CG essentials.com compositor so if you want to download this and follow along you can definitely do that leave a comment below let me know if you have any questions about anything we talked about as always thank you so much for taking the time to watch this and I'll catch you in the next video thanks guys
Info
Channel: The CG Essentials
Views: 3,403
Rating: undefined out of 5
Keywords: blender, blender 2.82, blender 2.8, blender modifier tutorials, blender tool tutorial, the blender essentials, the cg essentials, thecgessentials.com, justin geis, justin geis blender, blender 2.9, blender 2.91, blender compositor, blender compositor tutorial, blender mist, blender fog, blender fog compositor, blender mist pass, blender render passes
Id: 42tNCCLZX_A
Channel Id: undefined
Length: 8min 1sec (481 seconds)
Published: Tue May 30 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.