Feedback request: Global Illumination changes with the Unity 6 Beta (2023.3) release

Global Illumination changes with the Unity 6 Beta (2023.3) release, we want to hear your feedback!

Hi all, following on from our request for feedback with the previous tech release, we now want to hear about your experience using the changes to global illumination we delivered with the Unity 6 Beta release. We do this so that we can make sure we are providing you with the best products for your day to day experience in Unity.

If you have experience with using the global illumination changes delivered with the Unity 6 Beta (2023.3) release, please help complete the survey linked below (extended until May 31st, 2024):

Feedback request survey: Global Illumination changes with the Unity 6 Beta (2023.3) release

Whatā€™s changing with the Unity 6 Beta (2023.3) release?

Unityā€™s Light Baker

C# Light Probe Baking API
With Unity 6 we introduce a new API for baking Light Probes. Baking no longer relies on the Lightmapping delegates, where the user gets callbacks during the baking process. Instead, the process is very explicit and free of side effects, for example enabling the user to control how many probes to bake at a time to balance execution time vs memory usage.

We use the APV probe baking editor code as the example for how to use the API, find this example here on github.

Documentation is available now: RadeonRaysContext, RadeonRaysProbeIntegrator and RadeonRaysProbePostProcessor.

Note that this API is only available for Light Probes. Other lighting data like Lightmap support is planned for a future release.

Adaptive Probe Volumes

Bake only Probe Volumes
Baking lighting data can take a long time, especially when including lightmap data in the build process. With this feature, we have enabled you to bake only Probe Volume data, significantly improving iteration time. This feature uses the first version of our new public C# Light Probe Baking API mentioned above.


In the Adaptive Probe Volumes Tab, you can choose to only update Probe Volumes using the Generate Lighting dropdown menu

Baking many probes uses less memory
In the past, baking large Adaptive Probe Volumes with many probes has been problematic, and canceling bakes in this use case could take many minutes. This was mainly due to too many probes being baked in a single batch, which would cause memory to spike.

With this improvement, we are able to lower memory consumption when baking many probes, and stopping the bake process is now much more responsive.

Virtual Offset now uses Unityā€™s new internal Ray Intersector API
Adaptive Probe Volumes now use Unityā€™s new Ray Intersector API to perform Virtual Offset calculations when baking probes. This replaces a temporary implementation which used a physics collider workaround for offsetting invalid probes embedded in meshes.

These improvements result in a considerably simpler authoring workflow, with much faster lighting data generation.

APV Sky Occlusion
With this feature, we enable creators to apply a dynamic time of day lighting scenario to their virtual environments. You can now manually change or you can script (i.e. Shader Graph, Timeline) sky settings and see Light Probe-lit indirect lighting from the sky update in real-time.

In HDRP we have enabled sky color to be sampled dynamically from the sky.

In URP, ambient probe real-time updates is not yet supported. However, sky color can be animated (scripted). Our recommended min-spec device range is GLES 3.2 and above.


Using Sky Occlusion can achieve more color variations of static indirect lighting from the sky as compared to APV scenario blending.

URP: Blend Lighting Scenarios
Baked lighting is inherently static and limits the ways in which creators are able to build more interesting, dynamic experiences like time of day, or on/off lighting scenarios.

Now at feature parity with HDRP, with ā€œBlend Lighting Scenariosā€, you have the ability to bake individual probe volumes lighting scenarios to be used in your virtual environments, and blend between them at runtime using scripting.

This way there is no need to duplicate the scenes to store multiple probe volumes bake results and one can easily swap the baked lighting data for day/night transition or switching lights on and off in a room. For developers, it can also be very useful to compare multiple baked results and iterate more quickly. Our recommended min-spec is GLES 3.2 and above.


Multiple lighting scenarios can be baked then blended at runtime. This only applies to probe volumes data, other elements like lightmaps, lights position or intensity need to be handled manually.

APV is now supported with AssetBundles / Addressables
Previously, APV has not been compatible with AssetBundles / Addressables. With this release, APV will now support the AssetBundles / Addressables workflow, however at the expense of Disk Streaming.

Note that one drawback of this option is that itā€™s now impossible to partially load APV data in memory since they are regular assets. This means that in multiple scene setups, the memory footprint is that of the full baking set instead of just the loaded scenes.


