Unity 6's New Global Illumination Lighting Features (2024)

We’re thrilled to share more details about the new lighting features coming to Unity 6 later this year.

With the new and robust light baking architecture and the innovative approach to authoring light-probe lit environments using Adaptive Probe Volumes (APV), you'll enjoy a more streamlined light creation process. This will significantly enhance your visuals while ensuring high performance at runtime.

Light your world with global illumination

If you’ve worked with precomputed lighting data before, you’ll know how tedious the process can be. The precomputing process for Lightmaps can take a long time; Lightmap UVs need to be authored, Probes need to be placed for dynamic objects to be lit correctly, and you’ll need to deal with large textures that can place a heavy burden on your applications’ runtime memory.

In Unity 6 we’ve added a new way for you to author higher quality, light-probe lit environments through Adaptive Probe Volumes (APV), and delivered foundational improvements to the light baking backend for greater stability.

Adaptive Probe Volumes

An Adaptive Probe Volume is a group of Light Probes that Unity places automatically based on the geometry density in your Scene, to build baked indirect lighting.

Unity 6's New Global Illumination Lighting Features (1)

Due to its adaptive nature, APV will generate more densely placed probes in areas with more geometry, and fewer probes in areas with less densely placed objects, like the background of a Scene.

Adaptive Probe Volumes also provide you with a complete suite of powerful features for authoring beautifully lit environments.

  • Delivers simpler workflows for probe placement workflows and faster iteration for light-probe-based indirect diffuse lighting.
  • APV per-pixel lighting offers significantly higher quality than Light Probe Groups and provides better directionality compared to Lightmaps, resulting in excellent overall lighting quality.
  • Seamlessly integrates with atmospherics, making effects like Volumetric Fog in HDRP and VFX Graph particles in URP and HDRP beautifully lit by indirect lighting.
  • Enables visually stunning lighting transition through Sky Occlusion and Lighting Scenarios, suitable for achieving time-of day and lights on/off situations.
  • Provides more control over optimizations for runtime performance, based on your use of render pipeline and target hardware.
  • Runs a suite of streaming features, enabling light probe data to be streamed from Disk to CPU, and from the CPU to the GPU.
  • Provides a powerful toolset for reducing light leaking.

Unity 6's New Global Illumination Lighting Features (2)

Here’s how we converted the URP Oasis Scene to use APV

The URP 3D Sample project currently uses the latest 2022 LTS features.

For demonstration purposes in this blog post, we've upgraded the URP 3D Sample scenes from 2022 LTS to Unity 6 Preview and the Adaptive Probe Volumes feature.

Unity 6's New Global Illumination Lighting Features (3)

Placing Probes with Adaptive Probe Volumes

APV is a volume-based system that automates the placement of probes rather than placing them by hand.

The general settings tab for APV lets you control parameters like Min and Max Probe Spacing to drive the creation of multiple subdivision levels based on the surrounding geometry. By default, dense areas will use the highest resolution, while areas with less geometry will use lower density levels. This automatic and adaptive behavior ensures efficient resource allocation, focusing on areas where they are most needed.

Unity 6's New Global Illumination Lighting Features (4)

To automatically generate probes, you can create an Adaptive Probe Volume. While you’re working, you can see live updates, allowing you to preview probe placement without baking. These updates are based on bricks and the subdivision levels you previously defined, which then adjusts according to the proximity of nearby geometry.

Unity 6's New Global Illumination Lighting Features (5)

Generate Lighting

Generate Lighting precomputes all lighting data, including light probes, which you can visualize in your scene. As previewed using bricks, you can see the various subdivision levels that have been applied when placing probes.

Unity 6's New Global Illumination Lighting Features (6)

Addressing light leaking challenges

If you have worked with light probe data, you may be aware of the common challenges with light leaking. When developing APV, we added a whole toolbox to help address light leaking issues, like Virtual Offset, Dilation, Probe Adjustment Volumes, Rendering Layers and Light Leaking Prevention Modes “Performance” and “Quality”.

