Maybe you can use it as a starting point on what to do for lighting (and what not to do)
Things to address:
1: Don’t use dynamic shadow (or how to setup cascade shadow maps)
Solution 1: Disable them for everything in the level
Solution 2: Set shadow setting to none
New Problem -> everything no longer has a shadow
Solution: Use something called ‘Cascade Shadow Maps’, how to set this up? (when its enabled why doesn’t this work out of the box)
Note: Should static shadows/lighting still be enabled?
Required settings: e.g Enable Instanced Stereo Rendering and other things that should be enabled in DefaultEngine.ini. For instance adding a [Oculus.Settings] when using an Oculus hs.
Enable Forward Shading Renderer (& Multisample Anti-Aliasing)
Note: This breaks materials, the solution is to edit all materials and change the texture to WrapShared.
Don’t use a giant light mass volume importance, since then Build Lighting will crash in 4.19.
Partial-Solution 1: Increase OS virtual memory.
Partial-Solution 2: Break up into multiple instances, what would be a recommended size?
Note: In a big world you might have a high mountain which ends in a beach / sea, with birds flying at mounter height over it.
Now the shadow of each bird should be shown on the beach, so the shadow clipping level should be relatively big while still maintaining high FPS.
Best way to setup the ‘sun’, E.g Skylight, Point light (Static / Movable / Stationary).
Note: Some videos contradict each other on what to use for VR.
Thanks for the suggestion! I’ve added it to the list of potential ones that we can pull from for a live training stream in the future. in the meantime, I can probably point out some things that you bring up.
Have you checked out Robo Recall? It’s freely available to download and you can take a look at how we set up the lighting for the levels. Dynamic lighting is used along with Static lighting. However, there are a lot of indirectly lit areas where we use Capsule Shadows for characters.
When you use a Stationary Directional Light, these dynamic shadow distance is set to 0, so you have to manually set that as needed. Use a short distance near the camera and rely on baked shadowing for farther objects than this distance.
For VR static lighting should still be used. Dynamic shadowing is expensive to use, especially with VR.
For lightmass importance volumes, it’s best to have multiple for your level that is only placed in playable areas. Anything outside of the lightmass importance volume will get a lower quality. So if the player cannot get to that area, there is no need to use one. If it’s open world, then a large one is OK. You mention that you get a crash, can I assume this is a “lightmass crash” and not an Editor crash? If it’s a lightmass crash, you are running out of memory when building lighting. Try reducing lightmap resolutions where you can and look into using Swarm Agent to offload some of the lighting build process to other machines. (We have docs coming for this soon! Until then, check out this site: Tutorial: Setting Up Swarm for Multiple Machines | Brian Goodsell - Environment Artwork)
“Now the shadow of each bird should be shown on the beach, so the shadow clipping level should be relatively big while still maintaining high FPS.”
This has nothing to do with lightmass and baked shadows. Since the birds are moving (or should be) you'd want dynamic shadowing. For VR this is expensive, so if it's a shadow that is far away, you won't really be able to do that (at least not in a performant way!).
“Best way to set up the ‘sun’, E.g Skylight, Point light (Static / Movable / Stationary).”
There isn't a really specific way to set these up for most projects since you the intensity and coloring of each is going to be dependent on the style that you're going for. Some optimization tips though, may help.
Use Static or Stationary lights whenever possible. For Stationary Lights, it’s best to keep their influence radius lower, whenever possible.
Set a Max Distance and Fade Distance. If the lights are movable or stationary, the dynamic light and shadows casting will cull (not render) past this distance, saving you some performance. We use this on Fortnite a lot!
You have a per-light setting for Shadow Resolution. You can lower this value to lower the resolution of the dynamic shadow map. Shadows that are dynamically cast may not look sharp but you save some performance here too.
Directional Light - Stationary
for VR, use a Stationary Directional light if you require dynamic shadowing. Use a low dynamic shadow distance to keep CSM shadows as close to the camera as needed so that baked shadows are used beyond this point.
probably best to use a Static sky light.
I hope this helps for the moment. Each project and your specific needs can’t always be distilled down into a single “use this and you’ll be golden” option. Often times, you have to make trade-offs for performance versus quality. For VR performance is more ideal, but that doesn’t mean that you can’t find creative ways to fake an effect or feature to still get the result. Just something to also be aware of and consider while you’re developing your project.