Atmospheric effects like fog can really add depth to the lighting in a scene. Explore how in this video.
- [Instructor] One way to really improve the look of a project is to add in some atmospheric detail. Let's look at how our directional light works with Unreal Engine Four's powerful volumetric fog system. Now to begin, let's head over to visual effects in our place tab and hover over this exponential height fog. This essentially is a global height actor that we can click and drag into our scene. Now you can see it immediately adds a sort of blue tinge to everything.
Now you can always change that in the details tab under "Fog Inscattering Color." Let's shift this over to something a little bit warmer. Let's say our... A slight red. Gives us a little bit of an early morning feel. Now, this exponential height fog essentially just blankets the entire scene with this sort of haze as you can see. Now there's all kinds of adjustments that we can make to the fall off and the extinction to make this more or less foggy, but a few of the biggest settings that we can adjust are over here in the fog density.
You can see that as I adjust this up and down, it adds more or less fog to this. I want something a little lighter so I'm gonna set this over to, let's say, a .01. Something about half of what the default is. Now it's nice and subtle right now, but it'll get a little bit more interesting in a second. Now if we scrolled down to the volumetric fog section, and just check this box on. You'll notice that it immediately eliminates the fog in the shaded areas.
However, if you make some adjustments to the extinction scale and scattering distribution, then we can make it work nicely with our directional light to give us some really interesting effects. Let's go ahead and set this up a little bit to something like point five and really crank up the extinction scale, just to kind of demonstrate the effects that we're going for. Notice how in the shaded areas, there's no fog. And as we kind of move through it we have these beams that we're creating.
Now let's head back to the world outliner and just type dir for directional light to filter through this. Now one of the first settings we're gonna want to change is up at the top here, under light, where it says indirect lighting intensity. Now let's go ahead and double that. Something a little bit closer to two. And then, we're gonna drop down our volumetric scattering intensity quite a bit. That way we get a nice subtle effect as we move through the scene.
Now, you may have remembered that in the beginning when I explained directional lights, I called out this atmosphere, fog, sunlight checkbox. Now this is really where this starts to shine. Essentially what it does is allow the directional light to illuminate the fog in the distance so we get a much more realistic, kind of washout, for that far off background. Next, we're going to want to drop down the specular scale.
And this'll affect things like these shipping containers over here that are kind of getting washed out by all this fog. So let's drop this down to something like point one. Now they're a little bit clearer, more saturated. So that when we work with things like the light shaft occlusion and bloom, it won't all wash out to white. So now scroll down a little bit further to the light shaft section of the directional light settings. We're gonna turn on light shaft occlusion and light shaft bloom.
And now you can really see the effects we're going for with this. It really seems like a bright sunny day with a nice haze of fog. Something like you would find in early morning. And as you can see, it only takes a few adjustments to our scene to add a whole new level of depth and richness.
- Customizing the Unreal UI
- Creating a new project
- Creating landscapes
- Blocking out levels
- Working with materials and lights
- Adding post-processing effects
- Adding atmospherics, foliage, and fog
- Working with the Blueprint editor
- Creating cinematics
- Monitoring performance
- Packaging a game for distribution