Introduction to scene environments
Understand how the sky, fog, shadows, and post-processing effects work together to set the light and mood of a Unity Spark scene.
Read time 2 minutesLast updated 3 hours ago
A scene's environment consists of the sky, fog, shadows, and post-processing effects. Together they set the light and color of the whole scene, so the same level can feel like a sunny morning or a foggy night. You control them all in the Scene Settings window.
Parts of a scene environment
Each part of the environment changes the scene in a different way.
Part | What it does |
|---|---|
| Sky | Sets the backdrop of the scene and lights it. |
| Fog | Adds atmosphere and can hide the edge of a level. |
| Shadows | Adds shadows cast by the scene's main directional light, the sun. |
| Post-processing | Adds a finishing layer on top of the image, such as Bloom or Vignette. |
The settings in the Scene Settings window apply to the current scene.
Sky and scene lighting
The sky isn't only a background. It also lights your objects, so changing from Day to Sunset changes the color of everything in the scene. Ambient controls how much the sky lights your objects, and Reflection controls how much it shows up in shiny surfaces.
You can use one of the built-in skies, import your own panorama image, or generate a sky as a cubemap in the Generate window.
Fog modes
Fog has the following modes:
- Linear fog starts at one set distance and becomes solid at a second, farther distance. It's good for hiding the edge of a level.
- Exponential fog thickens gradually. It's good for mist and atmosphere.
Fog appears most natural when its color matches the sky, for example, warm orange for a sunset or blue-gray for night. New projects start with a light fog already enabled.
Shadow quality and performance
Shadow settings balance sharpness against performance. A shorter shadow distance gives sharper shadows, and a higher resolution is sharper but uses more processing power. Cascades split the shadow distance into levels, so shadows near the camera stay crisp.
Post-processing effects
Post-processing effects change the final image rather than the objects in it. They change the mood of the whole scene at once, for example, with color adjustments.
For information on how to enable effects, and which effects are disabled on low-memory devices, refer to Add post-processing effects.
Environment changes at runtime
If you change an environment setting while the game is running, the change applies immediately but isn't saved. It's lost when you stop the game. To change the environment as part of your game, for example, to darken the sky as night falls, use a script.