This new optional code path can be enabled in the Graphics Global Settings in the new Probe Volume tab.

APV disk streaming now supports a non-compute path in URP
Disk and GPU streaming is now supported with all platformed that run Adaptive probes volumes.

Probe Adjustment Volumes
Probe Adjustment Volumes are an important tool at the artistā€™s disposal when fixing-up problem situations in probe-based lighting setups. In Unity 6, we have made some usability changes to improve lighting quality, ease-of-use and increase iteration speeds.

Probe Adjustment Volumes: Workflows
Automatic isolation of probes is a new feature, enabled by default when placing Adjustment Volumes. Now, probes which are not affected by the Adjustment Volume can be hidden when placing and sizing the volume. This should make it easier to see what you are affecting when working in crowded Scenes.


Automatic isolation of probes is a new feature, enabled by default when placing Adjustment Volumes.

Further to this, probe lighting data can now be baked directly from the Probe Volume and Probe Adjustment Volume components. This is a convenience allowing faster iteration and the ability to generate probe lighting data without needing to also compute expensive lightmap data.

When placing Probe Adjustment Volumes, it is now possible to quickly preview your changes by using the ā€œPreview Probe Adjustmentsā€ feature directly from the component. Iterating to find just the right setup should be much easier!

Probe Adjustment Volumes: Override Sample Counts
The new ā€œOverride Sample Countsā€ mode available for Probe Adjustment Volumes in Unity 6 provides users with precise control over how baking time and quality is distributed throughout the Scene. Now problem areas with noisy probes can be easily fixed-up by locally increasing sampling. This allows areas with challenging lighting conditions - such as deep interiors - to be quickly improved, especially when using the new preview features described above!


With Probe Adjustment Volumes itā€™s possible to override the number of samples for a specific area

Reduced light leaking through limiting noise
When using multiple subdivision levels, one can use sampling noise to hide the visible seams. However, in interiors this would often cause light leaking issues because the noise could easily push the sampling position through a wall, resulting in overly bright or dark pixels.

This improvement limits the direction of the noise in a cone toward the camera, considerably reducing the risk of light leaking when using sampling noise in complex environments.


The amount of noise remains the same, but when the noise is directed in a cone towards the camera, there is significantly less leaking

Known Limitations
Adaptive Probe Volumes in URP do not support lighting normalization for reflection probes.

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 .

More information about the previous 2023.x/Unity 6 Beta (2023.3) releases
Here are links to previous requests for feedback, for the 2023.1 and 2023.2 tech stream respectively:

6 Likes

I downloaded unity 6 to test APV again, posted a lot in official APV threads in 2021 version until early 2023 releases.

Still tons of leaks, especially due to dilation from my testing in this version.

Interior with exterior lighting.
With and without sky occlusion. Sky occlusion seems to cause weird light leaks with dilation, default sky samples. Tested high and low indirect/env samples.

Frankly, I was planning on doing an extensive test and feedback, but the often slow downs, ā€˜holdā€¦ā€™ and eventually crashing while baking a very simple GI test scene made me give up. I canā€™t dedicate as much time as I used to, especially since I donā€™t enjoy it as much anymore.

And from the looks of it all my posts in APV benefitted no one and were not heard.
Not that they have to, just no point for myself.

I expected vastly improved anti-leaking, but doesnā€™t seem like it. I did my tests with thick objects, I canā€™t imagine what the experience will be for people with planes and a large scene. Maybe the goal solution is adjustment volumes everywhere and a lot of manual work.

Admittedly, I did not test the new features in adjustment volumes. Nor did I use them since I ended it early.

Was baking APV only.

Everything I said in previous threads still applies, some less so (leaking due to sampling noise) reduced, but still happens.

Leaking in interior areas with lighting from exterior (dir light), is where APV biggest weakness is.

The more indirect light there is in an interior (and generally), the more itā€™ll hide all the leaking issues.

5 Likes

Yep, that is my impression as well, although in fairness I only played with APV a little bit.

But.

As a lightmap replacement it leaks too much to be used.

As a light probe replacement, it solves the annoying authoring the old system had, but it doesnā€™t solve leaking, which was also a pain point in the old system. And to mitigate it you need to manually author some stuff (why isnā€™t this automatic? surely you can detect when something is inside geometry?), which take most of the benefit of the system away since the workflow becomes annoying again AND the issue still isnā€™t solved.

