Creating Fog in Unity

Alex Frankovic
3 min readFeb 16, 2023

--

Objective: How do we implement our fog into our HDRP scene? How do we adjust the lighting of our fog to give it more of that “mist” look?

For today, we will be following a similar step we took in our Universal Render Pipeline. We are going to implement a fog but this time in the HDRP (High Definition Render Pipeline).

CREATING THE FOG

Just like how we did in the URP, I got the asset from filebase and simply downloaded and imported it into my projects folder. These fogs are what is known as particles. When we drop it into our scene, you’ll notice we get this pink color!

We can adjust this in the inspector by setting the material our fog uses to a default sprite and from there we can adjust the transparency and our coloring of our fog!

After getting the color that best fits the scene, we can adjust the fog’s size and how fast it moves in our scene during real time. We can adjust these factors by playing around with some of the features in our inspector when we select the fog prefab.

Here is how I adjusted my fog to fit the scene:

VOLUMETRIC LIGHTS

The next thing I want to do here is create some source of lighting to generate that “fog” like lighting giving off more of that misty appearance to the scene.

To begin with this, I want to create a point light and then jump into my global volume and add an override. We are going to add a fog and make sure we are enabling some of the features within that fog override.

We also want to make sure our Volumetrics are enabled inside of our point light as well:

From here, it’s a matter of playing around with the intensity of the lighting via the point like or in the post processing stack to bring out the nice fog light to our scene!

--

--