One map with different lightmaps?

Would it be possible to change lightmap on static geometry to another, precalculated one, while game is running? In other words, can static geometry be separated from its lightmaps?

Let’s say I have a map with many interactive elements: user placed decals, movable meshes, destructible meshes, etc, and I do not want to lose or reset them during a play session. I’d also like to change time of day every now and then. Ideally I’d have a single, persistent map containing no lights but everything else, plus any number of streamed levels, loaded at will, providing precomputed lightmap data and all dynamic lights. It would be great because player would never leave persistent map so state of level would be maintained without saving and restoring every dynamic item on load.

Your solution using several streamed levels sounds reasonable, though you’ll have noticeable jumps between times-of-day. What you would need to do, however, is to load in any Actor with a baked shadow on it as well as lights, and unload previous set. So every Actor with a static shadow would need to have a copy in each streamed level, including walls, floors, etc.

Alternatively, you could stick with lights that cast dynamic shadows instead. There are several methods to achieving a moving sun. I’ve used a variation of this one in my own projects, and it works pretty nicely with streamed in levels:

Hope that helps!

Thanks. Is there an easy/automated way to keep copies of static environment in sync?

Not really. best thing you can probably do in this scenario is to assign each Actor with multiple copies to a Layer, and then you can select that Layer and move all elements within it at same time. It might be difficult to set up, depending on how many Actors with shadows you’re dealing with, but it’s better than alternative. Otherwise you will need to manually find each Actor in each Level every time you want to adjust it, and that can be fairly tedious.

Is there a reason you’re looking to avoid using dynamic shadows? It seems like a simpler method without such a complicated setup. If you describe what you’re going for a little more, maybe some of community will have some other suggestions for how to set this up.

Best,

I’m aiming at a realistic, modern apartment interior with different lighting setups for dawn, noon, dusk, night and blackout with emergency lights only. Having GI and indirect lighting cache calculated is important as I rely heavily on bounce lights to achieve look I’m after. (I do use dynamic shadows for sun and other major light sources.)

changes being not seamless is not a problem as transition is hidden by a “new chapter” screen.

What I’m thinking now is writing a parser: copy whole master level to clipboard, paste it to parser which removes all non static actors and stores result. Then cut whole target level to clipboard, paste it into parser as well which then replaces all static actors with ones from master level and puts result back onto clipboard. With tagging one could mark items never to be transferred (skybox related stuff) and where material overrides must be kept (TV having a flashing screen during night).

But that’s not exactly a “elegant in its simplicity” sort of solution either…

If you do write a parser, let us know how it works out!

For anyone reading this 4.14 introduced the “Lighting Scenario” feature enabling you to stream in different light map bakes for same level.