Language:
Page Info
Tags:
Skill Level:
Engine Version:

VR Splash Screens

Choose your OS:

Unreal Engine 4 (UE4) offers support for displaying videos or images while a level loads when using Oculus, Gear VR, SteamVR, and PSVR Head Mounted Displays (HMDs). The loading movie or image will run on the rendering thread and can also help to mask frame rate issues while your content is loading. In the following document, we will take a look at how you can set these VR Splash Screens in your UE4 projects.

VR Splash Screen Supported Platforms

VR Splash Screens will work on the following VR platforms.

VR Splash Screen Project Setup

Before you can setup and use the VR Splash Screens you will first need to create a new Game Mode and Pawn Blueprint to make it easier to work with the VR Splash Screens. In the following section, we will go over what Blueprints need to be created and how they need to be set up.

  1. Right-click in the Content Browser, and from the Create Basic Asset list select the Blueprint Class option.

    VRLS_Intro_01.png

  2. In the All Classes section of the Pick Parent Class dialogue box, search for Game Mode. When Game Mode is located, select it and then press the Select button and give it a name of VR_GameMode.

    Click for full image.

  3. Repeat the above process, but this time select the Pawn option from the Pick Parent Class dialogue box and call this new Pawn, VR_Pawn.

    Click for full image.

  4. Open up the VR_GameMode Blueprint and in the Classes section, set the Default Pawn Class to the VR_Pawn that was created. When completed, Compile and Save the VR_Gamemode Blueprint.

    Click for full image.

Now that the Pawn and Game Mode have been set up, we will take a look at how to set up a VR Splash Screen in your Pawn's Event Graph.

VR Splash Screen Setup

In the following section, we will go over how you set up a VR Splash Screen in your Pawns Event Graph.

Please note that this example shows the quickest way to get the Auto Loading Splash screens working in your project. When using this in production you will need to make sure to manually show and hide the Splash Screens during level transitions to make sure that you account for the time it takes for a level to finish streaming in.

  1. Open up VR_Pawn to the Event Graph and the following Blueprint nodes to the Event Graph:

    Click for full image.

  2. With the nodes now added to the Event graph, arrange and connect the nodes so that they match the setup in the following image.

    Click for full image.

  3. Since we want the VR Splash Screen to load any time a level is loaded, on the Enable Auto Loading Splash Screen node, check the In Auto Show Enabled.

    Click for full image.

  4. The Set Splash Screen node is where you specify which Texture to use for the VR Splash Screen. To set a VR Splash Screen Texture, select a Texture in the Content Browser and then press the small white arrow in the Texture section of the Set Splash Screen node to use that Texture as the VR splash screen.

    Click for full image.

    For this example, a noise Texture was created in Photoshop and then imported into UE4 and used. Feel free to use any Texture you want for this section.

    If you are targeting SteamVR, you will need to make sure that you set the Compression Settings of the Texture you are using for the Splash Screen to UserInterface2D(RGBA) or it will not be displayed when the Splash Screen is called.

    VIL_SteamVR_Comp_Settings.png

  5. Finally, on the Set Splash Screen node check the Show on Set option to make sure that the Texture you specified is displayed when a level is loaded.

    Click for full image.

With the VRSplash Screen now set up in the next section, we will take a look at how to go about calling the VR Splash Screen when a new level is loaded.

VR Splash Screen Use

Now that we have the Pawn set up to use the VR Splash Screens, we will go over how to display the VR Splash Screens when a level is loaded.

  1. For this to work, you will need to create two levels that we can load. To create the levels, go to the Main Toolbar and select the File > New Level option. When the New Level popup box is displayed, select the Default level option.

    Click for full image.

  2. Inside of the Content Browser, press the Save All button and name the new level Level_00. Once it has saved, right-click on Level_00, and select the Duplicate option. Name the duplicate Level_01. When all of that is completed, you should now have two new levels in the Content Browser, like in the image below:

    Click for full image.

  3. Open up each level and go to World Settings > Game Mode and the Game Mode Override to the VR_GameMode Blueprint that was created. This way, we can be sure that the correct Pawn will be used when the level is loaded.

    VLI_NewLevel_06.png

  4. Open up the VR_Pawn Blueprint and in the Event Graph, add key inputs for the R and T keys.

    Click for full image.

  5. Right-click on the Event Graph and search for the Open Level Blueprint node. Add it to the Event Graph. Connect the Pressed output for the T key to the Open Level input and enter Level_00 in the Level Name field.

    Click for full image.

  6. Select the Open Level node and then press CTRL + W on the keyboard to duplicate it. Connect the Pressed output for the R key to the new Open Level node and change the name of the Level to Level_01.

    Click for full image.

  7. Push the Compile and Save buttons to compile and save your Pawn Blueprint and then launch your project using the VR Preview.

    Click for full image.

  8. Put your HMD on and then press the R key to load Level_01. While the level is being loaded, you should see the image that you specified in the Texture input of the Set Splash Screen node. Once Level_01 loads press the T key to load Level_00, and you should now see the same image being displayed.

With the ability to change levels on button presses now working, the next step would be to set this up so that it will work when a player enters a Level Streaming Volume or trigger as you would in any game or interactive project.

VR Splash Screen Node Reference

Clicking on the following link will take you to the VR Splash Screen node reference page. On this page you will find detailed descriptions for each node that is available for use with the VR Splash Screens.

VR Splash Screen Node Reference

Tags