Volumetric Lightmap loading & removal during sublevel streaming

Edit: After some testing, it seems like this is not an issue with removing VLM. I tried commenting out all the code that removes it and the issue is still happening.

Hello,

I’m running into an issue where during level streaming, the VLM (light probes) in the sublevels are getting incorrectly unloaded from the previous level unloading.

Here’s an example Illustrate the Issue:

Level A - 3D menu scene with VLM A

Level B - New Level we’re trying to load, with VLM B

Level C - level instance contained within Level B, does NOT contain VLM

What we’re observing is that Level B & C would load with their VLM B, but when Level A unloads and tries to clear VLM A, it destructs the loaded VLM B. This is seems to be happening because

ENGINE_API void FPrecomputedVolumetricLightmapData::AddToSceneData(FPrecomputedVolumetricLightmapData* SceneData)and

ENGINE_API void FPrecomputedVolumetricLightmapData::RemoveFromSceneData(FPrecomputedVolumetricLightmapData* SceneData, int32 PersistentLevelBrickDataBaseOffset)are loading by volume instead of by what VLM belongs to which level. Thus it’s essentially removing a cube of data from the already loaded levels. In the tests I’ve done it’s not exactly clear if it’s a stomping behavior or a removal.

I see several issues posted previously detailing the same issue, specifically around the interaction around sublevel streaming. Does Epic have any way to mitigate this? A lot of the VLM loading and unloading happens async, and I’ve been having trouble enforcing a stricter order to make these happen.

past tickets:

[Content removed]

[Content removed]

Steps to Reproduce
(please see description)

Hi,

Sorry for the late reply. Unfortunately the engineer responsible for static lighting has left Epic and there is nobody that knows those systems anymore. From your description it sounds like there is a stomp of new VLM previous VLM. You could confirm that this is indeed the case if you print the name of the level in FPrecomputedVolumetricLightmapData::AddToSceneData. Could you wait for one level to be fully removed/streamed-out before loading the new one (ie. enforce the order)? This is what our projects do and I don’t know of any other way of handling it.