How do you capture VR gameplay?

Alright, this may be a bit of a dumb question…

I want to record game play video of my game while I’m wearing the Oculus Rift DK2, but I want my recorded game play footage to be in non-VR mode. Is there a setting I can use to set the output window to be in non-vr mode while I’m playing my game in VR mode?

If you have an NVidia card you can enable ShadowPlay then hit Alt-F10 to save the recorded footage at 1080P/60FPS.

I captured with FRAPS in windows. When you start recording your framerate will drop to 60FPS, and head movements are sickening, but chances are by this point if you’re capturing your VR legs will be strong enough to stand it.

As for capturing with a 2D screen, while you view in VR. I’m not sure if you can. Chances are it might be best to poll the headset, and play the game in 2D mode, while you have the DK2 mounted on top of your head so you still have that head shake, but can still capture in the window.

Youtube has that fancy panorama type thing where you can look any direction by dragging the video, OR load it with VR and use the headset… does Unreal have a way to capture to this format? Perhaps it will get one?

That might require a lot of data though… i’m not sure how this would work. This is kind of a problem. It seems the best way to have a “VR Trailer” for now is to make a short VR demo.

I looked into this and my graphics card is too old to support the shadow play (NVidia GTX 560). It runs VR games well enough, though I have to make sure that my VR scenes don’t use too many translucent particles or my FPS drops.

For recording the gameplay you could maybe look at the network replay feature. Record your game with the VR Headset and afterwards replay the game with a usual camera and record the rendered frames of this camera. But I have no experience with that particular feature.

I guess that ShadowPlay would only record the distorted stereo image for the VR-Headset, because the undistorted image is most likely buried somewhere in a buffer in the render engine.

Regarding the Youtube Panorama videos: You would need a panorama rendering of the scene (i.e 360 by 180 degrees mapped onto a rectangular image). This projection is non-linear and thus can’t be represented by a single 4x4-matrix like the projective camera models which are usually used in Rendering and Gaming. (For more information see for example PBRT by Matt Pharr and Greg Humphreys, Chapter 6)
Since the panoramic projection doesn’t fit into a single matrix I think current graphics cards can’t use their rasterizers for rendering of such an image. The camera would have to be implemented via compute (most probably with a performance loss.)

I guess(!) that Lightmass already contains such a camera, implemented on the cpu. I would love it, if Epic exposed this camera for offline rendering. But AFAIK it is currently buried in the engine core, if it is implemented in Lightmass at all.

I’m still stuck on this problem, but I’ve made a slight bit of progress.

I’m still trying to get a high resolution viewport window to show up so that I can do video capture of my game play for promotional purposes. There is a setting in the editor preferences which enables the HMD orientation to change the camera position within the standard PIE window, but you still can’t see the game within the VR HMD.

Has anyone figured out how to switch the viewport mode during VR Preview to be the standard view? Is there a console command I’m missing? Or is there a mod to the engine source code that needs to be done?

I would advise to add the record functionality to level so save all necessary transforms during game session.

Then load your level in “capture” mode, apply this transforms per tick (or per some time) and make 360 capture frame by frame. I’ve done similar for Martian VR promotional video and everybody been very happy.

Sure, ShadowPlay is the great option, but will not give you possibility to use 360 video playback on Youtube or Gear VR 360 player.

PS. does “stereo on” command is working? :slight_smile:

There is a mode in UE that allows you to “push” the normal window to the monitor. You can record from that using desktop mode for the recording. I’ll try to find it when i build my next lighting.

Pewdiepie used to just capture the one eye and the other half screen was the webcam of him playing. I wonder if you can make a pre-vr-proccessing frame available somewhere to be captured.

OR you could use rama’s custom driver but you would need to re-render everything post-gaming.

Win+G in Windows10

Ah, this is exactly what I needed!!! Thank you.

For everyone else, here are the console commands you need

hmd mirror mode 0|1|2

The screen will be stretched horizontally, so you have to set your viewport size to a square number (such as 800x800) to remove the stretching.

To my knowledge, the resolution should be 4:5 for DK1, 8:9 for DK2 and 9:10 for CV1/Vive for it to appear correctly.

E.g.

640x800 for DK1? (not even sure if it supports this mirroring)

960x1080 or 640x720 for DK2

1080x1200, 972x1080 or 648x720 for CV1/Vive

Off topic: This made me look at the resolution changes for the headsets:
DK1: 1,024,000 pixels
DK2: 2,073,600 pixels (102.5% more pixels than DK1)
CV1/Vive: 2,520,000 pixels (21.5% more pixels than DK2)

Considering the change in required FPS

DK1: 60fps
DK2: 75fps
CV1/Vive: 90fps

You need to be able to push
DK1: 61,440,000 pixels/s
DK2: 155,520,000 pixels/s (153% more pixels/s than DK1)
CV1/Vive: 226,800,000 pixels/s (45.8% more pixels/s than DK2)

This means CV1/Vive is 3.69 time more demanding on your GPU than DK1 before you even get to overdraw… Crazy. What about 4k? 746MPS! or 3.29 times more than CV1, yeah we’re not there yet.

Yep, bandwidth requirements for VR are insane.

HBM will be a godsend.

As to the topic at hand, for those that can’t use Shadowplay, check out Open Broadcasting Software.

I think you have your aspect ratios backwards. The way you have it would cause the vertical size of the screen to be greater than the horizontal.

Through some informal testing, I’ve found that if you have a 1080 monitor, these would be the ideal window settings to use in Windows 7:
1215x1000
(gives 80 px to the border and start menu)

Has anyone had any luck with recording gameplay in shadow play using game preview in windowed mode?

Edit: Upon further testing, it turns out that I’m completely wrong and getnamo is correct. There doesn’t seem to be an easy way to get 6:9 aspect ratio play back in the viewport when viewing in VR.