Announcement

Collapse
No announcement yet.

Has anyone used the Spectator Screen yet?

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

    [VIVE] Has anyone used the Spectator Screen yet?

    How hard is it to set up? I'm at work so I can't test it out yet but I've looked over the doc and its a bit confusing. https://docs.unrealengine.com/latest...een/index.html

    Is this the view?
    Click image for larger version

Name:	VRSpecScreen.jpg
Views:	1
Size:	252.4 KB
ID:	1226812

    Or is it the normal 1st person view that you can see in your HMD but a bigger screen on your PC screen (No black boarders on either side). I ask this because it says "With the exception of PS VR, Spectator Screen Mode is enabled by default in UE4." If its enabled by default then I don't see the above view you can see in the screenshot on my computer. It talks about adding static texture's via BP but the above image shows a mesh not a texture so I'm guessing that has nothing to do with that view. It seems to suggest that the texture appears in the upper corner of the screen.

    This is a very confusing doc. It goes on to say "If you'd like to switch to a new Spectator Screen Mode" (is this talking about switching to the above 3rd person view?) ", you can open the Console and input vr.SpectatorScreenMode Value. For example, entering vr.SpectatorScreenMode 2 enables Distorted mode, which is currently supported by Oculus Rift." So what do I put in to get the PC screen to show the above view when I'm playing?

    #2
    Ok so I have spent the last hour on this. This is why I posted this question earlier when I was in work because after looking through that "Doc" I just new this sh*t was going to happen.

    The DOC says

    "On the left side, you (the spectator) are watching this artist paint a brick wall in VR, while on the right side, the artist is focusing on the painting in VR."

    It doesn't work, it does not work. Nothing in that doc tells you how to do that. Is this only for packaged projects? because if it is, that info is left out of the doc and it is stupid because people will want to use that feature in the preview. This is why Unreal sometimes just wrecks my head the blanks in information they expect you to fill in yourself. Here is a brilliant feature that we are not going to tell you how to do or even under what circumstances it actually works. Just f**cking guess how it works lol.
    Last edited by tcla75; 08-14-2017, 05:01 PM.

    Comment


      #3
      Well it doesn't work in packaged projects either, well I can't say it doesn't work because they don't tell you how to turn it on. It doesn't work by default so if anyone figures out how to enable this view...

      https://youtu.be/KHqXef1VK9o?t=64

      Be a pal and let me know.

      Comment


        #4
        It worked fine for me in editor: https://www.youtube.com/watch?v=B_5jzPENE_I

        I added a SceneCapture2D component to my pawn, I set the target of that to a new RenderTarget texture, and I used the Blueprint nodes in the documentation to set the Spectator Screen Mode to Texture and to set the Spectator Screen Texture to the RenderTarget. And I did some other stuff to animate the capture component a bit.
        Last edited by Tain; 08-14-2017, 07:21 PM.

        Comment


          #5
          Originally posted by Tain View Post
          It worked fine for me in editor: https://www.youtube.com/watch?v=B_5jzPENE_I

          I added a SceneCapture2D component to my pawn, I set the target of that to a new RenderTarget texture, and I used the Blueprint nodes in the documentation to set the Spectator Screen Mode to Texture and to set the Spectator Screen Texture to the RenderTarget. And I did some other stuff to animate the capture component a bit.
          Ok I'm going to try to fill in the blanks here. In the doc the blueprint example they give is a texture with the numbers 256 in it and they show an example of how it will look on screen by showing it in the upper left corner.

          Click image for larger version

