Feedback Request: Global Illumination changes with the 2023.1 beta tech stream

Global Illumination changes with the 2023.1 beta tech stream, we want to hear your feedback (survey is now closed)!

We want to make sure we are providing you with the best products for your day to day experience in Unity. We want to learn from you how you are experiencing the changes related to global illumination which we delivered in the 2023.1 beta release.

This survey is now closed.

What’s changing with the 2023.1 release?
Our focus for the 2023.1 release is to provide you with a more predictable and stable light baking experience through our new light baking architecture LightBaker v1.0, and to improve on the probe volume workflows and scalability for Adaptive Probe Volumes.

New light baking architecture “LightBaker v1.0”
Baked Global Illumination now uses our new LightBaker v1.0 architecture for on-demand bakes. The New Light Baking Architecture impacts the production of most artifacts related to baked lighting: lightmaps, light probes, shadowmasks, ambient occlusion textures, etc. In the new architecture, code is internally split into modules with clear responsibilities and well-defined inputs and outputs. This redesign has significantly simplified our code base. Simpler code makes it easier and faster to fix bugs and it lowers the risk of introducing new ones.

Note that Auto mode still uses the existing progressive baking feature.

For creators working with Baked Global Illumination, Unity’s new light-baking architecture will mean few changes. We have built this new architecture with Editor responsiveness and baking speed in mind. When using on-demand baking, Unity now takes a “snapshot” of the Scene state when the Generate button is clicked. This snapshot is then sent to the bake process and the bake will continue uninterrupted, unless the Cancel button is clicked. Unity no longer checks the Scene state every frame, which previously undermined Editor performance.

Unity also now provides a Baking Profile. This can be found in the Lighting window when using the GPU backend in on-demand mode, and offers users a tradeoff between performance and GPU memory usage.

URP and HDRP - Adaptive Probe Volumes (APV)
With the 2023.1 release, the core functionality and user experience of Adaptive Probe Volumes are improved and are officially supported.

Compelling visual experiences also need to be performant at runtime. Adaptive Probe Volumes move beyond Unity’s existing Light Probe capabilities, providing performant Scene-wide indirect lighting with these main benefits:

  • You can now place Light Probes automatically, with adaptive distribution
  • You can iterate faster as Light Probe density dynamically adapts to Scene geometry
  • Better image quality with APV’s per-pixel lighting as compared to Light Probe Groups
  • Static and dynamic objects are better integrated, as both can be lit using the same system
  • Lower memory usage at runtime for Light Probes, as this data can be streamed from CPU to GPU
  • Baking Sets enable lighting scenario blending for Light Probe-lit objects (HDRP only)


Exterior scene using APV with debug tools showing the grid (this image uses the [HDRP] Abandoned Factory Buildings - Day/Night Scene package from the Unity Asset Store)

Also new with 2023.1 beta is the first release of Adaptive Probe Volumes in URP. Note that this iteration for URP will not support Lighting Scenario Blending nor Lighting Normalization for Reflection Probes and may not yet be optimal for performance, especially when running on lower-end mobile platforms.


Find the feedback request for the 2023.2 global illumination changes here .

8 Likes

Hi,

glad to hear it. In my experience, and for me, lightmapping in unity has been very painful that I simply gave up on it. I fix one issue, another comes up, it feels endless.

I want to talk about the probe volume though, APV is great, but I feel it’s potential has been left and forgotten.
In its current state it reminds me of lightmapping, countless issues that never end. Hacky solutions (like it’s anti light leaking) that cause issues while fixing others. Same thing with dilation, it can sometimes cause light leaks, but you need it for other areas to fix things up.

I’ve used APV so much that I memorized every parameter it has and it’s debugger. Using too much view bias can leads to issues, but sometimes you have no choice. Same thing with normal bias.

