in VR mode,how to let PC show 1920*1080 single screen

I want to running game in VR mode,PC show single screen like this:

1 Like


You can use these console commands:

‘HMD mirror mode 0’: default

‘HMD mirror mode 1’: Undistorted stereo

‘HMD mirror mode 2’ : Undistorted single eye

‘HMD mirror 960x1080’ : sets mirror window to desired dimensions

But currently, the image is displayed with distortion horizontally.

1 Like

I use these commands and now my preview windows is black!

my engine version is 4.13.1
Edit : I use HTC VIVE.

I’ve tried the solution provided by @svv3dUDN
I’d like to add that you can also set it to:
‘HMD mirror mode 3’
‘HMD mirror mode 4’ This will give you the desired look (tested in 4.13.2)

In case you get a black screen, or you can’t see anymore, the console commands still work, so you can blind type to get into the desired mode

Can you tell us with headset you are using ? I’m working with the Vive and any HMD mirror mode command make my rendering frozen (but the application is not). I’m using 4.14

same here, I’m using the Vive. Oculus specific commands does not work and this seems to be one. Would be nice to have it for Vive!

Having the same problem on HTC Vive.

I ve found my answers in topics below:

“For the Vive use the r.setres x command instead of hmd mirror x.”

1 Like

This fix requires a rebuild of the source code, but apparently it works

Is there any way to fix this and display the VR on windows in full screen (for Vive of course), but without rebuilding the source code?

I’ve done this (I’m using HTC Vive) and the only thing this fix does it’s scales up the screen, so doesn’t show the entire screen (just like you would zoom a video with the center of the zoom to be in the upper left corner).

So there is still no real solution for HTC vive…

Unfortunately without rebuilding some kind of Source Code you currently will not be able to do that. I made a Tutorial Video about it a few months ago, so go and check it out:

Thank you Stormtiger for the tutorial you’ve created. It helped a lot more than the other fixes.
Just to be clear - your solution takes the LEFT eye of the Vive and uses the biggest area it can to display on the monitor right?

You will get the same image as it appears in the headset, so same FOV with the black edges. If you want a wider FOV without the edges you’d need to implement some way of displaying the view from a different camera on the monitor (then maybe position that other camera in the same position as the VR one)

For anybody still looking at this year old thread, a better solution in my opinion than changing the engine source code is to using another pawn to mirror the camera movement of the player. With a system like this, we were able to record this: YouTube

The advantage is that you can render at full resolution, or a custom resolution like 4k. You are rendering from a different machine, so it won’t affect the framerate of the player using the headset. You have also full control on the fov and post processing effects, you could get motion blur on the capture when it is not desirable in the headset. You can also lerp the motion of the controllers and the camera in the capture and not for the player. The downside is that you have to replicate everything, but it is pretty easy to do within unreal engine, and there is plenty of documentation about it out there.

The process on how we use that system is the main player would start the map as a listen server, another player would join the game, then we would type a console command like ‘StartSpectate’ and it would spawn a new type of pawn that gathers every players on the map, and lerp its position and rotation to a target pawn. Then use the player controller to possess that pawn and destroy the old one.

Overall, a little bit more complicated to setup but it’s worth it.

Hi Sigfreud!

I’m in your same condition, and I think your method would be the perfect match for my project I’m developing!

But, can I ask you to explain in detail the step you used to achieve this result?

I know i ask a lot! Thanks for share your results with us!

By the way, very good video you recorded, maybe it would be awesome to add the interaction with the Leap Motion!

Hey xmario,

Glad I can help. I assume you have a more than working knowledge of UE4 so I’ll be explaining in broad terms, but let me know if you need clarifications on anything.

I first create a new pawn pawn class with only a camera component. I add a variable to store a reference to a pawn actor. I have a function that gather all the pawns in the level, and store it in an array, we’ll call that function Initialize(). When that function is called, I update my pawn reference to the first element of that array. You can have a function that cycle through the array and updates the pawn reference, if you expect to have multiple players in the level.

In Tick(), I use that pawn reference to update that camera component relative transform to the one of the pawn we are tracking. I also need to set the actor transform of that pawn to the transform of the tracking pawn actor.

That’s about it for the pawn class, you can set the camera settings you need, such as fov and post processing effects, in that pawn.

In the player controller, I add a function to switch the possessed pawn to a new instance of the spectator pawn. I also have helpful functions like changing the fov. You also need to turn off the 3D rendering. You can use the console command ‘stereo off’. I make those functions executable in the console but you can also bind them to some unused keys, or an UI.

After that’s set up, package and start your game, open a level with the console command ‘open MyLevel?listen’ on the computer you want to record from. Then on another computer, start a game and join the other player with their ip address ‘open ip-here’. Once both players are connected, and you setup the replication correctly, use the function to switch the pawn to the spectator pawn on the computer you want to record with, and record away while somebody plays the game.

This can be done completely in Blueprints. I hope this clarifies things a bit. It’s really not that bad to setup.

1 Like

Sigfreud, I own you a beer :smiley:

I used your informations to build a similar system and it worked like a charm!

Many thanks, and I hope this explanation will help other !

Just remove Saved directory before next launch of project. Black screen issue will gone. It appears because commands above are for Oculus. For Vive you should use “r.setres 1080x720” and “HMD mirror 2”.

Hey Sigfreud, Thanks so much for this explanation, however, no matter what I do, my spectator character will not lock the movements of the headset. I am extremely close to a deadline with current project which requires me to have the oculus CV1 running in an environment and a 4k output from the level. I was almost able to get this to work, but something seems to go wrong when I package the project. I would be unimaginably greatfull if you could send me a project with this setup built into it, or send screenshots of your node structures. Thank you so much in advance. P.s. I will be tasked with attempting to get 16x9 stereoscopic (squeezed) output after I get your solution running. I haved messed around with the --emulatestereo option in the exe, however it seems as though, the stereo channels are swapped. I saw that one person had a solution by downloading the engine source, changing the camera distance to a negative value and recompiling, then repackaging his project in his custom version of the engine. If you have any suggestions on how to get around this, that would be amazing.