You can enable sky occlusion when you use Adaptive Probe Volumes. Sky occlusion means that when a GameObjectThe fundamental object in Unity scenes, which can represent characters, props, scenery, cameras, waypoints, and more. A GameObject’s functionality is defined by the Components attached to it. More info
See in Glossary samples a color from the sky, Unity dims the color if the light can’t reach the GameObject.
Sky occlusion in Unity uses the sky color from the ambient probe, which updates at runtime. This means you can dynamically light GameObjects as the sky color changes. For example, you can change the sky color from light to dark, to simulate the effect of a day-night cycle.
If you enable sky occlusion, Adaptive Probe Volumes might take longer to bake, and Unity might use more memory at runtime.
When you enable sky occlusion, Unity bakes an additional static sky occlusion value into each probe in an Adaptive Probe Volume. The sky occlusion value is the amount of indirect light the probe receives from the sky, including light that bounced off static GamesObjects.
At runtime, when a static or dynamic GameObject samples an Adaptive Probe Volume probe, Unity approximates the light from the sky using two values:
First, enable the GPU lightmapperA tool in Unity that bakes lightmaps according to the arrangement of lights and geometry in your scene. More info
See in Glossary. Unity doesn’t support sky occlusion if you use Progressive CPU instead.
To enable sky occlusion, follow these steps:
To update the lighting data, you must also bake the Adaptive Probe Volume after you enable or disable sky occlusion.
To update light from the sky at runtime, you must use colors for the ambient lightLight that doesn’t come from any specific direction, and contributes equal light in all directions to the Scene. More info
See in Glossary in your scene, not a skyboxA special type of Material used to represent skies. Usually six-sided. More info
See in Glossary. To use colors, do the following:
To update the light from the sky at runtime, do either of the following:
RenderSettings
API to change the sky colors, for example ambientSkyColor.When an object samples the ambient probe, by default Unity uses the surface normal of the object as the direction to the sky. This direction might not match the direction the light comes from, for example if the object is inside and the sky light bounces off other objects to reach it.
Unity can instead calculate, store, and use an accurate direction from each Adaptive Probe Volume probe, and take bounce lighting into account. This makes sky occlusion more accurate, especially in areas like caves where probes don’t have a direct line of sight to the sky, or when the sky has contrasting colors and the light comes from a specific direction such as through a window.
To enable this feature, in the Adaptive Probe Volumes of the Lighting window, enable Sky Direction.
If you enable Sky Direction, the following applies:
To override the directions Unity uses, use a Probe Adjustment Volume component.