Here’s an example. Using lighting debug views, we can observe a problematic use case for light leaking. In this situation, the bright light from the exterior is visible through the walls and the ground of the building. Outside sees the opposite problem, with dark lighting leaking from the interior. This is likely due to the low resolution (1 meter between probes) and the thin walls. Let's explore how we can address this.

Unity 6's New Global Illumination Lighting Features (7)

To investigate this issue, the Debug Probe Sampling option allows you to display each of the sampled probes along with their relevant weights. In our case, we can see that the result is interpolated between the bright probes from the outside and the dark ones from the inside. Ideally, the interior of the tent should only sample the interior probes.

Unity 6's New Global Illumination Lighting Features (8)

Rendering Layers for APV (landed in 6000.1f.1) allows you to create up to four different masks and restrict sampling to those specific masks for certain objects. This can be incredibly useful to prevent interior objects from sampling exterior probes, or vice versa.

When generating lighting, the system will automatically assign layers to the probes during the bake process based on the nearby objects, eliminating the need to manually assign layers per probe. Once this is done, you can Generate Lighting and observe that leaking is reduced for the tent, thanks to manually creating separate interior and exterior masks.

Unity 6's New Global Illumination Lighting Features (9)

For even more control over light leaking prevention, you can leverage Unity’s Leak Reduction Modes “Performance” and “Quality.”

Performance Mode addresses leak reduction by shifting the sampling location away from invalid probes. This generally works well in straightforward scenarios, where a suitable sampling location for all valid probes can be identified, while sidestepping any invalid ones. However, depending on the probe configuration, such an optimal sampling location may not be available. This then results in sampling of invalid probes and potential leaks.

Quality Mode (landed in 6000.0.3f1) now enabled by default, employs up to three sampling attempts to help ensure that only valid probes are utilized. This mode may introduce a slight overhead on runtime performance, which can be especially noticeable on lower-end platforms.

You can combine Leak Reduction and Rendering Layers to prevent light leaking even further. This mode helps ensure that invalid probes, whether due to Validity issues or being on a different Layer, are not sampled.

Unity 6's New Global Illumination Lighting Features (10)

Addressing challenges with seams

Additionally, we've improved the multiple subdivision levels by reducing potentially visible seams between different levels (landed in 6000.0.4f1). This is achieved automatically by replacing the values of frontier probes located between two levels with pre-interpolated values. Since this process occurs at bake time, there is no performance cost associated with it at runtime.

Unity 6's New Global Illumination Lighting Features (11)

Achieve more dynamic visual experiences with APV Lighting Transitions

With APV you can achieve visually stunning lighting transition through Sky Occlusion and Lighting Scenarios, suitable for achieving time-of-day and lights on/off situations.

Next you’ll find two examples of lighting transitions, first through Lighting Scenarios with APV in the URP 3D Sample project’s Oasis scene, then through Sky Occlusion with APV in the Garden scene.

Add Lighting Scenarios with APV in the Oasis

APV facilitates various lighting scenarios by enabling switching or blending between baked lighting data. This feature is particularly useful for simulating times of day or toggling between lights being on and off within the same scene or Baking Set.

Lighting scenarios only manage baked APV light probe data; other elements need to be handled manually. To provide an example in the Oasis scene, we created a script to update the sky, lights, fog parameters, and reflection probes. APV baked scenarios can be managed at runtime using the ProbeReferenceVolume API, an example can be found in the documentation.

Unity 6's New Global Illumination Lighting Features (12)

Unity 6's New Global Illumination Lighting Features (13)

Leverage Sky Occlusion with APV in the Garden

Sky occlusion offers an alternative to lighting scenarios for managing lighting transitions in the scene. It involves a simpler setup with just a single bake, where no multiple scenarios are required. Instead, sky occlusion exclusively handles sky lighting and therefore does not extend to managing indirect lighting for directional or punctual lights.

Unity 6's New Global Illumination Lighting Features (14)

Sky occlusion uses additional baked data to manage sky lighting differently, which is separate from standard APV sky baking. This data stores the amount of sky light each area of the scene should receive, allowing for runtime adjustments to sky lighting color and intensity. By utilizing a dynamic ambient probe at runtime alongside this baked and static occlusion data, it provides a good approximation of sky lighting, while enabling dynamic adjustments to scene lighting.