Most of all it struggles with interiors, dark areas, dim lit rooms, thin objects, weirdly shaped objects, the list goes on.
Unity’s demo had a lot of windows, open areas for outside lighting to come in and it was very bright. This masked all the issues with APV.

Take this for example,

This is lit entirely with APV, everything receives and contributes probe lighting. It looks great, but this is because there is so much lighting that all issues are masked by the amount of indirect lighting going around.

In a real scene, with rooms, interiors, or just dark exterior areas, this is what you can expect from APV:


(This used a very extreme amount of probes & samples)

Note this picture is using view-bias to the extreme, otherwise the light leaking is much worse. But since view bias is camera based, while moving lights will move, leaking will come and go, it’s not something you can really use to extreme amounts other than still images.

Then there’s the sample issues, APV struggles more the darker an area is, this one isn’t even that dark. There’s still a ton of indirect light coming from the doors. (And a lot of light leaking on the walls but the camera angle hides it).
The more probes you have, the more samples you need. In my testing even with a crazy probe density, and tons of samples (so much it took over 500mb of disk space for a tiny room), the issues were still there. Light leaking In particular.

Another example:


This isn’t a closed off interior, it’s just a building out in the open, but as you can see there’s a lot of light leaking.
APV struggles with thin walls/roofs and in general anything thin, you can see it’s also leaking from the terrain on the ground which is set to APV lighting.

Let’s use some probe touchup volumes to give the walls artificial thickness:

Much better, but still light leaking in the roof at the right, and on the wall in front. And just for this small areas I needed to use multiple touchup volumes. Much of the light leaking is reduced by SSAO or hidden by gizmos, to see it better check this image: Image with gizmos off and no SSAO

Test done in latest 2023.1.beta:
probe density 1, 30k env samples, 2k indirect samples. I also tested with 0.3 probe density.

You can see in the following picture, the wall is using probes inside geometry to light itself, causing strong light leaking. I’m using both dilation & virtual offset, but virtual offset fails to detect some probes. It also often pushes probes inside of geometry, and not out.
(The highlighted probes are the ones being used by the pixel I selected)

You can see in the next picture virtual offset doesn’t detect the probes inside the wall here at all, and leaves them be:

The worst part is all this leaking isn’t just for static objects, it’s for everything - dynamic or static - contribute gi on or off, if your character walks next to this wall, it will receive light leaking.

For example, the exact same scene as the above, check this cube that only receives probe lighting, doesn’t contribute:

Half of the cube is lit unrealistically, light leaking, and this is with touchup volumes.

there’s also the sampling noise, which is very noticeable without TAA. The cubes look more noticeable as they have no textures, which isn’t a realistic use case.
Sometimes even with TAA enabled, and animated sampling noise enabled, you can still notice it.

I’m jaded with GI in unity, I was hoping APV would be my way out of using unity’s lightmapper for regular baking, but I just moved to a different tool with the same unending issues.

I even tested it for just dynamic chars, and the light leaking was still very noticeable - so it’s not just an issue for people trying to use APV as a full static lighting replacement.

I have much more to say, but for my sanity, and your sanity, I will stop here. I doubt anyone will read this post in its entirety anyways, nor will it change anything, maybe I’m writing this to myself more than others. A wake-up call of some sorts, who knows :slight_smile:

15 Likes

Also put this in the survey, but would love to see a way to bake 1 scene into chunks. Now I have to break it up in multiple scenes.
Example:
Have both interior and exterior elements in a scene. I would like to use different baking settings for both, which would require multiple scenes now.
The new system looks cool btw, might try it out later

I tried baking a scene using an environment from asset store. It predictably produced artefacts all over the place. The culprit is ofcourse ‘UV overlap’. After checking the UV overlap debug view I just gave up lol RED.

Then I tried APV. I like APV a lot even though there are many light leaks. In most environments where light leaking could be mitigated by whatever means the GI team provides (view bias mostly), it works amazingly well both perf wise and authoring wise. It’s WAY WAY better than having to pull my hair fixing uv overlap for sure.

