Simple VR Spectator Camera

18. September 2017 Tutorials 0
Simple VR Spectator Camera

I’m always amazed at the length of the release notes document Unreal puts out with each release.  Epic packs a ton of features into each and every release. It’s easy for new feature to sometimes get overlooked. One that caught my eye in the newest release (4.17) was the ability to set up a spectator camera for VR. This allows you to render one image to the VR headset and a completely different image to the screen. Unfortunately the documentation for this feature seems to be a little sparse. In fact at the time of the writing of this post the link on the unreal release notes for this feature is a dead link going nowhere. Thankfully it wasn’t to hard to figure out so I thought I’d share with you guys what I learned. Adding a spectator camera can be done in 3 easy steps.

  1. Create a Scene Capture Component 2d – Think of this as the camera for the spectator. I attached mine to the character actor that I was already using.
  2. Create a Render Target – This will work as the holding place for the image captured by the scene capture component 2d.
  3. Set your spectator screen mode and texture – The 4.17 came with a few improvements for how you can display to the main view-port with the “Set Spectator Screen Mode Node” including showing just one eye and displaying with or without distortion. For our purposes we just want to set it to a texture and to grab the texture from the render target we made.

And there you go. You should now be able to move that scene capture component 2d anywhere and get a good non-head mounted view of the game-play. Please note that this will impact your frame rate as you now have one more image to render each frame. So use this at your own discretion.


Comment on this post!