Windows Mixed Reality for SteamVR

Windows Mixed Reality for SteamVR

charles_a Dec 17, 2017 @ 3:28pm
No way to get native resolution; causes issues for Unreal Engine 4
UE4 scales things as a percentage of native screen res (up until the latest master branch which switched to always being a multiple of RecommendedRenderTargetSize).


It uses this:

if (vr::IVRExtendedDisplay *VRExtDisplay = vr::VRExtendedDisplay())
{
VRExtDisplay->GetWindowBounds(X, Y, Width, Height);
}

But with WindowsMR that is returning the Vive/Rift resolution (2160x1200) when used with my Lenovo explorer. The aspect of this doesn't match the aspect of GetRecommendedRenderTargetSize, and this triggers a bug in UE 4.18.

It is more or less ok in UE4's master branch on github and in 4.17, but causes any games built on 4.18 to have the right eye pushed too far to the right.

Also, since the ExtendedDisplay interface is quasi deprecated, I tried to make a patch that would move UE4 to using vr::Prop_DisplayMCImageWidth_Int32 and vr::Prop_DisplayMCImageHeight_Int32 to query the display parameters, and these seem to be failing ETrackedPropertyError::TrackedProp_UnknownProperty on mixed reality devices.
< >
Showing 1-4 of 4 comments
Rwalker123 Dec 18, 2017 @ 6:53am 
Sure would be nice if Microsoft open sourced the driver so things like this could be fixed.
killian Dec 18, 2017 @ 7:10am 
You can work around this by building the following commit which fixes the issue on top of 4.18.1:
https://github.com/EpicGames/UnrealEngine/pull/4294/commits/1fd3a9a6d6c5f1cd56a2adb09833e7968f6e2c5b

We are working to get this fix into the next release of 4.18

I would also recommend:
r.ScreenPercentage to 150
vr.SteamVR.PixelDensityAdaptive 0
charles_a Dec 18, 2017 @ 2:52pm 
Hey Killian, I've seen that commit, but it changes the behavior of things (screenpercentage becoming a percentage of ideal resolution instead of native resolution). 4.18 has caused several issues including with Oculus and we are trying to get a pull request together that will fix it all (that pull request still leaves things broken with Oculus too and changes intended behavior).

The Oculus seems to be because the GetRecommendedRenderTargetSize has a different aspect ratio than the real native screen res. The Windows MR issue is happening because the GetRecommendedRenderTargetSize is the same aspect as native screen res, but VRExtDisplay->GetWindowBounds gives the same aspect as Vive and Rift.

To get a real fix that will resolve everything, we need a way to get the native res of Windows MR headsets.

The current master branch (what will become 4.19) changes the meaning of r.screenpercentage to be a percentage of vr.PixelDensity * GetRecommendedRenderTargetSize, and will work fine without it.

But without some way to query the native panel res 4.18 games are always going to be flakey on Windows MR even with the pull request you mentioned.
charles_a Dec 19, 2017 @ 2:32pm 
I've added a pull request here that should fix things on Oculus and WindowsMR:

https://github.com/EpicGames/UnrealEngine/pull/4356

But without a way to query native screen res, WindowsMR devices are going to still be baselined on Vive/Rift resolution with the fix. It just better handles the differing aspect ratios.
< >
Showing 1-4 of 4 comments
Per page: 1530 50

Date Posted: Dec 17, 2017 @ 3:28pm
Posts: 4