Sky occlusion is supported in both URP and HDRP. In HDRP, the ambient probe is updated automatically from the HDRP Physical Sky. In URP, however, when using the Skybox mode, the ambient probe cannot automatically update in real-time as the sky changes. Instead, this requires manually animating the color using the Gradient or Color mode to match the animated sky visuals, as Unity won't automatically adjust to the changing sky color.

Using the Garden scene as an example, the Gradient Mode in the Environment settings enables manual animation of the ambient probe color. When paired with occlusion data, this setup can create a compelling approximation for animating the sky diffuse lighting, suitable for depicting changing times of day. This utilizes a single bake without multiple lighting scenarios, and can provide a wide range of color variations.

Unity 6's New Global Illumination Lighting Features (15)

More information about APV

Light Baking in Unity 6

With Unity’s New Light Baking Architecture delivered in Unity 6, the GPU Light Baker is now out of preview

Unity 6's New Global Illumination Lighting Features (16)

The new light baker is built with Editor responsiveness and baking speed in mind. This means that when using on-demand baking, Unity now takes a “snapshot” of the Scene state when the Generate button is clicked. Unity no longer checks the Scene state every frame, which previously undermined Editor performance.

This redesigned baking backend has significantly simplified our code base, making it easier and faster to fix bugs, and lowering the risk of introducing new ones.

New baking profile

We’re also providing you with a new baking profile that allows you to choose your appropriate workflow intent.

Unity 6's New Global Illumination Lighting Features (17)

You can choose a range from “lowest memory usage” - ideal if you want to continue working in the Editor and want the best overall Editor responsiveness - to “highest performance” which is useful if you want to get the job done as soon as possible and don’t need to work on anything else in the Editor during baking time.

Auto Generate is now the Interactive GI Debug Preview Mode

Iteratively authoring and troubleshooting baked lighting data is an important use case for creators using baked Global Illumination (GI).

For this reason, we have added a new interactive preview functionality to various GI-related Scene View Draw Modes, replacing Unity’s Auto Generate with a dedicated Interactive GI Debug Preview Mode for previewing lighting data.

Unity 6's New Global Illumination Lighting Features (18)

This allows debug views to be updated interactively as the Scene is modified. The preview is non-destructive, since it does not replace baked lighting data.

Moving away from Unity's old Auto-Generate architecture means that we can optimize the baking pipeline for greater stability.

Enlighten Realtime GI deprecation path notice

Note that Unity 6 is the last supported release for Enlighten Realtime GI. You can find more details on our previously communicated deprecation path in the Update on Global Illumination 2021 forum post.

Learn more about lighting features delivered with Unity 6

Here are links to previous requests for feedback, for the 2023.1, 2023.2 and Unity 6 (2023.3) Beta releases respectively:

  • Global Illumination changes with the 2023.1 beta release
  • Global Illumination changes with the 2023.2 beta release
  • Global Illumination changes with the Unity 6 (2023.3) Beta release

We look forward to seeing your creations leveraging our new lighting features delivered in Unity 6. Please send us feedback in the Global Illumination forum or Unity’s new Discussions space!

Unity 6's New Global Illumination Lighting Features (2024)

FAQs

Unity 6's New Global Illumination Lighting Features? ›

With the new and robust light baking architecture and the innovative approach to authoring light-probe lit environments using Adaptive Probe Volumes (APV), you'll enjoy a more streamlined light creation process. This will significantly enhance your visuals while ensuring high performance at runtime.

How to increase global illumination in Unity? ›

To enable Enlighten Realtime Global Illumination in your Scene, open the Lighting window (menu: Window > Rendering > Lighting) and enable Realtime Global Illumination.

What is global illumination lighting? ›

Global Illumination (GI) is a system that models how light is bounced off of surfaces onto other surfaces (indirect light) rather than being limited to just the light that hits a surface directly from a light source (direct light).

Does unity have global illumination? ›

GI concepts

