We have a scenario where we have a level (umap) that we have different versions of for different times of day. (Daytime, night etc). The level is lightmapped, and everything about the level is the same except for the lighting settings. All our models, textures, materials etc are the same for all variants. I know the lightmaps for each level are contained in the .umap file, so I don’t know of a way how we could basically get the lightmaps from one umap and swap them out. (which is why I’m asking )
At the moment when we want to go to a different variant of the same level, the old map gets unloaded and the new map is loaded up. This takes quite a while considering all we basically need to change is the lighting. What we were expecting to happen is that the engine would detect that it already had all the textures/models etc already loaded into memory, and wouldn’t bother unloading and reloading them, but that doesn’t seem to be the case. We’re using ServerTravel to load our maps.
We’ve also found that even if we load into exactly the same map via server travel, this unloading of the whole level, and loading of the whole level will occur, which surprised us quite a bit as we expected the engine to be super smart about this kind of thing. (We’ve taken steps to not reload a level that we are already in ourselves now)
So I have a few questions:
- Without modifying the engine code, is there a way of simply swapping out lightmaps?
- If it would require engine changes, would it be straightforward to do or a massive amount of work?
- If we did something with level streaming, where we would stream in and out our level variants, would that give us a way to work around the issue? For example, if player was playing in daytime, but then wanted to play at night, could we stream in the night variant (hopefully the engine then would realise it has all the models/textures etc in memory and wouldn’t need to unload/reload) and then stream out the day variant? Does that (or something like that) sound like a plausible workaround?
- Is there any other potential way we could make sure all our textures/models etc aren’t unloaded and reloaded everytime we change level?