It would be one thing if the system was fully dynamic, then I could potentially accept these shortcomings for the benefit of having some sort of precomputed dynamic GI, but since that feature isnā€™t hereā€¦ I canā€™t say Iā€™m excited at all to use APV.

1 Like

Same as the above post tbh. I gave apv so many chances but itā€™s always disappointing with light leaking everywhere.

Unity continue to push it like we should use it. Like common. All these fancy features, streaming, addressable, etc donā€™t solve the main underlying issue of this solution.

FIX THE LIGHT LEAK.

1 Like

I agree with above. Also, the general appearance offered by the probe volumes is not good. Noise is pretty obvious, even with high sampling rates. This is a massive disappointment, IMHO, and I am not sure what exactly this solves in its current state. In a lot of ways, it is worse. Painful to use.

Also, from the OP, in what world would this noise level in lighting be acceptable?? The lighting looks cheap and just plain bad. Def does not look like ā€œnew techā€.
Again, since Unity has never made a game (and likely never will), these types of things will never be solved. So long Unity. You could have been so much moreā€¦

This should be a gif with before/after but itā€™s static image for some reason. You can see it here at the bottom https://portal.productboard.com/unity/1-unity-platform-rendering-visual-effects/c/2557-apv-improvements-and-changes-2023-3-unity-6-preview

1 Like

As usual, some new things some dysfunctional or bad things.

Whoever thought it is OK to carry all the baked scenes lighting data in memory with APV clearly was not thinking very clearly.

Light leakingā€¦ how is this acceptable after so many years?

Thanks for making even lightmapping more complicated. :stuck_out_tongue:

Request: Bring back the processing speed measurment.
It helps benchmarking for optimization purposes.

My experience with new version in three acts

Okay, jokes aside APV has been significantly improved, HOWEVER itā€™s not reached the final point yet, light leaks in the corners still there and no such thing that could fix it, as well as random bitchy light splotches that completely ignores adjustment volumes.
Adjustment volumes have been improved SIGNIFICANTLY, I actually jumped like a kid when light leaks were removed in a snap of finger, but on the other side of room, somehow APVs again ignored adjustment probes showing light leaks along the corners.

Sky Occlusion is broken, completely. When I turned it on and baked the light all I saw is huge light splotches, and that it.

APVs needs finish touches, so adjustment volumes could control it in 100% of cases not 50/50 (Well, before it was 0 (zero) chance of fixing light leaks with adjustment volumes)

Here before/after 2023 vs 6000

I personally donā€™t mind placing it manually as long as it works consistently.

Honestly, no idea why sky occlusion exists if Dynamic APVs in works, but in any case this solution shouldnā€™t be static, we need dynamics, to maintain time of day or a flashlight in dark environment.

P.S. The guy that came up with idea of showing probes inside adjustment volume deserves a raise, truly QoL feature.

4 Likes

So after quite a bit of heavy testing, I fired up almost all my old scenes, and results are somewhat promising!

Before I will spam screenshots, huge warning to new users! (or like me who cluelessly tried all options, but got bad results in the past)

Before you will make any bakes, make sure to setup same global volume in environment tab, as your main one! It will match skybox colors and ambient color!

9711856--1387732--Screenshot_44.png

Itā€™s perfectly hidden and never tells you about it, first sign is pitch black shadows, after bake you will get something like this:

So I played a lot, and must say it actually feels like solid feature right now, I field tested different scenarios with various wall thickness, but even with one pixel wall width, itā€™s actually trying to sample something more or less appropriate.
In some cases you can fix it with adjustment volume, I found that minimum width is 0.5, if itā€™s less, you can save it with adjustment volumes, but not 100% guaranteed.

Light leaks are not annoying as it used to be, in most cases everything fine and small patches or tiny dots can be easily fixed with adequate amount of view bias and normal bias (works as intended woah)

This room had pixel thin walls, so obviously I couldnā€™t fix light leaks along the corners, but after some edits in blender, no complaints here.

So I thought, itā€™s too good to be true, maybe dimly lit environment could be more challenging with pixel sized walls?

Obviously, Iā€™m not going to waste time adding thickness to all these walls, but such results with pixel thin walls are quite solid imo.

I couldnā€™t spot random splotches like it was before in such environments, but Iā€™d be glad to see more scenes

4 Likes