Combining APV with half resolution SSGI enhanced the result even further. Hopefully they are as capable on 2022 as we cannot risk upgrading our project beyond that version(and it’s likely to take around a year to be stable anyway given Unity track record)

1 Like

This is why I put my hopes on APV, it fixes many of the issues that come with lightmapping.
But other than exteriors, APV will struggle. Especially in dim closed off interiors.

SSGI is not a good idea due to fixed thickness, so if you have grass/small objects in your scene, SSGI will make them very noisy and dark, unrealistically so. If you don’t have any of these two in your project, it can work very well with APV, much better contact shadows (AO) compared to SSAO. SSGI can also cause excessive shimmering for vegetation, especially when not running at full res.

Improving SSGI, focused on its the use case alongside APV could be interesting (improving performance, less reliant on excessive blur, depth aware thickness to work well with small objects).

1 Like

My hope is with H-trace 2.0 currently

With the AVP window you can set up your groups on a scene by scene (singular or multi), then within each scene you can create multiple Probe volume game objects, you could potentially break this down into finer details each pass. IIRC similar to Reflection probes’ smaller wins priority so you could set your internals smaller as independent probe volume game object to say a scene scaled one which would then have the lower priority for that specific area

1 Like

Oh cool!
Also saw something about multiple lighting senarios with bakes in the GDC events from Unity which looked very promising

Yeah, for times of day, absolutely essential. Baking in certain times of day for your lighting set ups to stack multiple APV and then interpolate between them is an amazing step forward for the team.

1 Like

I’m genuinely curious about how would these be fixed, at a code level? What’s the solution for all of these problems? Do the solutions even exists, i.e. is there a reason to be optimistic about the future of APV?

Try setting the ssgi ray steps to zero and play around only with the ssgi denoiser as per your needs and performance(i generally set the denoiser radius to 1 for maximum quality), see if it helps in reducing the ugly effects on vegetation and light leaking of apv.

I already did that. If you set it low enough to avoid all the issues on vegetation, it loses all AO/contact shadows, or most of it. At that point you’re better off with SSAO.

For light leaking, it helps with APV due to the excessive blurring its denoisers do, there’s no special way it helps other than that. The AO from SSGI could also help hide it, similar to SSAO I suppose.

unity can implement visibility check to solve the light leaking issue

We also recently shared more details about APV at GDC 2023:

5 Likes

Thanks for the link. In the video I can see he’s updating probe validity with touchup volumes without baking, this is great and a big-time saver, I haven’t noticed it in recent versions so assuming it’s coming soon :smile:

1 Like

One slide claims that APV brings improved integration with volumetric lights, then the speaker doesn’t elaborate on what it means.

Could anyone clarify what that “improved integration” means? Is it something like:

  • Possibility to bake indirect volumetric fog
  • Possibility to light volumetric fog made with the component “Local volumetric fog” without using real-time or mixed lights?
  • Possibility to lit volumetric particles / volumetric shader volume without using real-time or mixed lights?

Or something entirely different?

Since APVs can be sampled and interpolated per-pixel on the GPU, volumetric effects can sample from them and be affected by baked lighting.

1 Like

APV looks a lot like Call of Duty’s light probe technique, but it’s missing a crucial component to fight against light leaking: a means of determining visibility information. CoD does it by baking variance shadow maps for each probe and sampling them to determine a probe’s visibility from the shaded pixel. It’s not perfect, of course, but removes a lot of low-hanging light leaks.

3 Likes

This survey is now closed. Thanks all that contributed to providing us with feedback and signing up for user testing APV.

3 Likes

Can someone tell me how to use the API in a standard unity project, and what kind of rendering pipeline is needed, I have no idea, I installed unity 2023.2.0a17, HOW to enable the API???

I tried all possible rendering pipelines but I couldn’t turn it on API.:frowning: