Creating Fog in Unity

Today I wanted to add fog to the scene using HDRP!

The objective for today is to add fog to my scene! This is how my scene looks without fog:

In my Global Volume, I added Fog to the list of effects.

I enabled the fog and right away we can see a slight difference. Next, I enabled Fog Attenuation Distance and set the value to 70.

You can now see that the shadows have lightened up a bit. I am going for a moody scene, so I don’t want to overdo it either.

Playing around with the Base Height and Max Height properties gives a nice fade effect. I want the base to be where it is, and the maximum height down to 28. I then set the attenuation to 50. I like how it seems as if the light is bouncing off from the ground and not reaching the ceiling. The image below shows the subtle change of the fog.

I could also play around with the volumetric fog. Although, it seems like Unity can only handle either one, a regular fog, or volumetric fog. So let's turn on the volumetric fog!

For it to work, I had to make sure my light sources had Volumetric enabled.

Once enabled, the light source will cast volumetric fog!

I can of course mess with the multiplier to make the volume less, or denser than what it is.

As cool as it looks, I think I will stick with the regular fog!




Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store