Adaptive Probe Volumes (APVs) experimental release for HDRP in 2021.2

The baking itself is fine, but when it gets to FinalizeCells, it spams these to console:

Compute is used in a few places during baking, mainly for calculating Virtual Offset, Rendering Layer Masks and Sky Occlusion. If you enable full call stacks, do you see where the error is coming from? And could you try without either of those features enabled (Disable in lighting window)

Something very like this was fixed a while ago by batching compute jobs into smaller dispatches. Which (exact) Unity version are you on?

1 Like

Oh, I didn’t know you could enable a more detailed stack trace!

Turns out I’m getting these errors only from EncodeShadingDirection:

With Sky Occlusion disabled, there are no errors. The volume is still only partly written with small probe separation.

Good question, I was testing on Unity 6000.0.10f, which is too old at this point (time flies!)

Updating to the latest (6000.0.28f1), I can see the exact same errors, as they’re CoreRP-related. CoreRP and URP are at 17.0.3. It doesn’t seem I can update them further.

Turns out I’m getting these errors only from EncodeShadingDirection:

Hmm I see, looks like whoever made the fix for Virtual Offset and Rendering Layer Mask neglected to do the same change for Sky Occlusion baking.

Updating to the latest (6000.0.28f1), I can see the exact same errors, as they’re CoreRP-related. CoreRP and URP are at 17.0.3. It doesn’t seem I can update them further.

Just FYI, core packages (like URP) are bound to editor versions. They sometimes change without the version number being bumped. The package manager should still use the correct version. You can find them in the editor install folder in Editor/Data/Resources/PackageManager/BuiltInPackages

1 Like

Actually, I may have spoke to soon… glancing at that code again, I don’t immediately see the issue… Let me see if I can repro it. As for this:

The volume is still only partly written with small probe separation.

It would great if you could submit a bug report. Perhaps the project you are testing with is suitable?

Here is an example project: debugAPV.zip - Google Drive

It’s just Sponza and one APV. Click Generate or Clear baked data and then Generate.

It’s only partially baked:

And, as I noticed, the same thing happens even you override the LightingBaker and supply correct custom data.

I think we need better Reflection Probes for this to work well for HDRP. Or maybe a way for SSGI to transition on/off smoothly for when indoors.

No SSGI means it’s too blocky, but SSGI creates hard cuts on the edge of Reflection Probes.

I remember a demo of a custom shaped volume from a year ago.

I finally had a moment to look at your repro.

I was able to reproduce it, but its expected behavior. With APV, you set the runtime VRAM budget up-front. What is happening here is that the entire memory budget is being used. When this happens, the behavior depends on your choice streaming setting.

With no streaming => No more data will be loaded. You only get whatever was loaded into VRAM first. (The case in this scene)
With GPU streaming enabled => Data will be unloaded and loaded from VRAM as you move the camera around, prioritizing nearby data.
With Disk streaming enabled => Same as with GPU streaming, but the data will additionally be unloaded/loaded from CPU memory.

You can change these settings in the SRP asset:

With your scene set to memory budget = medium:

Set to high:

I admit this isn’t super intuitive. I recently added a warning to give you some kind of indication this is happening, but it isn’t on older editor versions. Don’t remember exactly when it landed:
image

1 Like

You can use the rendering debugger to visualize this kind of thing. If you enable display cells, you’ll see the cells that couldn’t be loaded into VRAM marked with red:

1 Like

Ah… I see. Didn’t realize that. So the baked data is correct, it’s just I can’t see it all at once? Got it, no problem then. Having a clear console warning would definitely help, yes.