Announcement

Collapse
No announcement yet.

How to set Splash Screen location in VR

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to set Splash Screen location in VR

    I'm struggling with the Splash Screen in VR, since it seams to show up in random positions (it even changes location by itself while changing maps). Is there a way to set up the location where the splash screen is shown in VR?

    I'm just creating the loading screen this way (I've tried with both, "set splash screen" and "add loading splash screen")

    Click image for larger version

Name:	Capture.PNG
Views:	63
Size:	87.3 KB
ID:	1682879

    and then loading

    Click image for larger version

Name:	Capture2.PNG
Views:	111
Size:	29.4 KB
ID:	1682878

    Doing this, the loading screen seems to be in a random place every time (or probably in a fixed position but when you turn around seems like random). I need the splash screen to be in font of the player when I show it. Am I doing something wrong?

    #2
    Got it working properly? It was working for us mostly, at least the image was positioned in the center front of the player.. and now, suddenly, its broken again. Maybe cause of SteamVR update, but dunno...
    NodePrefabs | PluginBuilder | NotificationBackbone | WidgetBox | RuntimeMeshImportExport | DebugWidget | SteamWorkshopAccessor

    Comment


      #3
      Unreal 4.23

      Okay got further with this. The problem is how Unreal things the transform setup is. What happens is, that Unreal takes the relative rotation of the HMD (relative to the player actor) and applies that rotation to the tracking space orientation. The orientation of the tracking space is marked with the arrow in SteamVR setup. According to the current math (in function FSteamVRHMD::UpdateSplashScreen) Unreal does not account for a world that is not aligned with the tracking space and neither for a player that not aligned with the world.

      So in order to make it work, the world orientation must allign with the tracking space orientation, and the player pawn must (actor) must have a ActorRotation of 0.

      Unreal 4.25

      I did not test it, but the issue still seems to persist, as far as I can tell, it even got messier. They changed a lot about the VR stuff, and code is now in
      Code:
      FDefaultXRLoadingScreen:DoShowSplash
      and
      Code:
      FDefaultXRLoadingScreen::ApplyDeltaRotation
      .



      Click image for larger version  Name:	SplashScreenMess.png Views:	0 Size:	53.8 KB ID:	1782685
      NodePrefabs | PluginBuilder | NotificationBackbone | WidgetBox | RuntimeMeshImportExport | DebugWidget | SteamWorkshopAccessor

      Comment


        #4
        Ok, now the fix UNREAL 4.23:
        Unreal retrieves the orientation of the HMD from Steam VR but modifies it with a BaseOrientation which seems to be the WorldRotation of the PlayerActor. In order to eliminate the World and the Player from the Equation, we need to inverse the transformation made to the HMDOrientation.

        If you have a custom engine build, you can just change the SteamVR plugin. If not:

        -Copy the SteamVR plugin from the engine directory into your Project/Plugins folder. (Seems there are other ways to load a different VR System class, but that involves commandline specifications and some configuration. You can see into: UEngine::InitializeHMDDevice() for more details)

        -Modify SteamVR.Build.cs
        Code:
        PrivateIncludePaths.AddRange(
        new string[] {
        "SteamVR/Private",
        EngineDirectory + "/Source/Runtime/Renderer/Private",
        EngineDirectory + "/Source/Runtime/VulkanRHI/Private",
        // ... add other private include paths required here ...
        }
        );
        
        
        if(Target.Platform == UnrealTargetPlatform.Win32 || Target.Platform == UnrealTargetPlatform.Win64)
        {
        
        PrivateIncludePaths.Add(EngineDirectory + "/Source/Runtime/VulkanRHI/Private/Windows");
        }
        else if(Target.Platform != UnrealTargetPlatform.Mac)
        {
        PrivateIncludePaths.Add(EngineDirectory + "/Source/Runtime/VulkanRHI/Private/" + Target.Platform);
        }

        -Modify FSteamVRHMD::UpdateSplashScreen()

        from

        Code:
        ...
        FRotator Rotation(HMDOrientation);
        ...
        to
        Code:
        ...
        FRotator Rotation(BaseOrientation * HMDOrientation);
        ...
        Last edited by Rumbleball; 06-30-2020, 12:53 PM.
        NodePrefabs | PluginBuilder | NotificationBackbone | WidgetBox | RuntimeMeshImportExport | DebugWidget | SteamWorkshopAccessor

        Comment

        Working...
        X