VR Loading Screen Movie

Hello,

I’d like to know how to set a movie as loading screen in VR.
I’ve managed to set a static texture by doing thsi:

static ConstructorHelpers::FObjectFinder<UTexture2D> SplashScreenFinder(TEXT("Texture2D'/Game/UI/Textures/LoadingScreens/VRLoadingScreen.VRLoadingScreen'"));
VRLoadingTexture = SplashScreenFinder.Object;

UStereoLayerFunctionLibrary::SetSplashScreen(VRLoadingTexture, FVector2D(1.0F, 1.0F), FVector2D(0.0F, 0.0F));

UStereoLayerFunctionLibrary::ShowSplashScreen();

However I’ve seen that there is a variable in SetSplashScreen function called bShowLoadingMovie and I was wondering how this works. How can I set this movie?

Thanks in advance,

Also check out these links on the topic:

  • [Startup movie help][2]
  • [How do I get Movies to play on startup for my packaged game?][3]
  • [UMoviePlayerSettings][4]

EDIT:

After doing some digging, I found some files in the source that provided some good insight. I’ve linked the files, and functions that I followed the trail of

  • [StereoLayerFunctionLibrary.cpp][5]::[SetSplashScreen(…)][6]
  • [IStereoLayers.h][7]::[SetSplashScreen(…)][8]
  • [DefaultStereoLayers.cpp][9]::[UpdateSplashScreen()][10]

Analysis:

  • It looks like if you set the boolean parameter bShowLoadingMovie on UStereoLayerFunctionLibrary::SetSplashScreen.
  • The parameter gets passed to IStereoLayers::SetSplashScreen, which will store it under bSplashShowMovie.
  • bSplashShowMovie is referenced in FDefaultStereoLayers::UpdateSplashScreen() when setting the Texture to render.
  • Conclusion: The Texture you pass in, has to be the movie.
  • If this doesn’t work for you, try also calling [IStereoLayers::SetSplashScreenMovie][11]

Hello @BenVlodgi, thanks for your reply, but I don’t need to play a startup movie. I need to play a movie as a loading screen between map changes in VR devices.

That is a bit trickier.

You’ll have to use level streaming to be able to play a video while loading. If you use standard OpenLevel, then it will freeze the video.

Have the movie loaded in the PersistentLevel, and whenever you are changing from sublevelA to sublevelB, play the video, and tell the level to stream in, but don’t block on loading, or else it will freeze.

I see… Do you know what they meant by this?

Unreal Engine 4.14 Released!

New: VR Loading Movies

The engine now supports loading movies
on Oculus, GearVR, SteamVR, and PSVR.
These run on the rendering thread, and
can mask framerate hiccups as you load
up your content. To use the splash
screen, you can set a texture using
the “Set Splash Screen” node, or
choose to automatically have it appear
when you load a map with the “Enable
Auto Loading Splash Screen” node.

It is in the 4.14 changelog

I did some digging in the code, updated my answer with information that will hopefully help

hey JavierRamello,
Did you get a loading movie to work somehow? I tried with the stuff you mentioned and BenVlodgi wrote down. However I’m not able to get a movie to work.

After the level loaded I want to show a movie for some performant stuff that the player/user can trigger.

StereoLayerFunctionLibrary.cpp::SetSplashScreen(…) takes in a texture and even movies should be textures (media textures in this case). However a MediaTexture is only updated through a media player that is playing in the background. I tried starting a MediaPlayer that renders onto the texture (its playing when watching the texture on a cube) and used ShowSplashScreen but it stays black.
Were you able to achieve any working result?

Hello Rumbleball, sadly we never managed to set movies as loading screens. For now we just kept a static image. If anytime you find a way to do it, please, let me know.

Alright, thanks for the reply.

Any update on this?? I’m trying to do the same but imposible to make it work.

I gave up at some point. We now have 5 images, 20% 40% … and switch those we reach that progress. To make that work, you need to let the engine run an frame to update the image. When picking that up again, I will look into SteamVR API directly.