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/INT/Platforms/VR/VRSpectatorScreen/index.html

Is this the view?
52674835fbb77f7ab7520caef6f18efd2b9d3280.jpeg

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?

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.

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…

Be a pal and let me know.

It worked fine for me in editor: boots playing horizon vanguard - YouTube

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.

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?

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.

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 ?

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

@Link_AJ any details on how you got the BP working?

I guess it’s SceneCapture2D component attached to player camera :slight_smile:

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
  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.


Cheers

How did you do that exactly ? Using a command line or something ?

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.

Awesome thanks!!

r.setres 1920x1080f

anyone please explain how to use interactable UI in texture of the “Set Spectator Screen Texture”?

Hello, is there a simple way to render a foreground-only image to the spectator screen? This would normally be everything between the HMD and the camera, to be used in composing the final MR footage.

I’m trying to use the Spectator Screen to have a simple watermark display over desktop computer screen (mirrored). Works great unless I’m using an image with an alpha layer… then it discards the alpha. Anyone have any ideas? For Non-VR games I did this with the HUD, but I don’t want the watermark showing to the person inside the HMD.

I have managed to get a 2D texture in the spectator screen, but the orientation for my vive tracker is all wrong. Location is correct, but in order to get it to work, I had to invert some math. I made a spect actor. I want to use this to make a mixed reality trailer. I work in a green screen space. So what I want to do is strap the tracker to a camera, and record the screen in 1080p with the texture renderer and a real camera. Here is what my current BP Looks like. The rotation just jitters out no matter what I do. The quality of my 2d texture is poor though. I don’t know how to increase the quality either. Some insight as to where i’d need these nodes to be in order to function would really help.