Download

Skylight problems only in VR (difficult to reproduce)

I have a VR project that contains one persistant level and 5 streamed trough blueprint levels. These 5 levels have a mixture of sunlight and skylight settings.
Thus: the lighting isnt done in the persistant level. But on a per level base (no static lightning). One dynamic light and one skylight per level.

Inside the editor everything works fine as expected (VR / Non-VR) .
When I run the game with a shortcut -game extension everything works fine as expected (VR / Non-VR).
When I buildt the game I have 0 errors and works fine as a stand alone without VR activated.

Now here we go (it took me 3 days to reproduce the error/Pesky BUG).

As soon as I activate VR (within the buildt version (oculus riftS)) The skylight does not show-up or shows-up random (when switching blueprint streamed levels). Shadows are black.

I tryed a great many things!! (using one skylight Inside persistant level, activating skylight on a delay)

This seems to be a realy Importand BUG to solve because it is impossible to run streamed levels with skylights and decent shadows.

Can anyone shed a light on this very difficult to reproduce BUG (you can only test with a buildt version and that takes 20 min to achieve).

I tested inside 4.20 no problems when switching streamed levels.
I tested inside 4.23 black shadows and skylight not showing when switching streamed levels.
I tested inside 4.24 black shadows and skylight not showing when switching streamed levels.

Greatings Games_master_Jodan.

I found a work around (version 4.24)… And it can save you a lot of time.

First of all:

Dont enable VR in your project settings. Have some sort of loading screen so the player isnt bothered with things happening in the background. Have all your levels loaded and should be visible set to 1. You get a red “error” that there are too many dynamic lights in the scene (no problem). switch all levels that are not needed at the moment to: should be vissible 0. Now remove loading screen and switch VR enable to 1.

There you have it: level streaming, and multiple Skylight in VR in your shipping buildt (oculus RiftS).

Btw: Ue4 and RiftS is pure MAGIC
https://www.youtube.com/watch?v=7lnrAtzVjhw&t=138s

Greatings Games_master_Jodan.

I’m glad you found a solution. Thanks for coming back and posting it.
Could you go into a bit more detail on your setup?
“Don’t enable VR in project settings”. Is that the Start in VR setting?
Is the loading screen on the desktop or in VR somehow?
Level Streaming. Are you using Lighting Scenario streaming or the standard level streaming, or both?

Jep:

Start in VR setting = False
Loading screen is only on the desktop.You can put the HMD on the head if it disappears.
I use the: streaming level should be visible node and can switch fast between levels because they were all loaded in the first place.

I use no texture streaming/forward rendering/lots of console variables in the project.

sg.AntiAliasingQuality 0
r.PostProcessAAQuality 3
sg.postprocessquality 2
sg.shadowquality 2
sg.texturequality 2
sg.ViewDistancequality 2
sg.FoliageQuality 2
r.TemporalAACurrentFrameWeight 0.25
r.temporalAASamples 0
r.Tonemapper.Sharpen 1.9

to name a few.
These give me a of the chart crisp image.

Lighting Scenario streaming…Only use dynamic lights and skylights so dont know exactly what that is…

For me this is a workaround because I buildt easy/simple VR arcade experiences. No Horizon Zero Dawn stuf :slight_smile:

Greetings.

J.

Thanks. Really useful information.

In case it’s helpful to you someday. Lighting Scenario streaming is like level streaming except you are loading and unloading baked lighting. That way you can have different times of day without the cost of movable lights.

Best.

Different times of day. I have never been a fan of light baking. I always disable all static lighting.

I use this marketplace asset https://www.youtube.com/watch?v=WxZykhXZgEU&feature=youtu.be

It is less stylized than you might think.

I modificated it so it does a Skylight recapture every 5/10 seconds. Looks great and Works fine in VR.
Tryed true sky but got performance and sort order isues with the volumetric clouds.

https://www.youtube.com/watch?v=fXCf2rsC0o4&t=3s

About the original problem: Oculus has now its settings pannel, Nvidea has its settings pannel and ue4 has a lot of settings that can be adjusted. The reason the skylight doesnt show up when starting in VR is still a mistery. I think something has changed in 4.24. We have to look in the direction of the light sensor of the HMD being blocked or not (just guessing). The fact that Occulus home always runs in the background has been a pain since the beginning of time :wink:

Greetings.

Bump! I’m having the same trouble, the workaround of enabling VR after the skylight is loaded worked, but its awful to keep it in…

I’d like to add that I’m also having trouble with this. I don’t think that I can afford to have all the levels I need loaded at once, even if it’s temporary, unfortunately.

Adding myself to the list of people having trouble with this. I have all levels loaded at the start. even then, with 4.24.3, the skylights don’t seem to load and the shadows are black. I have the skylight in a lighting map (the skylight is stationary and the map is set as a lighting scenario)

For my project i had to enable distance field meshes, which means i have to put the skylight to stationary for shadows to work properly. It seems when to work fine on the first startup level, but if you go to any level beyond that point, the skylight either reverts back to static or deletes itself, might be a similar issue?

I’m having the exact same problem as you. Did you find a solution to this?

Yes i did!

In my skylight i had to enable it as a sls specific cubemap and then manually change the world color for each of my levels.

It seems that in VR, the skylight resets itself to this and the default setting, which is a very dark color which messes the thing up.

You manually doing it seems to fix it, though it will not look as good if you did not change it to cubemap