APV - HDRP -- RGB Artefact

Hi all!

After baking some lights with the new version of APV, some strange artifacts appeared (see images). We have some RGB stains in different places. Sometimes they appear in dark environments, and other times in bright light.

There are no other lights than the directional light in this scene, and there are only grey rocks (some extra plants, but they don’t contribute to GI).

Does anyone have a solution or a hint to understand what is going on?

Thanks in advance for any help provided!

Here is some other screenshot :

One way this kind of miscoloring can occur is if your sample counts are too low. The first thing I would try is to increase the indirect sample count in the Lighting Window and rebake. Feel free to post screenshots if this doesn’t help.

First of all thanks for your quick hint !
Do you mean in Lighting > Scene > Lightmapping Settings or in Lighting > Adaptive Probe Volumes > Sky Occlusion Settings ?

Tried first by increasing the settings in the Scene Tab


Seams to fix in some locations. Here are the same locations has in my previous screens

And in some part of the scene it create new issues :



But we’re getting forward so it’s nice. I will continue to test to increased indirect sampling see if it produce better result.

Tried to increase but doesn’t do anything for the locations in the 2 last screenshots

Those last 2 images show outdoors locations, where the probes directly see the sky. For those, you should ensure your environment and direct sample counts are sufficiently. In this case since you just have a directional light, mostly the environment sample count is important.

Indirect sample count → Quality of light being bounced on at least 1 surface, then hitting a probe
Direct sample count → Quality of light going directly from light source (excluding skybox) to probe
Environment sample count → Quality of light going directly from skybox to probe

Try it out, let me know what you find.

That dark green splotch looks like a bug of some kind to me, but lets see how higher environment sample count does first.

You may also want to try toggling on and off the “Importance Sampling” checkbox in the Lighting Window. It changes how contribution from the skybox is gathered. I forgot if it also applies to APV or not

Missed this message.

This one is only relevant if you have sky occlusion enabled, and it only indirectly affects the fidelity of the scene. It shouldn’t cause miscoloring, but if set too low it may cause the light too be too bright or dark overall in some directions.

I was talking about the sample counts in the Lighting Window.

I think this bug has something to do with shadowmask. Try switching bake mode to Baked Indirect. Its bug with APV and shadowmask i guess.

Hi!

Unfortunately, I was already using Baked Indirect. We tried some baking in a simpler environment with Shadowmask, but the results were awful, so we switched to Baked Indirect as it seems to be less buggy.

Anyway, thanks for your help! :slight_smile:

Hi !
So this morning, I was running different tests, and it seems that increasing the direct samples tends to create more buggy probes in some areas. (I switched from 1 problematic probe to 3.) Excluding them with a Probe Adjustment Volume seems to fix this issue.

Adding more samples to the Indirect light, however, is fixing some locations. But as I was checking my environment, some areas are getting worse (see screenshot).

Importance Sampling seems to help with the color patches but doesn’t fix every problem.

Thanks again for your help and quick response !

I can confirm that downgrading the direct sampling from 512 to 256 seems to ‘fix’ the strangest probes. We tested this theory on a different scene and got the same result (same location on the screen, just a different angle).

Those bright spots just look like a bug to me. I’m not sure what has gone wrong there. I’d suggest submitting a bug report with your project or parts of it so we can investigate. I haven’t seen this before, more sample count should never make the result worse

Yes, I will report it.

We tried increasing the sampling for the 3 parameters in another environment, but it doesn’t seem to fix any of the color patches in the scene. It was a pretty interesting lead, but we’re running out of solutions on our side. Do you have any other leads?

It could be an issue on our end, but I have no idea why or how. Do you think it could be a ‘bug’ in the GI calculation? (It might be normal since Unity 6 is still in preview.) Maybe we just have to wait for a newer version of the editor?

We did another test:
We created a new project from scratch with only white cubes in the scene.
When baking, we still observed some color patches. The only differences we noticed were that when we baked GI in Shadowmask, the patches were worse than in Baked Indirect mode. They were still present but very subtle. I don’t know if this helps clarify the issue.

With “patches” you mean sections with very incorrect looking data, right? Not just the overall miscoloring you were showing in the start? I’m afraid I’m running out of ideas. One more thing comes to mind - do you have sky occlusion enabled? If so, try disabling it. You can also try fiddling with the debug visualization modes in the Rendering Debugger, it can be pretty useful for debugging issues with APV. Window > Analysis > Rendering Debugger > Probe Volumes

Other than that, I think I’ll need access to the project to figure out the issue in more detail.

Yes, by ‘patches’ I mean the discoloration at the start — the red, blue, or green zones that appear randomly on the rocks.
Sky occlusion is disabled, and I tried to analyze it with the rendering debugger, but I still can’t figure out why we’re getting these results.

Ok, I’ll see if I can add part of the project or give you access.

Hello!

We’ve been testing a theory. On an old iMac, we tried rebaking a smaller portion of our environment and reducing the indirect, direct, and environment samples. However, this didn’t seem to trigger the random miscoloring patches.

We believe the miscoloring might be related to our graphics card, as we’re getting the error: “Is Within Max Allocation Size.”

In the past, our scene rendering would explode into multiple triangles when we activated tessellation and had Unity and Substance Designer open simultaneously.

Do you think this could be the cause?