Creating Fog in Unity’

Renato Figueiredo
2 min readMar 18, 2024

Objective: Learn how to create a Fog in Unity.

I got the asset from Filebase and simply downloaded and imported it into my project. These fogs are what is known as particles.

Filebase Fog to download.

Because the Fog object was not set as HDRP, we are going to change the shader to Sprites -> Default.

Shader for our Smoke material.

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.

Inspector for our Fog.

After doing some small tweaks to the Start Speed and Start Size, we can see the changes to our Fog.

Our Fog in action!

Now we can see that our fog is quite transparent and only covers the part where the our Test Tube is located, giving it a mysterious vibe.

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.

Adding our Fog override to our Global Volume.

We also can’t forget to enable Volumetrics inside our Point Light.

Enabling our Volumetrics.

Now we can just play 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!

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

No responses yet

Write a response