OpenXR VR Template | Feedback and Discussion

I also test it by putting the controller under my desk. For the index it takes a few seconds, but the controller returns to the origin when SteamVR loses tracking and the controller icon start blinking in the SteamVR window.

Got a custom build of 4.27 up and running now, and testing it by removing the first two lines inside FOpenXRHMD::GetCurrentPose() that zero out the transforms fixes it for me.

Hey So i was able to to successfully compile GITHUB Oculus version 4.27.1 , eveyrthing works but the moment im trying to build to headset(Quest2) directly (Launch option) headset aplication runing greets me with nice black empty screen in the headset ?

What im missing ?
SDK/NDK/JDK / all the vr settings in project settings are fine (i think)
Pak to APK marked / map list checked
mobile HDR turno off / FR Rendering on /Multivew,Stereo all tha jazz is fine
I tried Vulkan/OpenGL separately and combine and the same result
Start in VR is marked

?

@VictorLerp what are you supposed to put as input to the “world context”? It’s never used in the VR template and I’ve only seen that input in Editor Scripting nodes before…

Screenshot 2022-01-14 115935

Screenshot 2022-01-14 120004

Get HMD Data works (although very ineffective because it just says generic “Windows Mixed Reality” even though that’s all off now and I’m only using OpenXR), but I’ve never managed to get Get Motion Controller Datat to work (no matter how much of a delay I put in front of it), because it always returns “None”.

The World Context input is not used by the OpenXR plugin. It is probably there for legacy reasons.

I was wrong about a delay being necessary for the motion controller data to work. Instead, it will not work until the session comes into focus. When this happens is up to the specific OpenXR runtime. I’ve only tested this with the SteamVR runtime, but it is extremely picky and the headset needs to be worn and the dashboard overlay closed for it to work.

To get the motion controller data, the only option available from Blueprint seems to be to poll for it until it receives a value. See if this will print the controller path to the console when you are wearing the headset with the controller turned on.

What does it mean to “come into focus”? I tried clicking on the preview window, but that did not work either…

I have another gripe with the G2 compability:

Untitled

So the standard Reverb has input mappings for up/down/left/right on the analogue thumbstick, but the G2 does not? Worse, the “Thumbstick X” and “Thumbstick Y” mapping only works for right and up, not left and down… can someonen confirm that I am seeing that right, or am I doing this wrong?

It means when the runtime considers the application being visible in the headset and able to receive input. What this means in practice can vary between runtimes, the OpenXR spec leaves a lot of it up for the runtime to decide. You can see what the spec has to say about it here:
https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#session-states

In most cases it should switch to focused when the user is wearing the headset, the application is rendering and there are no system menus or other apps blocking input to it.

Directional buttons on thumbsticks/trackpads are not properly supported by the OpenXR core spec. I think they are working on a solution, but until then the best option seems to be to use axis actions and manually check the axis values. The 4.27 VR template uses this method for the teleport and snap turns.

This is correct. As soon as the OpenXR spec supports it we’ll update the input mappings to work accordingly.

On the topic of GetMotionControllerData: in 4.27.2 I removed all references to that function in the VR Template and I’m instead using a second pair of motioncontroller components that are referecing “LeftAim, RightAim”-motion sources. We’ll likely see that function being removed in the future and the information accessible directly through the motioncontroller component instead (I’d personally like to see some form of socket-approach for the different motion sources that exist on one controller). There’s QOL-changes planned but currently on hold due to platform and device support for 5.0.

That sounds great. I never noticed there was separate motion sources for the aim poses. This should make it a lot less fiddly than manually setting transforms.

1 Like

@VictorLerp there seems to be some discrepancy between how the Oculus 4.27 build handles the OpenXR plugin and how the Epic 4.27 build does.

The default OpenXR VR template has a separate OculusOpenXR beta plugin. When that is used on the Oculus Unreal build it throws an error because on the Oculus branch engine build, the XR settings have been moved under the OculusVR plugin (the OculusOpenXR beta plugin has been removed). I’m under the impression that Oculus is on a more production ready XR version, though not sure who’s actually lagging here.

Is there any feedback / insight that can be given on when these changes to the XR plugins might be expected to be more unified between the two builds?

I’m currently using the Epic build but was thinking of migrating to the Oculus build for final packaging. Though the discrepancies make this a bit more of a complicated process.

That’s unfortunate. I just got a UDN seat to try to resolve this exact issue, since I finally got that motion controller data node working (by using the “any hand” option and firing an event every second while running until I got something), and was really disappointed that it reports pretty much the same thing as the get hmd device name:

Untitled

I will still open a ticket, because there NEEDS to be a way in Blueprints in Unreal Engine 4 to figure out if you have a Reverb or G2!

If the original Reverb has the standard WMR controllers, according to the OpenXR spec it should report /interaction_profiles/microsoft/motion_controller instead of
/interaction_profiles/hp/mixed_reality_controller.

3 Likes

:man_facepalming:

Whoops.

I was so fixated on seeing “G2” that I missed the forest for all the trees, so to speak.

Thank you for pointing it out to me! I now filter the string for “microsoft” or “hp” and it seems to work. :+1:

Oculus only test their branch for Oculus Devices and the Oculus Runtime. There’s no intention to have the two branches “unified”. We always recommend you use UE-Main as we can’t help or try and reproduce your issues if that’s the branch you’re using.

The OculusOpenXR plugin has been removed in 5.0-Release as Oculus rolled their OpenXR support into the OculusVR plugin. In Project Settings → Plugins → OculusVR there’s now a setting to select which “plugin” you’re using: Legacy, OVR OpenXR, or Native OpenXR:
image

All of the features available in the Legacy OVR plugin doesn’t have counterparts in OpenXR yet and that’s why you’re still seeing the Legacy OVRPlugin as an option. Work is ongoing to deprecate it in favor of 100% OpenXR support.

Well, if Epic did the same for Quest 2 and kept all SDKs up to date and have all the fixes/features Oculus has in their forks, we wouldn’t need Oculus fork :wink: Kinda goes both ways.

Well, this wasted a good hour for me today:

grrr

If you read my previous posts in the thread, I had trouble getting any data from the motion controller, and after I put it in a looping timer it worked… until today when it just stopped (apart from the error message, there should be a controller displaying near the FPS counter since the counter is attached to it).

grrrrrr

Turns out, even if you choose “Any Hand”, only the RIGHT controller (HP Reverb G2) gives any data. :expressionless:

PS. @VictorLerp I noticed that bloom was turned off in the VT Template. Is it really that expensive on modern hardware?

Love it. Would be great if we could get as many Video-Tutorials as possible.
Maybe also Live Streaming Sessions for Q&A?

Keep rocking, this is awesome. Cheers

With mobile being supported in the VR Template by default, pinching where it’s possible is important. I would use it on PC if the art called for it, knowing that it adds extra cost, but remember that not all HMD-lenses are the same and some display significant “glare” in high contrast areas and Bloom can add to that.

2 Likes

@VictorLerp , quick question regarding the VR Template in UE5 P1…you mentioned on the live stream back in September that the template available in UE5 EA was out of date with respect to that of the one shipped with 4.27. Is that still the case with UE5 P1? I did a cursory comparison between the templates in both (P1 vs 4.27) and noticed the largest difference in that of the VR spectator. Unfortunately I don’t have the EA version around anymore to compare against so I can’t tell if it’s a “good” difference or a “bad” one. Thanks.