How to Add Fog in Unity

by Michael Sacco Published January 10, 2024
The cover for How to Add Fog in Unity


Fog effects play a crucial role in transforming the atmosphere of a Unity scene, adding realism and depth to the gaming environment.

In this comprehensive guide, we will explore various types of fog available in Unity, ranging from the basic Built-In fog to the advanced Volumetric Fog in both URP (Universal Render Pipeline) and HDRP (High-Definition Render Pipeline).

Additionally, we’ll introduce Buto, a powerful and customizable Volumetric Fog asset for game developers.

Unity Rendering Pipelines and Fog Options

Unity offers three rendering pipelines—Built-In, Universal Render Pipeline (URP), and High-Definition Render Pipeline (HDRP)—each influencing the way fog effects are implemented in your scenes.

Built-In Render Pipeline

  • Fog Support: Basic fog effects based on camera depth.
  • Compatibility: Suitable for projects with modest graphical requirements.
  • Performance: Well-performing on lower-end hardware but lacks some advanced graphical features.

Universal Render Pipeline (URP)

  • Fog Support:
    Compatible with basic fog effects.
  • Advanced Fog:
    URP supports more advanced volumetric fog options like Buto Volumetric Fog and LSPP for enhanced atmosphere.
  • Compatibility:
    Well-suited for mobile devices, VR, and projects with moderate graphical requirements.

High-Definition Render Pipeline (HDRP)

  • Fog Support: Includes Unity Volumetric Fog for realistic atmospheric effects.
  • Visual Fidelity: Designed for high-end visual quality with advanced rendering features.
  • Realism: Ideal for projects targeting high-end platforms with substantial graphical capabilities.

Consider your project’s graphical demands and target platforms when choosing a rendering pipeline.

For basic fog, Built-In and URP are options, but for more advanced and realistic fog effects, HDRP, especially with Unity Volumetric Fog, stands out as the preferred choice.

In URP, Buto Volumetric Fog provides an additional advanced option for developers seeking dynamic and customizable fog effects.

📄 Resources:

Understanding Basic Fog in Unity

The fundamental fog effect in Unity is based on camera depth and can be implemented in two forms: exponential or linear. To activate the basic fog:

  1. Navigate to Window > Rendering > Lightning.
  2. Click on the Environment tab and go to Other Settings.
  3. Check the Fog box.

By following these steps, you successfully incorporate basic fog into your game scene. However, note that this type of fog has limitations, especially in the Universal Render Pipeline (URP).

URP (Universal Render Pipeline) and Basic Fog

The basic fog in Unity is supported in URP, which is a lightweight rendering pipeline. While it serves its purpose, we encourage developers to consider more advanced options, such as Volumetric Fog, to enhance the atmospheric effects in their games.

HDRP (High-Definition Render Pipeline) and Unity Volumetric Fog

For a more sophisticated fog effect, HDRP provides the Unity Volumetric Fog. HDRP is a rendering pipeline designed for high-end platforms and high-quality visuals. To enable Unity Volumetric Fog in HDRP:

  1. Navigate to Graphics in Project Settings.
  2. Click the Edit drop-down.
  3. Create a new HDRPAsset by selecting Create > Rendering > High-Definition Render Pipeline Asset.
  4. Drag and drop the new asset into the Scriptable Render Pipeline field in the Graphics Inspector.

With these settings, you are now ready to add Unity Volumetric Fog to your game project, achieving a more realistic and immersive atmosphere.

How to Add Volumetric Fog to a Scene in Unity HDRP

To include volumetric fog in your scene, follow these steps:

  1. Add a global settings volume by navigating to Sky and Fog Volume in the Volume drop-down under the GameObject tab.
  2. This action creates a new object and settings profile for your scene.
  3. Scroll down to the Fog component and check the Volumetric Fog box.
  4. Adjust the properties such as color and distance to tailor the fog to your specific scenery.

By following these steps, you successfully render Volumetric Fog in your Unity scene.

URP (Universal Render Pipeline) and Buto Volumetric Fog

Screenshot of volumetric fog in a medieval town

If you are working with URP and seeking advanced volumetric fog options, Buto Volumetric Fog comes into play.

Unlike the basic fog, Buto is a dedicated asset for URP, offering dynamic, customizable, and flexible features that elevate your game’s atmosphere.

For game developers in search of a reliable and efficient Volumetric Fog solution, Buto emerges as a top choice. With Buto, you gain access to a wide range of dynamic, customizable, flexible, and advanced features that elevate your game’s atmosphere to unprecedented levels.

Buto is user-friendly, making setup and customization hassle-free.

To integrate Buto Volumetric Fog in URP:

  1. Ensure your project is URP enabled.
  2. Follow the steps to import Buto into your project.
  3. Add Buto to your Volume Override to enable Volumetric Fog in your scene.

Now, your URP project can benefit from the advanced features provided by Buto Volumetric Fog.

📄 Resources:

Free download: Indie Game Marketing Checklist

Download now


lighting and rendering

Don't forget to share this post!

Popular assets for Unity

See all assets ->
    Cutting-edge volumetric fog and volumetric lighting with support for transparent materials.
    Volumetric clouds, day night cycles, dynamic skies, global lighting, weather effects, and planets and moons.
    A lightweight procedural skybox ideal for semi-stylized projects.
    Image-based Outlines for 2D and 3D games with variable line weight, color, and displacement options.
    Drag-and-drop ready-to-use ambient, impact, and spell particle effects.
    Per-pixel gaussian blur on your entire screen, part of the UI, or in-scene objects.

Free Indie Game Marketing Checklist

Learn how to make your game successful with this handy checklist.

Download for free