If you tried to build lighting in a big landscape in UE4 with a lot of foliage, you probably noticed that it’s almost impossible to do this if you don’t have a supercomputer or two (and even then you probably will get a lot of warnings, like lightmap UV overlapping for your foliage or lightmaps issues for your landscape LODs). In many cases, all that you have to do is to use dynamic lighting. But there is a way on how to build actual static geometry inside your level without building lights for landscapes, foliage, and other too complex objects. In the end, you will use static lighting only on required static meshes and dynamic lighting on all other objects.
– Duplicate your current(persistent) level and open it.
– Remove the landscape, trees and all other stuff, which makes impossible to build the lightmaps.
– Build the lighting for your new (lighting) level.
– Open your persistent level and remove everything, which you’re not removed in your lighting level.
– Open Window->Levels tab from the top menu.
– Click Levels -> Add Existing and add your level lighting level.
– Right click on your lighting level in Levels tab and Change Streaming Method -> Always Loaded
– Run your persistent level and check that everything is working.
To add new objects in your lighting level, right click on it in Levels tab and make it current. Do required changes, make the persistent level as current again and save your lighting level. Then open lighting level and build the lighting again. Open persistent level and check that lighting is updated.
It’s a good idea to put things like directional light (make sure that it’s a stationary), atmospheric fog, skylight (stationary), sky dome and post process volume inside your lighting level and remove them completely from persistent level. If you don’t do this and leave them in both levels, you will get a lot of troubles due to incorrect lighting and other things.
As a result, you will get better lighting for your static meshes and you increase your performance because most of your static geometry will use static lighting, which is much cheaper than dynamic lighting.