You got me excited. So I tried APV again. I have to say that the new probe adjustment UX is indeed very nice improvement. But there are still some problems with it currently, there is no clear preview-bake button. And the memory usage stacks up higher and higher until you press global bake.

As for light leaking, aligning walls to APV grid + adjustment is good now.
9713956--1388257--NVIDIA_Share_ekW2jhWXQD.png

But my problem have always been wall that is not aligned with APV grid like this

9713956--1387891--NVIDIA_Share_cqONnqnXAD.png

The problem is with these jagged lights here which is impossible to fix with adjustment volume.

9713956--1387894--NVIDIA_Share_gv7ecfRyEa.png

The only real solution is to reduce min spacing to something like 0.5. It makes these jagged lights smaller so it hide inside the wall mostly. **but like, Iā€™m not sure if this is a sane value. The probes are so dense in debug view.

9713956--1388260--PkcoqNOjUw.png

What is linked is rather involved, is there a simpler example than this? Ideally Iā€™m looking for a way to call bake in the same way as its done using the editor inspector button(ie I dont want to mess around with changing settings) on the AdaptiveProbeVolume component, to use in batchmode in CI.
What Iā€™ve found is calling that same method through reflection doesnā€™t yield the same results vs calling it in editor and making a manual build.

In my case, 0.5 was more than enough in many cases + normal bias and view bias tweaks, but not aligned thingy is kinda new for me, worth to show off here for devs.

But yeah those diagonal placement is worrying

Have any of you tried the URP samples project? Iā€™m wondering how they deal with any light leaking in the Japanese garden scene.

Just tried it, URP sample project uses light mapping.
I copy the scenes and change it to APV.

There is no unfixable light leak in the garden scene. everything is lined up nicely. (Baked at 0.5m spacing, no dilation, use half the memory compared to lightmap)

There is this part in the oasis scene where I canā€™t fix it with probe adjustment volume. (Baked at 1m spacing, no dilation)

9728212--1390852--NVIDIA_Share_W9DMk4EQEA.png

In this case, I donā€™t bother fixing it with APV because light leak on the unplayable area anyway. So I just change this problematic wood mesh to receive gi from Lightmap instead.
9728212--1390855--NVIDIA_Share_UaFub4H5Xc.png

The oasis have some light leaks if you are near the wall and look along with it (due to view bias limitation).
9728212--1390861--upload_2024-3-26_22-35-39.png
More dense probe & adjustment volume should help reduce this particular leak but at some point, you have to accept the limitation. the tent sheet is super thin. there is no way around that.

2 Likes

Most unity templates using APV are bright inside, thus most light leaking is hidden.
As I mentioned previously, bright interiors and in general a large amount of indirect lighting will always hide the issue.

The real challenge is in dark interiors with bright exteriors, where the interior is lit by for example the sun outside.
See this old but in depth post for more details: https://discussions.unity.com/t/912216/2

Although old, most of the issues remain the same. The only difference is changed virtual offset, and less (but still very much there) leaking from sampling noise.

1 Like

Do you mind sharing the test scene or which asset you use so I can mess around with it?

itā€™s a custom scene I donā€™t have the project on PC but the assets were from the asset store, forgot the name unfortunately.

Pardon my ignoranceā€¦ Unigine has this ā€œVoxel probe light**ā€** where you donā€™t even need UV maps and you can bake the light for a single object if you want, instead of the whole sceneā€¦ Isnā€™t this something like that? isnā€™t this precomputed? canā€™t you bake a small section of probes with independent samples to avoid those leaking and noise? really sorry if this sounds dumb that is what i understood on the infoā€¦

This is an oversimplification and probably flat out wrong, but from a user perspective, APV is pretty much lightprobes + a version of the old LPPV system (where light probes are sampled per pixel or per vertex as opposed to just per object), but placement is forced to always be a 3d grid and you generally just control the density.

So since they are a grid, you will inevitably have a probe that is inside a building and the next probe is outside the building. In between them it is interpolating from dark interior to super light exterior. Itā€™s doing some things to mitigate this, and there is one tool they give you to manually try to stop some leaks, but they are not enough.

The baking doesnā€™t need UVs (it is literally just a bunch of lightprobes) and Iā€™m not sure if you can render a small sub-section (I think not), but baking them is generally pretty fast so I donā€™t think it is necessary.

1 Like