3 Ways to Add Volumetrics to Your Scenes

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this video i will show you three ways to add in mist or fog into your blender scene i'll show you how to set it up how to control the effect and i will give you the pros and cons for each of these methods so let's get started let's get into it [Music] so i've opened up a blender scene which i'll be using to show you all of these methods and as you can tell it has a lot of price over 4 million try so that's a pretty heavy scene before i get started on showing you these methods i actually wanted to show you how i keep this scene sort of light on my computer what i have over here is all of these cages and basically these are all my instant objects if i enable this tree collection here these are all trees and each of these is actually you know completely textured like so but i changed the object property viewport display to bounce to actually keep it light on my computer but that's just a quick tip really helps to speed up your viewport scenes and if you go into rendered view you will still see all of it anyway [Music] the first method that i'll be showing you is actually the volumetrics method the most common way of doing this and as always to do volume we'll just add in a cube and scale it up so it covers our entire scene you know something like this move it up a little bit pull it to the back a little bit it doesn't have to cover the entire thing just make sure it covers most of it and you'll be good to go now while we're in the object properties anyway let's just change this guy to wire so we don't you know block our view from our scene here let's hop over to the materials tab here and add in a new material for our volume here let's just call this something like volumetrics and let's remove the default principle bsdf so we can click here and click on remove and now go over to the volume tab click on none and change this to a principled volume if i now hop on over to the camera view and go back into rendered view in random view this is how it looks you'll basically see nothing and that's because the density for our volume is way too high so we have the density value over here and we can actually change this to be lower to something like a point one see how that looks okay so you know it it became lighter it added in a little bit more of our scene but it's still way too dense so let's just go to 0.01 so one percent of the original value and yeah that seems to look pretty good so what we have now is an overall haze completely covering our entire scene and as you can see on the lighter parts it's also more vivid than on the darker parts but basically we have a nice hazy effect on our scene sort of mimicking mist or fog what's very nice about the volumetric wave working is that we have control over all of this so the anisotropy as well and what the anisotropy does and i don't know how it does it but what it does is basically say okay on the parts where the light is actually hitting our volume you want it to be brighter and on the parts where there's less light hitting we want it to be darker or less visible i'm not sure how an sfp works but what it does for our volume at least is it will take the lighter parts so the parts where our volume is being hit by our light rays and actually make sure that these are visible on the parts where there's no light hitting our volume it will make it less visible and i really think this adds to the realism as the hazy effect that you usually see on the world is less visible in the dark than it is in the light so let's take our necessary slider and let's just increase it to something like a point you know 0.8 0.7 ish and as you can tell now over here works fine it works perfect and over here it's just less visible and i really think this adds to the realism of the entire thing you can decrease it if you want a bit more of an overall haze so maybe a 0.6 or so just use a value that works for you another thing we can do with the actual principled volume shader is control the density the necessary via textures so what we have over here is our scene with the basic cube with the volume shader if i now take a noise texture and you can use any texture that you want but i'll use a noise texture just to show you how this works and we take a color ramp and we plug that into the color ram and plug the color ramp into the density if we now take this black slider and just you know slide it over to the right you will see we start to delete some of these parts now we can take the texture here you know increase the skill increase the detail increase the roughness and make it nice and wispy smoke like so for the overall density if i go into the camera view you will see it's way too dense and that's because the white value sort of shows the overall density for this so the white value if we change this to be a you know mid gray color or so you'll see the overall density gets dragged down and if we now move through the mist with our camera motion you will see there's some parts there's no mist at all and on other parts there's a lot of mist and basically this really adds to the overall effect as well and this is something that you can only do for the principled volume as far as these methods go so that brings us to the pros and cons for this method first of all a big pro for this method is it increases the realism it's true the life light catches it shadows also work nicely we can use the anisotropy we can use a noise texture to control it so there's lots of degrees where we can control this effect and really make this very perfect for your specific theme however the cons are render time basically a regular frame for this scene took about one minute or so and if i add in the volumetrics it takes about two two and a half for each frame and only more dense parts where there's more geometry and also more mist it could even go up to about four minutes per frame and that's quite the time increase so before you use this method always consider is it necessary for my project will it really add to my scene and is it worth the extra render time [Music] now for method number two we'll do something completely different and that's called using image cards so before we start let's go into the preferences into add-ons and let's look up image here and there's this add-on called the import export import images planes it comes with blender by default and let's make sure we have that enabled what we can do now is we can hit shift a so go over here to image and choose images as planes now i have a missed image over here and i advise you to find your own i took this one from google it's just the basic one and it's a png with a transparent background so you have basically two roads of doing this first road is you find a png with a transparent background super easy just import it it works done second road is you find a missed image with a black background and you need to make sure that you use the black as the alpha mask so you can actually create a you know transparent background in this case as well alright so let's import our missed image here and there it is and if i now solo this image and i go into render view you will see there's our missed image transparency works just fine it's all good to go what i want to do is i want to create a surface to actually put these on so over here we have our ground object and i'm not going to use it because it's a high density mesh and i don't want to mess about with it so instead i'm just gonna add in a plane for this scene and let's go into top view with number seven let's scale this guy up as well make sure it covers the entire thing and scale it onto y you know something like that and let's move it on the y as well okay so that covers our entire scene let's apply the skill so this all works properly and you don't get any strange things going on so ctrl a and apply the skill and i'll stamp into edit mode hit ctrl r to add in a loop cut in my case i guess and i'm going to add in two and i'm just going to take these two lines on the sides there and i'm going to pull them up ever so slightly so basically what i did is i recreated the ground as a very very simple basic plane and i would advise you to do the same so you have a quick object to work with all right so with our plane selected let's hit new here and let's create a new jump g note system first of all i want to scatter some points on this so i'm going to use the distribute points on faces now if i solo this out you will see this is our plane object and these are all the points and there are way too many so i'm going to go for something like a 0.2 which works fine for me change it to a value that works for you however i want each of these points to be an image so we need to instance something on them so instance on points there it is will allow us to do this now we have the missed image that we just imported and we can just drag it into our geometry node system here and take the geometry output and plug that into the instance on points instance input so these are all the images right now and they are all rotated in the wrong way so they are facing uh sort of down so let's just rotate them on the x-axis by 90 and you should see them in your scene like so now i want the scale to be random and i want all of these images to be exactly the same so i'm going to use a random value and plug that into the scale i want the minimum scale to be 1 which is just basically the default image size and the maximum scale to be about 8. this will look very big but if i go into rendered view right now you will see all of these smoke images or missed images in this case they start to appear and it works it's just a bit dense and that's because you know these images are still at full transparency here so let's start working that in a little bit and you might also notice there's some black stuff over here and if i go into the render settings here and into the light paths you will see i already have 50 transparency balances going on in this scene i believe the default is about 8 or 12 or so and if i change this down to 8 you will see a lot more black and basically what this is is blender not knowing that all of these images are transparent and i need to increase the amount of bounces that it has to actually make sure that they all are transparent so if i set this to 50 still not enough you will see some in the back over here so let's change this to a higher number something like 100 and yeah that seems to work so all of these are now completely transparent and working as intended now let's take this into shading and let's select our missed object here this will give us the mist material over here and it's probably a very simple material like this so just one image texture with the base color and an alpha output now what we want to do is we want to make this more opaque if you will so increase the opacity and we can actually do this by adding in a mix rgb node plugging that in between the alpha and the alpha over here and it will actually start making the images less transparent and that's because it's now adding in this value and this value is not a transparent value so if we change this to black and we change this to zero this is how it looked before we now have this slider to actually control the amount of opacity that we want so if i change this to maybe something like a point eight or so or maybe even less point nine um you will see all of these images become more and more transparent and i think that really sells the overall effect now this brings us to the pros and cons for this method first of all the pros the pros are that this is quite easy to set up and it's a lot lighter on your computer than actually rendering volume metrics also what you're able to do is actually instead of using an image you could use a video so you could just you know look up a video of animated smoke and use that as a missed image part and just you know get them everywhere and it will look like you have actually simulated mist in your scene even though it doesn't take any simulation at all so it really saves a bunch of time on that department the cons however are that this might look a little bit fake especially if you move through it you will see that the smoke is actually not 3d but 2d and it might look a bit less realistic than actually using volumetrics and also you need to increase the light bounces for the transparency and this will also slightly increase your render time as well [Music] all right so that brings us to the final method and that's actually using the missed pass it's super simple to set up and we need to do this by actually going over to the few layer properties here and enabling the missed pass for our render here now our camera after enabling this mispass and enabling it also in here should have this missed pass line going so if you select the camera you will see it has a orange line going from over here to here so these are the distances that it's actually using so five meters from the start so five meters away from the camera is where the missed pass will start and it's going for about 150 meters i believe the default is about 25 or so but this doesn't cover our entire scene so let's just change this length to make sure that it covers our entire scene and 150 works perfectly fine for me and now we just need to render out a single frame all right so after rendering this image let's take it into compositing and this is basically what you guys will see now i already set up some basic compositing for this scene so you know let's not get into that if you want to watch a video on compositing i've done one before and you can watch the end part of this video and i'll put it somewhere over here so you just click there make sure to finish watching this video though before doing that but let's not get into that for this video so we have this scene over here and over here we have our image in your case it might not show up just ctrl shift click on this and you will add in a viewer node and let's make sure the output of this goes both into the viewer node and into the composite so you can actually render the composite out as well so this is our image with just the basic color correction done and but we were talking about a missed pass so if i ctrl shift click on this it will actually you know start cycling through all of these outputs and i can actually go into the miss pass and there it is as you can tell what this does is basically it creates this z-depth image of our scene starting at 5 meters and ending at 150 and it will create a black and white mask or gradient image that completely covers this depth so we see that the trees that are farther away are lighter than the trees that are in front of us and we can use this effect to actually create some sort of fake mist in our scene so if we take a la ramp and we plug the mist into this and we then take a mix rgb node or a mix node in this case sorry it's called mixed node in compositing and we take this and we just take that into the top image and the other one in the bottom image and we can now just switch between the original image and this one now you want to set this mix node to screen what this does is basically tell blender everything that's black delete it from the scene and everything that's white needs to show up so basically creating a fog look this is the default look that it has but we have some control over that with this color ramp over here first of all i don't think this white color really works so we can just take this white color and change it to anything that we want you want purple fog you know pink fog there you go you got it but in my case i'll use something slightly orange maybe slightly tinted towards the red which better complements are seen here now if i start previewing this again you will see that the mist pass has now turned from black and white to black and slightly yellowish orange and we can actually control the amount of fog that we want by dragging in both of these sliders you know really adding in more and more fog to our scene so if we re-enable our entire image if i start dragging this in you will see we get more and more fog in our scene and if i move this guy over you will see you get less and less what i think works best is to add slightly more and also decrease it a little bit more now we have a nice amount of fog going on and still have quite a bit of control over how this looks and that brings us to the pros and cons for this final method so first pro is it's super fast it just adds about two seconds of render time and if you set up this color ramp and mix note correctly it's just done for you every frame it doesn't take any extra computing power or anything you also get full control of the color of the mist in either case in the compositing tab and you could do even more with it if you were to add in more fancy compositing cons however are it's not true to life it's just the z depth so it has nothing to do with where the light comes in or where things bounce off or if there's actually a volumetric shadows or anything but in the case of a force scene especially seeing a forced scene from inside a forest it really works pretty well so that wraps up the three methods we had so we had first of all the volumetric method which is the most common way but also the most computationally heavy one second we have the image cards which is you know slightly faster than volumetrics but also has less control over everything and third of all we have the missed pass which is super fast compared to the other two but it has even less control and it's less true to life than especially the volumetric version i hope you learned something from this video i hope you enjoyed it and i want to point out that the project file for this video is available on my patreon also if you enjoyed the content please consider becoming a patron it really helps support the channel and helps me keep making these videos i want to thank you for watching and see you in the next one [Music] [Music] you
Info
Channel: Kaizen Tutorials
Views: 58,661
Rating: undefined out of 5
Keywords: blender fog tutorial, blender fog cycles, blender fog eevee, how to create fog in blender, how to create fog in blender 3.0, how to create ground fog in blender, mist blender 3.0, mist blender tutorial, blender mist compositing, blender mist pass compositing, blender mist pass after effects, blender mist pass photoshop, how to create mist in blender
Id: wfnNopmj7EE
Channel Id: undefined
Length: 16min 45sec (1005 seconds)
Published: Tue May 03 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.