Packaged build + oculus rift + sublevel = black screen

I recently upgraded my game from 4.13 to 4.15.2;

I migrated all of my active content from one project to another.

Everything works perfectly within PIE. I’ve got one of the funkiest bugs. When I view my game through the Oculus Rift on a packaged build and the level I am viewing has sub levels and any of those sublevels contain objects, my oculus rift is completely black and I can’t see anything. I have created a very basic level, which contains a cube, directional light source, player start, and atmospheric fog. I have a persistent level and a sub level. The sublevel only contains a static mesh and it is loaded by default and visible.

  • If I play the game within the editor,
    everything renders just fine within
    the Oculus Rift.

  • If I package the project, Oculus goes
    black.

  • If I switch from the Oculus Rift to
    the HTC Vive, everything renders just
    fine.

  • If I take the static mesh and move it
    into the persistent level, everything
    renders just fine in the packaged
    build.

  • Moving the mesh from the sublevel to
    the persistent level reliably toggles
    whether the oculus rift display is
    black (I can still see guardian
    boundaries when its black, so I’m
    getting video).

  • For the sake of testing, I even
    turned off the SteamVR plugin because
    Oculus has claimed that the plugin
    causes problems.

I created a blank project and created two levels. One is the persistent level, the other is a sublevel. The sublevel has the very same static mesh which causes a black display in my game project.
When I package the game and run the level with the same level structure and configuration, it works perfectly. I can’t repro this in a blank project with the same settings and asset.

So, I’m having trouble narrowing this bug down.

I have discovered that if I have the sub levels start as “not loaded” and “not visible”, and just load the persistent level, and then have a short delay and then load in the sublevels manually through a “load level” blueprint in Begin Play, I don’t get a black screen on Oculus Rift. This is very much a work around, but I’d like to know how to fix this bug.

Hey Slayemin,

I’ve spent some time testing this in a few different engine versions, but I’m not seeing the same results in a clean project either.

What I’d recommend, since you’re unable to reproduce the issue yourself in a clean project as well, is either going with the workaround you have, or attempting to migrate the content of your project into a clean project to see if the same content will work there. It’s possible that something is corrupted in the project that is experiencing the issue.

If the content is still broken when migrated into a clean project, spend some time trying to debug the issue to determine what could be the cause, and feel free to provide a set of repro steps or a simplified test project that showcases the issue and I’ll be more than happy to take another look.

Have a great day

We are fighting with the same issue here ourselves… Good fun, I am absolutely baffled why this renders fine in the Vive and not the Rift when this seems to be level specific. Also posted here for more visibility: Packaged build + oculus rift + sublevel = black screen - XR Development - Unreal Engine Forums

I had a similar problem on Oculus only (worked fine on Vive). The Oculus runtime was leaving the loading splash screen up which is black by default. Something had caused the Oculus plugin to not recognize that loading had completed. I worked around it by adding a “Hide Loading Splash Screen” with clear set to true from begin play on the level blueprint. If you are seeing the same problem, you’ll see in the log where the Oculus blacks the screen:
LogHMD: FOculusRiftSplash::PushBlackFrame
LogHMD: FOculusRiftSplash::Show
But then won’t see the corresponding FOculusRiftSplash::Hide.

this fixed it for us, thank you so much!

Hey, I have the exact same problem. In my log it says “FSplash::OnShow” and there is nothing that refers to hiding the Screen again. I already tried to use the “Hide Loading Splash Screen”-Node, but that won’t work for me, unfortunately. Any suggestions?

We have hit the same problem again. The workaround Slayemin suggested is working for now, but we plan on looking into it later - the problem is somewhere in the interaction between the Oculus plugin and level streaming engine side.

Hi, I’ve unchecked all my sublevel’s initially load and initially visible. Also I added both hide splash screen and hide loading splash screen node to begin play blueprint of presistant level .

The only difference is the sublevels get loaded only when needed, but I still get black screen . All things above seems not worked at all … Any idea?

Try setting bUseAutoLoadingSplashScreen to false. (Oculus.Settings).

Hi Simos, thx for the reply, could you pls tell me which ini files to modify?(I’ve searched for BaseEngine.ini & BaseGame.ini but no [Oculus.Settings] or bUseAutoLoadingSplashScreen was found…Also the ‘Auto enabled spash screen’ is unchecked in project setting, but this aint work

~ many thx

OculusHMD_Splash.cpp has bUseAutoLoadingSplashScreen, which should be in an Oculus.Settings section.

thx, i’ll try to search for it again~ :slight_smile:

My issue seemed to be:

  • A sublevel was set to Streamed and Initially Loaded.

To fix this, I found two independent solutions. I am posting them both since they both seemed to resolve the issue:

  • Change sublevel to Always Loaded (not streamed)
  • Manually stream in the level after BeginPlay, rather than relying on the streaming level details panel’s “Initially Loaded” setting.

I also tried some of the suggestions above, which did not seem to have an effect:

  • Set Auto Loading Splash Screen to false
  • Added calls to manually hide the splash screen in Begin Play

So it seems there is an issue with how early in the startup “Initially Loaded” levels get streamed in, and for whatever reason this causes the Oculus splash to never close.

There is some additional info about this in the Oculus forums: Issues with SplashScreen - Oculus Community - 548549