Search Unity

Official Unity support for OpenXR in preview

Discussion in 'AR/VR (XR) Discussion' started by rickmus, Dec 17, 2020.

Thread Status:
Not open for further replies.
  1. MichaelJWilliams

    MichaelJWilliams

    Joined:
    Apr 19, 2020
    Posts:
    4
    1.16.8 beta does fix the previous problem with the thumbstick not being recognised, but unfortunately it seems to introduce this new problem where the face buttons and trigger buttons don't get recognised by themselves, but do fire when the thumbstick is clicked.

    I gather this is an issue with SteamVR's OpenXR runtime though, and so there isn't much Unity can do about it, is that correct?
     
    Hobodi likes this.
  2. the_real_apoxol

    the_real_apoxol

    Unity Technologies

    Joined:
    Dec 18, 2020
    Posts:
    467
    Yes but I will report this to valve right now.
     
    Hobodi and MichaelJWilliams like this.
  3. the_real_apoxol

    the_real_apoxol

    Unity Technologies

    Joined:
    Dec 18, 2020
    Posts:
    467
    If you have a project you are willing zip up that I can look at I can verify that it is not a Unity issue.
     
  4. Hobodi

    Hobodi

    Joined:
    Dec 30, 2017
    Posts:
    101
    We can simply check it with XR Interaction Debugger as i did on gif in this post.
    Trigger, primary, secondary and menu buttons are not working now.
    The stick button activates several other buttons at once.
    Grip and stick directions works fine.

    Also, android quest build without OpenXR using same input and work a little better.
    The stick no longer activates several buttons, but the trigger still does not work.

    Is it possible that the mapping profile is not correct?
     
    Last edited: Mar 4, 2021
  5. the_real_apoxol

    the_real_apoxol

    Unity Technologies

    Joined:
    Dec 18, 2020
    Posts:
    467
    I reported the issue to Valve and I believe they are working on some fixes. However it sounds like there is something else going on as Android / Quest build should not have these issues. Would need to see how the project is set up to get a better idea what is going on though. I dont believe there are any known issues with Android / Quest builds involving input not working.
     
  6. Hobodi

    Hobodi

    Joined:
    Dec 30, 2017
    Posts:
    101
    [QUOTE="the_real_apoxol, post: 6899660, member: 6421624]I dont believe there are any known issues with Android / Quest builds involving input not working.[/QUOTE]

    Yes indeed. Everything worked on android, my mistake. Sorry.
    Now I understand why the error can be on the side of the Valves and not working correctly through Steam VR.

    At the moment, those who are developing can use the Oculus plugin + link + XR input. It works well and the all buttons are work.
    It also works through VD, we can create a bat file to run a Unity project using Oculus.
    Code (CSharp):
    1. "C:\Program Files\Virtual Desktop Streamer\VirtualDesktop.Streamer.exe" "U:\UNITY SOFT\Unity Editors\2020.2.1f1\Editor\Unity.exe" -projectpath U:\UNITYPROJECTS\yourprojectfolder -useHub -hubIPC -cloudEnvironment production
    @the_real_apoxol thank you for writing to Valve. Now we will wait for them.
     
    Last edited: Mar 4, 2021
  7. alloystorm

    alloystorm

    Joined:
    Jul 25, 2019
    Posts:
    88
    This is only things that holds me back from upgrading to 2020.2. Good to know that Valve is looking at this issue and will continue to keep a close eye on this.
     
  8. john_primitive

    john_primitive

    Joined:
    Jan 4, 2019
    Posts:
    7
    Unfortunately I set up the ActionBasedController and the Vive Menu button and touchpad are still not interactive. This is definitely an issue with the HTC Vive Controller Profile v 0.0.1 in XR Plug-in Management > OpenXR

    Tested on:
    -Unity 2020.2.7f1
    -XR Plugin Management 4.0.1
    -OpenXR Plugin 1.0.2
    -SteamVR 1.16.8
     
  9. NemesisWarlock

    NemesisWarlock

    Joined:
    Jan 21, 2017
    Posts:
    140

    Have you checked the XR itneraction Toolkit's XR Input Debugger?

    it seems that there are some other issues with Vive input, that should hopefully be fixed soon.
     
    john_primitive likes this.
  10. psychicparrot

    psychicparrot

    Joined:
    Dec 10, 2007
    Posts:
    884
    Same here. No matter what I do I can't get the menu button going - it doesn't show up in the XR Interaction Debugger or the Input Debugger, either. Looks like it's not coming through at all :(
     
    Last edited: Mar 5, 2021
  11. nukadelic

    nukadelic

    Joined:
    Aug 5, 2017
    Posts:
    78
    When can we expect to see support for PrimaX and other alternative headsets ?
     
  12. the_real_apoxol

    the_real_apoxol

    Unity Technologies

    Joined:
    Dec 18, 2020
    Posts:
    467
    Yes indeed. Everything worked on android, my mistake. Sorry.
    Now I understand why the error can be on the side of the Valves and not working correctly through Steam VR.

    At the moment, those who are developing can use the Oculus plugin + link + XR input. It works well and the all buttons are work.
    It also works through VD, we can create a bat file to run a Unity project using Oculus.
    Code (CSharp):
    1. "C:\Program Files\Virtual Desktop Streamer\VirtualDesktop.Streamer.exe" "U:\UNITY SOFT\Unity Editors\2020.2.1f1\Editor\Unity.exe" -projectpath U:\UNITYPROJECTS\yourprojectfolder -useHub -hubIPC -cloudEnvironment production
    @the_real_apoxol thank you for writing to Valve. Now we will wait for them.[/QUOTE]


    I was told there is a hotfix out that fixes the input issues (beta version of steamvr runtime)
     
    MichaelJWilliams and Hobodi like this.
  13. NemesisWarlock

    NemesisWarlock

    Joined:
    Jan 21, 2017
    Posts:
    140
    It's up to the headset manufacturer to support the OpenXR platform, not the other way around.
     
  14. MichaelJWilliams

    MichaelJWilliams

    Joined:
    Apr 19, 2020
    Posts:
    4
    The hotfix (beta 1.16.9) fixes this for me (Oculus Quest 1, Windows) - thanks!
     
    Last edited: Mar 6, 2021
  15. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,454
    It's out of Unity's hands, Khronos group have not added that to OpenXR yet, you can verify this by checking the current docs here
    https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrObjectType

    I will try to contact the team to ask about this as they have their own forums
     
  16. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,454
    This alludes (to me at least) that the group are doing something about this already- the best I could find was this forum post on their forums, have you had any update on this internally?

    https://community.khronos.org/t/support-for-multiple-trackers-with-openxr/106012
     
  17. Hotshot10101

    Hotshot10101

    Joined:
    Jun 23, 2012
    Posts:
    223
    I can confirm the Quest 2 using Virtual Desktop and SteamVR now works with the controllers and OpenXR...including all of the touch events.

    It is awesome.

    @the_real_apoxol Did you guys have something to do with this or did Steam just fix it?
     
    mfuad likes this.
  18. mainsasch

    mainsasch

    Joined:
    Jan 20, 2018
    Posts:
    4
    Hi, i get this warning with OpenXr Plugin 1.0.2
    "Could not create a device for 'HP HP Reverb G2 Controller (OpenXR) (XRInputV1)' (exception: System.InvalidOperationException: Cannot find parent 'devicepose' of control 'devicepose/istracked' in layout 'XRInputV1::HP::HPReverbG2ControllerOpenXR'

    With the version before i have no problems.
     
  19. the_real_apoxol

    the_real_apoxol

    Unity Technologies

    Joined:
    Dec 18, 2020
    Posts:
    467
    It may be possible that the mixed reality package needs to be updated? Check to see if there are any updates available there. I am looking into it further and will get back to you.
     
  20. the_real_apoxol

    the_real_apoxol

    Unity Technologies

    Joined:
    Dec 18, 2020
    Posts:
    467

    Looks like there is a new version of the mixed reality plugin (0.1.4). I tried that locally and it seems to work, let me know if that works for you.
     
  21. the_real_apoxol

    the_real_apoxol

    Unity Technologies

    Joined:
    Dec 18, 2020
    Posts:
    467
    Valve fixed it after we forwarded on the reports from everyone here.
     
  22. mainsasch

    mainsasch

    Joined:
    Jan 20, 2018
    Posts:
    4
    Hi, I´m using mixed reality plugin (0.1.4). When i activate g2 in feature sets i get this warning. With 0.1.2 preview there is no warning.
    But beside that I have another problem too. I also don't get any position data via Xr Controller (action-based) input. Everything works with the old input system. I wonder if the G2 controllers are not working with the new input systme. I'm probably just missing something.
     
  23. yl-msft

    yl-msft

    Microsoft Employee

    Joined:
    Jul 24, 2020
    Posts:
    10
    We recently got the bug report on G2 controllers and the error info indicate the pose is not correctly hooked up. We also suspect the bug might leads to pose invalid. We are internally investigating, will ping back when we have more info.
     
  24. psychicparrot

    psychicparrot

    Joined:
    Dec 10, 2007
    Posts:
    884
    Hi all!

    I really need help with this..

    On my HTC Vive Pro, I'm occasionally getting nothing but a black screen and the console is getting spammed with:

    [XR] [OpenXR Input]: [xrLocateSpace] Failed to locate view space relative to app space at time <121124088423011> [ErrorCode: XR_ERROR_TIME_INVALID]

    But it doesn't happen all the time - seemingly random and not very frequent. More frequently, I have a tester running a HTC Vive Cosmos and they're getting that same error every time.

    As well as spamming the console with 'failed to locate view space..' when OpenXR initializes, it's dumping out this:


    [XR] [17392] [18:17:48.052][Info ] OpenXRSession::HandleSessionStateChangedEvent: state XR_SESSION_STATE_UNKNOWN->XR_SESSION_STATE_IDLE session=2657295863264 time=123134288969800
    [XR] [17392] [18:17:48.052][Info ] OpenXRSession::HandleSessionStateChangedEvent: state XR_SESSION_STATE_IDLE->XR_SESSION_STATE_READY session=2657295863264 time=123134288984000
    [MODES] ModeService[default].RefreshMenus
    [MODES] ModeService[default].UpdateModeMenus
    [XR] [12468] [18:17:48.557][Error ] XrResult failure [XR_ERROR_TIME_INVALID]
    Origin: xrLocateSpace
    Source: C:\build\output\unity\xr.sdk.openxr\NativePlugin\Source\unity_input.cpp:2177
    Error on graphics thread: 1


    Anybody got any suggestions? I've tried a whole bunch of random stuff like moving things around/changing my controller init code .. but I'm getting nowhere with it :(

    Thanks!
     
  25. the_real_apoxol

    the_real_apoxol

    Unity Technologies

    Joined:
    Dec 18, 2020
    Posts:
    467
    What runtime are you using ?
     
  26. psychicparrot

    psychicparrot

    Joined:
    Dec 10, 2007
    Posts:
    884
    Hey! I'm running Unity 2020.2.7 with XR Plugin 4.0.1 and OpenXR plugin 1.0.2
     
  27. the_real_apoxol

    the_real_apoxol

    Unity Technologies

    Joined:
    Dec 18, 2020
    Posts:
    467
    Which runtime though? StamVR/Oculus/etc.
     
  28. psychicparrot

    psychicparrot

    Joined:
    Dec 10, 2007
    Posts:
    884
    Oh sorry .. that was silly of me! SteamVR 1.16.8
     
  29. the_real_apoxol

    the_real_apoxol

    Unity Technologies

    Joined:
    Dec 18, 2020
    Posts:
    467
    Unfortunately I do have personally have any HTC devices to test with but I am going to mention this to valve and see if we can get some more info.
     
  30. psychicparrot

    psychicparrot

    Joined:
    Dec 10, 2007
    Posts:
    884
    Thanks! I really appreciate it :)
     
  31. hasseyg

    hasseyg

    Joined:
    Nov 16, 2013
    Posts:
    81
    Hi, I am calling TryGetBoundaryPoints and it returns true, but the list is empty. this is for the OpenVR plugin.

    thanks
     
    Cazforshort likes this.
  32. Totalschaden

    Totalschaden

    Joined:
    Dec 14, 2013
    Posts:
    44
    We switched to OpenXR Plugin 1.0.2 from OpenVR XR (Valve). With the Plugin from Valve we had the option to select the target eye for the Desktop Mirror (Left/Right/None). Where "None" resultet in Black Desktop Window (No Mirror).

    How can I disable the Mirroring with OpenXR Plugin ?
     
  33. the_real_apoxol

    the_real_apoxol

    Unity Technologies

    Joined:
    Dec 18, 2020
    Posts:
    467
    I belive the
    XRDisplaySubsystem.SetPreferredMirrorBlitMode
    method should do what you want. The OpenVR code was limited to what can be done with public APIS so I assume it was just using this method for that drop down.
     
  34. Totalschaden

    Totalschaden

    Joined:
    Dec 14, 2013
    Posts:
    44
    Thanks this is what I was looking for.

    Btw, the Headset seems to disconnect from displaying anything but SteamHome App when you take the Game binary out of focus for a while and then get it back to foreground, does not reconnect anymore, until you restart the Game. Same in the Editor.
     
  35. XenotechSrl

    XenotechSrl

    Joined:
    Dec 2, 2020
    Posts:
    5
    We're trying to build on Hololens 2 using this setup.
    After building the VS project from Unity, we can build the project from VS 2019 but the application gets stuck at startup with 4 spheres moving, before the Unity logo is shown. VS shows an error when starting the app on the device: DEP6701: Bootstrapping failed with unexpected error: ArgumentNullException - Value cannot be null. Error Parameter name: projectUniqueName [0x80004003]
    The scene is a blank scene with just a camera and a cube. Not using MRTK, only the setup linked, the Unity OpenXR plugin and the Unity XR Interaction Toolkit.
    Tried several different build configurations, but none of them works.
    Anyone got the same issue and/or have any clue on what's happening?
    Thanks!
     
  36. yarsrvenge

    yarsrvenge

    Joined:
    Jun 25, 2019
    Posts:
    87
    Are there plans to add compositor layer features to the OpenXR plugin? There were ways to do this with the Oculus SDK (OVROverlay) and SteamVR. This is useful for lots of things but loading screens is a big one as it is smooth, not impacted by any stutters during load, offers better readability for text, etc. If there is a way to do it now I'm not aware of I'd love to know, I'm trying to go all in with XR. Based on the XR specs it looks like this capability is there in the draft specs?
     
  37. rickmus

    rickmus

    Unity Technologies

    Joined:
    Sep 10, 2017
    Posts:
    10
    Yes, we have plans on implementing compositor layers for OpenXR ( and probably only that platform ), relatively soon, but don't have a specific timeframe I can share yet.
     
  38. yarsrvenge

    yarsrvenge

    Joined:
    Jun 25, 2019
    Posts:
    87
    Thanks!
     
  39. yl-msft

    yl-msft

    Microsoft Employee

    Joined:
    Jul 24, 2020
    Posts:
    10
    For those who is using HP Reverb G2 controller, today we released a new version (0.1.5) of Mixed Reality plugin that fixed issues when using G2 controller. Please upgrade and let us know if this addressed the issue you've seen.
    upload_2021-3-15_19-19-53.png
     
  40. mainsasch

    mainsasch

    Joined:
    Jan 20, 2018
    Posts:
    4
    Hi, Thank You. I have tested the version with Unity 2020.3 and have not found any errors so far. What I am missing now is a possibility to use a model of the controller as is easily possible with the steamvr plugin. There has to be a model of the controller installed in the system, but how can I use it with Unity and Openxr?
     
  41. eunited

    eunited

    Joined:
    Oct 29, 2020
    Posts:
    5
  42. FlodLab

    FlodLab

    Joined:
    Feb 6, 2013
    Posts:
    30
    @UnityGuys
    Is there already a bug tracked for that? We could not find it.
     
  43. timewizardgames

    timewizardgames

    Joined:
    Dec 16, 2017
    Posts:
    3
    The SteamVR 1.16 Hotfix remedied my OpenXR Oculus input problems, but the 1.17 beta update broke all inputs. I reverted back to 1.16 and it's back to working order again. Just a heads up for people working with Oculus!
     
  44. Totalschaden

    Totalschaden

    Joined:
    Dec 14, 2013
    Posts:
    44
    Are you aware if the Issue that with OpenXR when you Focus another Programm, after a few sec, the Headset will show a Steam Home Popup containing the Project name and Waiting.... when you click back into the game (focus), this popup will stay forever, not "reconnecting" to the game

    This happens in binary and editor.

    Unity 2020.3.0f1
    SteamVr 1.17.1
    OpenXR 1.0.3
    URP Project

    Edit: Managed to fix it.
     
    Last edited: Mar 19, 2021
  45. runeberg-valve

    runeberg-valve

    Joined:
    Jan 28, 2020
    Posts:
    34
    I can't seem to repro this - are you able to share Editor logs and a SteamVR system report:
    upload_2021-3-20_5-45-48.png

    upload_2021-3-20_5-45-55.png
     
  46. runeberg-valve

    runeberg-valve

    Joined:
    Jan 28, 2020
    Posts:
    34
    We've put a fix for the menu in the latest beta 1.17:
    https://steamcommunity.com/games/250820/announcements/detail/3032584660736824619

    Let me know if this works for you
     
    john_primitive likes this.
  47. NemesisWarlock

    NemesisWarlock

    Joined:
    Jan 21, 2017
    Posts:
    140
    We've had a Shadow Drop of 1.0.3 of the OpenXR plugin...

    But the changelog is still at 1.0.2?
     
  48. the_real_apoxol

    the_real_apoxol

    Unity Technologies

    Joined:
    Dec 18, 2020
    Posts:
    467
    This build only removed "Preview" from the ui, no other changes.
     
  49. Cloudwalker_

    Cloudwalker_

    Joined:
    Jan 3, 2014
    Posts:
    140
    Can you provide an update on the controller pivot offsets. Are they going to be fixed to not require manual adjustments by users?

    As an asset publisher I need to know if I should adding this to my interaction framework like I did for OpenVR adjustments.

    Thanks.

    Edit: Also any updated timeline on Index finger tracking?
     
  50. the_real_apoxol

    the_real_apoxol

    Unity Technologies

    Joined:
    Dec 18, 2020
    Posts:
    467
    What is the specific issue with controller pivot offsets ?
     
Thread Status:
Not open for further replies.