Name:	VRSpec_BP.jpg
Views:	1
Size:	50.0 KB
ID:	1132460

          How did you reference the cat texture that was in your pawn and not the cat texture that is in your library. Can you show an example of the blueprint you used. I'm at work so I can't test it out.

          Are you saying that I just need to add a scenecapture2d component to my pawn then use the blueprint set spectator screen texture to a key press and then press that key and it will work?

          Comment


            #6
            The cat face was a Plane component that was already part of my pawn, attached to my existing camera that represents the VR HMD (since by default your head and hands will be invisible). It was placed behind the camera slightly, so it wouldn't cover my view in-game.

            Are you saying that I just need to add a scenecapture2d component to my pawn then use the blueprint set spectator screen texture to a key press and then press that key and it will work?
            Almost, you'll need to:
            * add a SceneCapture2D component or actor somewhere (could be attached to pawn, doesn't need to be. this will just be where the spectator cam is located)
            * make a new Render Target in your library
            * set the SceneCapture2D's Render Target to that new Render Target
            * in a blueprint key press event, call Set Spectator Screen Mode (setting to Texture) AND Set Spectator Screen Texture (setting it to your library Render Target)

            That should do it. You'll also need to make sure your pawn has some kind of visual things attached to it so you're actually visible.

            The example in this post is using the Texture mode, which just shows one solid texture (the output of the SceneCapture2D) onto the monitor. The "256" example in the documentation is using TexturePlusEye mode, which is taking the mirrored headset output and overlaying another texture (the "256") on top of it.
            Last edited by Tain; 08-15-2017, 10:02 AM.

            Comment


              #7
              Originally posted by Tain View Post
              The cat face was a Plane component that was already part of my pawn, attached to my existing camera that represents the VR HMD (since by default your head and hands will be invisible). It was placed behind the camera slightly, so it wouldn't cover my view in-game.



              Almost, you'll need to:
              * add a SceneCapture2D component or actor somewhere (could be attached to pawn, doesn't need to be. this will just be where the spectator cam is located)
              * make a new Render Target in your library
              * set the SceneCapture2D's Render Target to that new Render Target
              * in a blueprint key press event, call Set Spectator Screen Mode (setting to Texture) AND Set Spectator Screen Texture (setting it to your library Render Target)

              That should do it. You'll also need to make sure your pawn has some kind of visual things attached to it so you're actually visible.

              The example in this post is using the Texture mode, which just shows one solid texture (the output of the SceneCapture2D) onto the monitor. The "256" example in the documentation is using TexturePlusEye mode, which is taking the mirrored headset output and overlaying another texture (the "256") on top of it.
              Any idea how we can map the position of a 3rd vive controller to the scene capture component? Please share a project if you have one so I can check out the blueprint.

              Comment


                #8
                Originally posted by Tain View Post
                The cat face was a Plane component that was already part of my pawn, attached to my existing camera that represents the VR HMD (since by default your head and hands will be invisible). It was placed behind the camera slightly, so it wouldn't cover my view in-game.



                Almost, you'll need to:
                * add a SceneCapture2D component or actor somewhere (could be attached to pawn, doesn't need to be. this will just be where the spectator cam is located)
                * make a new Render Target in your library
                * set the SceneCapture2D's Render Target to that new Render Target
                * in a blueprint key press event, call Set Spectator Screen Mode (setting to Texture) AND Set Spectator Screen Texture (setting it to your library Render Target)

                That should do it. You'll also need to make sure your pawn has some kind of visual things attached to it so you're actually visible.

                The example in this post is using the Texture mode, which just shows one solid texture (the output of the SceneCapture2D) onto the monitor. The "256" example in the documentation is using TexturePlusEye mode, which is taking the mirrored headset output and overlaying another texture (the "256") on top of it.
                Hi,friend,I am searching for an answer about how to set my UI only see on PCscreen,not on HMD,I hope UE4 4.17 Sepectator Mode can figure this question,however,it does not work,it drive me mad,I create a widget and add it to viewport,HMD can see this widget,I do not want to make ths widget show on HMD,I just want it show on PCscreen,how should I do ?

                Comment


                  #9
                  I used it capture 1080p 60fps video footage of my game for the very first time. Thanks for this great addition Unreal!

                  Comment


                    #10
                    Link_AJ any details on how you got the BP working?

                    Comment


                      #11
                      Originally posted by mpisc192 View Post
                      Link_AJ any details on how you got the BP working?
                      I guess it's SceneCapture2D component attached to player camera
                      Stand-alone mocap app for Vive Trackers: vrmocapstudio.com
                      Marketplace: Vive Mocap Kit / Fingers Solver / VR IK Body Solver / Subtitles to LipSync / Dialogue System with Character Animation
                      And random stuff at Youtube

                      Comment


                        #12
                        To use 3rd vive controller you have to connect it via USB cable, it will be accessible as 3rd tracked device in blueprints (Get Tracked Device Position and Orientation).

                        This is how I setup spectator screen:
                        0. create render target let say RT_SpectMode,
                        1. make a new Actor (this is very important Actor not a Pawn),
                        2. (Actor) enable player input 0,
                        3. (Actor) script all of a steering,
                        4. (Actor) add SceneCaptureComponent2D, set texture target to RT_SpectMode
                        5. (Any blueprint) at begin play set spectator screen texture to RT_SpectMode
                        Click image for larger version

Name:	pawn_spect.JPG
Views:	427
Size:	343.9 KB
ID:	1353136
                        6. (Console or Blueprint) set Spectator Screen Mode to 6 or 7.
                        7. Create and setup basic vr-pawn (new Pawn, add Camera, add controllers, Eye height at 0, tracking origin floor - oculus etc.)
                        8. Set vr-pawn as default gamemode pawn
                        9. Place spectator actor on map
                        10. THE END

                        You can change render target resolution in render target settings.
                        To fix black bar at the screen when using high resolutions change r.ScreenPercentage to 150 <- it might cause lags
                        To change screen capture fps, disable "capture every frame" and "capture on movement" options, then setup a timer that calls CaptureScene function of SceneCaptureComponent2D component every x seconds, remember to enable loop option. Unfortunately it was lagging as hell when i try to use custom fps. I recommend to keep capture every frame on.
                        Click image for larger version

Name:	spect_preview.JPG
Views:	433
Size:	84.2 KB
ID:	1353135
                        Cheers
                        Attached Files

                        Comment


                          #13
                          Originally posted by Link_AJ View Post
                          I used it capture 1080p 60fps video footage of my game for the very first time. Thanks for this great addition Unreal!
                          How did you do that exactly ? Using a command line or something ?

                          Comment


                            #14
                            We had our own code to output a spectator cam to the main window a year ago and we used OBS to capture the window and combine it realtime with a green screen camera feed. If you do want a realtime result you need to run the game output through a capture card to enable OBS to delay the footage enough to sync with the camera footage. A one system hack way is to use xsplit to rebroadcast the game capture as a directshow device which OBS can then delay like it does with capture cards. For best results you need to render a foreground only view as well to composite on top of your green screen footage. The ideal setup is two machines and two low latency HD or 4k capture cards, one machine to run the VR and spectator views and one to capture and composite the result. That way you have enough guts on the capture machine to composite the video realtime on set and store the raw streams for hi quality compositing in post.

                            Comment


                              #15
                              Originally posted by UgaBuga311 View Post
                              To use 3rd vive controller you have to connect it via USB cable, it will be accessible as 3rd tracked device in blueprints (Get Tracked Device Position and Orientation).

                              This is how I setup spectator screen:
                              0. create render target let say RT_SpectMode,
                              1. make a new Actor (this is very important Actor not a Pawn),
                              2. (Actor) enable player input 0,
                              3. (Actor) script all of a steering,
                              4. (Actor) add SceneCaptureComponent2D, set texture target to RT_SpectMode
                              5. (Any blueprint) at begin play set spectator screen texture to RT_SpectMode
                              Click image for larger version

Name:	pawn_spect.JPG
Views:	427
Size:	343.9 KB
ID:	1353136
                              6. (Console or Blueprint) set Spectator Screen Mode to 6 or 7.
                              7. Create and setup basic vr-pawn (new Pawn, add Camera, add controllers, Eye height at 0, tracking origin floor - oculus etc.)
                              8. Set vr-pawn as default gamemode pawn
                              9. Place spectator actor on map
                              10. THE END

                              You can change render target resolution in render target settings.
                              To fix black bar at the screen when using high resolutions change r.ScreenPercentage to 150 <- it might cause lags
                              To change screen capture fps, disable "capture every frame" and "capture on movement" options, then setup a timer that calls CaptureScene function of SceneCaptureComponent2D component every x seconds, remember to enable loop option. Unfortunately it was lagging as hell when i try to use custom fps. I recommend to keep capture every frame on.
                              Click image for larger version

Name:	spect_preview.JPG
Views:	433
Size:	84.2 KB
ID:	1353135
                              Cheers
                              Awesome thanks!!

                              Comment

                              Working...
                              X