Hi,
Trying to setup day night cycle with 4 scenarios. In my case I just quickly blend from one to another over 5 frames.
Setup:
var probeRefVolume = ProbeReferenceVolume.instance;
scenarioBlendFactor = 0.2f;
probeRefVolume.BlendLightingScenario(scenario, scenarioBlendFactor);
Debug.Log($"{probeRefVolume.lightingScenario} => {probeRefVolume.otherScenario}");
Each next frame:
if (scenarioBlendFactor > 0f)
{
scenarioBlendFactor += 0.2f;
var probeRefVolume = ProbeReferenceVolume.instance;
probeRefVolume.BlendLightingScenario(scenario, scenarioBlendFactor);
if (scenarioBlendFactor > 1f)
{
scenarioBlendFactor = 0;
probeRefVolume.lightingScenario = scenario;
}
}
Problem is that sometimes the probes are loaded incorrectly. Wrong scenario? Mixed scenarios? Some probes from different one? It’s very visible during night, when it seems to use probes from day.
I start each game with different scenario, also the game (or editor) remembers last used scenario. It seems these combinations have effect on the bug. Sometimes it runs correctly, sometimes not. When the game loads incorrectly it stays corrupted, swapping scenarios doesn’t help.
I load my scene additively with another (no APVs) and try to setup APV explicitly (but doesn’t help)
var probeRefVolume = ProbeReferenceVolume.instance;
probeRefVolume.SetActiveScene(worldBuilder.gameObject.scene);
probeRefVolume.lightingScenario = scenario;
also tried to blend scenarios instead directly setting it.
Tried GPU streaming, no effect, so I turned it off.
Scenarios are baked with “Probe positions don’t recalculate”
Thanks for any help
HDRP 17.0.3, Unity 6.0.31