Unity supports this technique, called Baked GI (also known as Baked Lightmaps), which is named after “the bake” - the process in which the indirect light is precalculated and stored (baked).

How do I change global lighting in unity? ›

Go to Window > Lighting. The Lighting window will appear. Select the Scene tab. Here you can change the value of the “Ambient Intensity” slider.

Is global illumination the same as ray tracing? ›

Unlike ray tracing, global illumination is used to detail the path of indirect light. It can be used to depict color bleeding and the way sunlight bounces around a room. V-ray is a popular global illumination plug-in that is used in many 3D computer graphics software.

How do I add better lighting in unity? ›

Lights can be added to your scene from the GameObject->Light menu. You will choose the light format that you want from the sub-menu that appears. Once a light has been added, you can manipulate it like any other GameObject.

Should I use global illumination? ›

Global illumination can be a powerful tool for creating realistic lighting effects, but it also has some drawbacks. It can be very computationally expensive and time-consuming, as it requires tracing and sampling a large number of light rays for each pixel.

How do you enable baked global illumination in Unity? ›

To make the Enlighten Baked Global Illumination option visible in the user interface, open Edit > Project Settings > Editor. In the Graphics section of the Editor menu, activate the Enable Enlighten for Baked GI (Legacy) setting.

Is Unreal better than Unity? ›

C# (Unity) is more suitable for mobile and web applications, as well as not very heavy desktop products. C++ (Unreal) is great for heavy-weight large-scale projects that require high performance from the hardware. So, when evaluating Unity vs Unreal performance, the latter clearly has an advantage.

What's new in Unity 6? ›

In Unity 6 Preview, you'll find cutting-edge cross-platform features like mixed reality, hand and eye input, and improved visual fidelity. Many of these new features are now integrated into our revamped templates so you can get started more quickly.

What is the difference between baked GI and realtime GI? ›

Baked GI is all precomputed; Realtime GI carries out some precomputation when indirect lighting is used. With both enabled, you then use each individual Light in your Scene to control which GI system it should use (in the Light component, use the Mode setting to do this).

How do I turn off global illumination in unity? ›

Lighting settings

In Unity, the Lighting setting that will usually have the greatest performance impact on your scene is Realtime Global Illumination. You can turn off Global Illumination by going to Window > Rendering > Lighting Settings > Realtime Global Illumination.

How do I change global volume in unity? ›

Configure the global volume for a quality level
  1. Go to Project Settings > Quality and select the quality level.
  2. Go to Rendering > Render Pipeline Asset and open the URP Asset.
  3. In the Inspector window for the URP Asset, go to Volumes.

How to enable baked global illumination in Unity? ›

Using the Enlighten lightmapper

To make the Enlighten Baked Global Illumination option visible in the user interface, open Edit > Project Settings > Editor. In the Graphics section of the Editor menu, activate the Enable Enlighten for Baked GI (Legacy) setting.

How do I change global gravity in unity? ›

You can find it under Edit -> Project Settings -> Physics (or Edit -> Project Settings -> Physics2d for a 2d game). If you want to change the gravity from a script while the game is running, set Physics. gravity to a new Vector3 (For a 2d game: Physics2D. gravity to a new Vector2).

How do I add global light 2D in unity? ›

Create a 2D Light GameObject by going to GameObject > Light > 2D and selecting one of the five available types: Freeform: You can edit the shape of this Light type with a spline editor.

Top Articles
Latest Posts
Article information

Author: Arline Emard IV

Last Updated:

Views: 5969

Rating: 4.1 / 5 (52 voted)

Reviews: 83% of readers found this page helpful

Author information

Name: Arline Emard IV

Birthday: 1996-07-10

Address: 8912 Hintz Shore, West Louie, AZ 69363-0747

Phone: +13454700762376

Job: Administration Technician

Hobby: Paintball, Horseback riding, Cycling, Running, Macrame, Playing musical instruments, Soapmaking

Introduction: My name is Arline Emard IV, I am a cheerful, gorgeous, colorful, joyous, excited, super, inquisitive person who loves writing and wants to share my knowledge and understanding with you.