> For the complete documentation index, see [llms.txt](https://studio-docs.sandbox.game/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://studio-docs.sandbox.game/the-editor/how-to-set-up-fog.md).

# How to set up fog

Add a Fog Node so distant objects fade into haze. This is scene-wide fog: it is not a cloud you place in the world. Position in the Outliner does not matter. If you add a second Fog Node, it replaces the first.

Some projects also place painted fog cards. Those are a different object. This page is the Fog Node.

{% embed url="<https://youtu.be/MqFAN2bPiYE?si=rO8xSeRBD1NObeej>" %}

{% stepper %}
{% step %}

## Open the Add menu

Select the plus button in the Outliner to open the menu for adding content to the scene.
{% endstep %}

{% step %}

## Add a Fog Node

Choose Component, find **Fog Node**, and select it. Its settings appear in the Inspector.

{% hint style="info" %}
*NOTE: New fog is mid-grey and starts close to the camera, so the view can look fully grey. Raise Fog Far or change Fog Color until you can see the scene again.*
{% endhint %}
{% endstep %}

{% step %}

## Choose the fog mode

Open Fog Mode.

* **Linear** — fog starts at Fog Near and is full at Fog Far. Use this when you want a clear distance.
* **Exponential** — fog fills the whole view by density. Use this for even haze.

Those are the only two modes.
{% endstep %}

{% step %}

## Set the fog colour

Adjust Fog Color so the haze matches the lighting: grey for natural mist, a tint for night or stylized light.
{% endstep %}

{% step %}

## Set the linear fog distance

If Fog Mode is Linear, Fog Near is where fade begins and Fog Far is where it is strongest.

{% hint style="info" %}
*TIP: If the fade looks like a hard wall, increase the gap between Fog Near and Fog Far.*
{% endhint %}
{% endstep %}

{% step %}

## Adjust the fog density

If Fog Mode is Exponential, Fog Density controls thickness. Lower it for a light haze. Raise it for thicker fog. Change it in small steps while watching the viewport. Near and Far do not apply in this mode.
{% endstep %}

{% step %}

## Test and reset the effect

Enter Play mode and check the fog from the gameplay camera. Use the reset arrow beside a value to restore its default.
{% endstep %}
{% endstepper %}

{% hint style="info" %}
*TIP: Agents: the class is `ENGINE.FogNode`. Fields are `fogMode` (`linear` / `exponential`), `fogColor`, `fogNear`, `fogFar`, `fogDensity` (0–1).*
{% endhint %}

## What You've Done

The scene fades with distance or density, in a colour that matches the lighting. Next: [How to set up a light](/the-editor/how-to-set-up-a-light.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://studio-docs.sandbox.game/the-editor/how-to-set-up-fog.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
