Announcement

Collapse
No announcement yet.

Unreal Engine Livestream - Creating a VR spectator camera - Feb 21 - Live from HQ

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

    #16
    Really nice , I'm trying to prototype an asymmetric VR co-op game on one PC .
    I'm quite new with BP .

    What do we have to change/add to be able to use the standard 3rd person character and animations that comes with the engine content ?
    Everything is set up to target a pawn actor.

    Thanks
    Last edited by R4DI4NT; 04-08-2019, 05:35 AM.

    Comment


      #17
      Originally posted by Themap666 View Post
      Is it possible to have an application running on two screens, one of them being the spectator camera covered in the livestream, and another one just displaying the usual HMD livefeed?
      I don't think this is possible without modifying source code unfortunately, and I wouldn't know where to begin. I'd search and see if people have been able to do "split screen" but on two monitors. nDisplay might also be an option, but I'm just brainstorming here.

      Originally posted by R4DI4NT View Post
      What do we have to change/add to be able to use the standard 3rd person character and animations that comes with the engine content ?
      Everything is set up to target a pawn actor.
      I'm assuming that you'd like to use the 3rd person character BP for the player controlling the Spectator Mode Camera. You can't use "Add Movement Input" without possessing the pawn, and since our player controller is possessing the VR Pawn, the workaround would be to use an AI Controller for the 3rd person character, and add the SceneCaptureComponent (just like in the example project) to it.


      Comment


        #18
        Originally posted by VictorLerp View Post

        I'm assuming that you'd like to use the 3rd person character BP for the player controlling the Spectator Mode Camera. You can't use "Add Movement Input" without possessing the pawn, and since our player controller is possessing the VR Pawn, the workaround would be to use an AI Controller for the 3rd person character, and add the SceneCaptureComponent (just like in the example project) to it.

        Thanks a lot for your reply Victor.

        Would it be possible, using this method, to recreate the same walking/jumping effect that a normal character has and the interaction with other actors ,such as pick up or move an object in the scene?

        Also , for the only purpose of the VR asymmetrical local multiplayer , could this tutorial be more sutable for my needs , instead ?
        https://www.youtube.com/watch?v=3lN2eZIgAQ0
        So I would only need to somehow add the Vr Player in it .

        Thanks in advance.
        Last edited by R4DI4NT; 04-08-2019, 10:05 PM.

        Comment


          #19
          Originally posted by R4DI4NT View Post
          Would it be possible, using this method, to recreate the same walking/jumping effect that a normal character has and the interaction with other actors ,such as pick up or move an object in the scene?
          Yes, but you will have to do the input similar to how we did the flying camera to execute walk/jump/etc.

          Originally posted by R4DI4NT View Post
          Also , for the only purpose of the VR asymmetrical local multiplayer , could this tutorial be more sutable for my needs , instead ?
          https://www.youtube.com/watch?v=3lN2eZIgAQ0
          So I would only need to somehow add the Vr Player in it .
          It's a good tutorial but in this case we can't use two player controllers like a traditional local multiplayer game does. The tutorial series then goes into how to set up a networked multiplayer game which we don't need since everything is local.

          Comment


            #20
            I know this is a bit late to the party but I am stuck on a part of the application and thought a little help could be useful.

            Is it possible to use the actual mouse cursor on the window to work with the widget interaction instead of having a world cursor for the widget interaction component?
            When I set the mouse cursor to be visible and click on the window the widget interaction gets all messed up. and the mouse goes off bounds on the window.

            Thanks a lot in advance and I hope I am not doing something terrible posting here after this time.

            Comment


              #21
              Gabe23K Not at all! That's what these announcement posts are for

              You can't use the regular mouse cursor because we're already hacking it by adding a 3dwidget component in front of the camera. My theory as to why it goes off the screen is probably because it's trying to operate within the screenspace of what's being rendered to the HMD, and not in the render target texture that's being displayed on the flat monitor.

              Comment


                #22
                Originally posted by VictorLerp View Post
                Gabe23K Not at all! That's what these announcement posts are for

                You can't use the regular mouse cursor because we're already hacking it by adding a 3dwidget component in front of the camera. My theory as to why it goes off the screen is probably because it's trying to operate within the screenspace of what's being rendered to the HMD, and not in the render target texture that's being displayed on the flat monitor.
                Yeah, I imagined. But no worries.

                I ended up going a bit deeper with my research and found a solution for the mouse cursor. Using the widget render target as the texture for the Spec Screen instead of adding it in front of the camera and Setting the Relative location of the widget interaction instead of just adding to it. It was rather satisfactory merging both, your approach and the other one, into a solution for this.

                Thanks for the hard work and the reply!

                Comment


                  #23
                  Hey, this is awesome! Is it possible to use this approach with local split-screen? Multiple scene captures combined to a single spectator screen? 1 VR player vs 4 on-screen players?

                  Comment


                    #24
                    Originally posted by kevinraz View Post
                    Hey, this is awesome! Is it possible to use this approach with local split-screen? Multiple scene captures combined to a single spectator screen? 1 VR player vs 4 on-screen players?
                    Not out of the box, and it would be difficult to get four scene captures and the stereo rendering to hit required performance.

                    Comment


                      #25
                      Hello! Maybe a little late here, but I'm having some issues implementing the VR spectator camera on a very simple packaged project without hits to performance. I can run the sample in the editor, but once I package it, the performance drops fairly dramatically. I'm looking into settings for optimization, but this is pretty much out of the box as far as I'm aware. Even if I keep the render texture lower that 1920x1080 (I kept it to the default 256x256) I still saw issues. Any help would be really appreciated!!

                      Comment


                        #26
                        Hi just a little bit of a clarification to my last comment. I believe I narrowed down my "performance" issue. It seems when I run package and run this project, I'm getting what appears to be a memory leak with my RAM rising quite quickly. I've attached a screenshot of my task manager after running the packaged build for just 30-60 seconds.

                        A couple things I had to do to get the project running for myself:
                        1. In project settings enable start in VR
                        2. In the Enable Spectator Screen function, instead of Is Head Mounted Display enabled? I needed to use Is Head Mounted Display Connected or just skip that check all together. Otherwise, when I'd run the packaged project, it would log No HMD detected: Debug Mode etc.

                        A couple extra notes. I do not seem to have an issue in the editor. I also was able to reproduce similar problematic results with just a Scene Capture 2D component in place of the whole actor class in the project here. I suspect I'm missing some setting or step that is causing the memory leak in the Scene Capture 2D, OR the change that I needed to make to have the spectator class work with my HMD (Is Head Mounted Display Connected vs Is Head Mounted Display Enabled) is suggesting another issue.

                        Any advice on the apparent memory leak when using Scene Capture 2D would be extremely helpful!

                        [Edit: I am using an Oculus Quest with a link cable]
                        Attached Files
                        Last edited by Kevin_Bluecadet; 06-08-2020, 03:13 PM.

                        Comment


                          #27
                          Kevin_Bluecadet Could you try the following? In Engine.ini, add this:

                          Code:
                          [/Script/Engine.RendererSettings]
                          r.SceneRenderTargetResizeMethod=2
                          r.SceneRenderTargetResizeMethodForceOverride=True

                          Comment


                            #28
                            VictorLerp Thanks! I'll have to test a little more thoroughly, but off the bat that seems to have done the trick. Sorry if I missed that mentioned somewhere

                            Comment


                              #29
                              Kevin_Bluecadet The Engine.ini addition is for engine versions released after the livestream and project was produced. Let me know if that indeed fixed it and I will add a note to the documentation for others!

                              Comment


                                #30
                                VictorLerp just to clarify, are Engine.ini and DefaultEngine.ini the same thing (I'm relatively new to Unreal)? I made the change in DefaultEngine.ini - Tested with both an Oculus Quest with a link cable and with a Dell WMR headset, and that seems to have done the trick. Thanks for the fix!

                                Comment

                                Working...
                                X