GodotVR / godot_openxr_vendors

Godot 4 wrapper for OpenXR vendors loaders and extensions
MIT License
111 stars 24 forks source link

Contextual Boundary manifest tag is deprecated #210

Closed noahlessard closed 3 weeks ago

noahlessard commented 1 month ago

Setting the meta export setting for Boundary Mode to Contextual adds

<uses-feature
        android:name="com.oculus.feature.CONTEXTUAL_BOUNDARYLESS_APP"
        android:required="true" />

to the android manifest. However, Meta does not allow this in the Quest store, as it is a "experimental" feature. Forums report that changing it to just BOUNDARYLESS_APP fixes this issue, however the point of the boundary being contextual is for it to be disabled only in passthrough. The Meta docs suggest that a flag should be set instead in the OVManager in Unity, however I don't think such a flag exists in Godot's implementation.

    ovrManager.shouldBoundaryVisibilityBeSuppressed = enabled;

Any ideas on how we can get this to work?

Sources: https://developers.meta.com/horizon/documentation/unity/unity-boundaryless/ https://communityforums.atmeta.com/t5/Ideas/Allow-apps-to-disable-boundary-CONTEXTUAL-BOUNDARYLESS-APP/idi-p/1166852/page/2#comments

noahlessard commented 1 month ago

I think I will try and tackle implementing the pieces of the API being used in this OpenXR sample from the meta SDK, as it appears to name the functions that turn the boundary on and off, which would normally be called in Unity. However, any advice on where to look for examples of this being done in the past would be appreciated!

Readme of sample: https://github.com/meta-quest/Meta-OpenXR-SDK/blob/b986077c113eeb6b45cd21384cc2d426511485cf/Samples/XrSamples/XrSceneModel/README.md?plain=1#L14

Actual code snippets: https://github.com/meta-quest/Meta-OpenXR-SDK/blob/b986077c113eeb6b45cd21384cc2d426511485cf/Samples/XrSamples/XrSceneModel/Src/SceneModelXr.cpp

m4gr3d commented 1 month ago

I'll check on the status of the CONTEXTUAL_BOUNDARYLESS_APP attribute, and see if the Godot implementation is missing logic as you mentioned.

m4gr3d commented 1 month ago

@noahlessard I can confirm that CONTEXTUAL_BOUNDARYLESS_APP should no longer be used, so we need to update the plugin to remove its use.

Instead as you mentioned, developers need to either use the BOUNDARYLESS_APP feature to fully disable the boundary, or they need to use the apis exposed by the XR_META_boundary_visibility extension in order to disable / enable the boundary at runtime.

cc @devloglogan @dsnopek

dsnopek commented 1 month ago

they need to use the apis exposed by the XR_META_boundary_visibility extension in order to disable / enable the boundary at runtime

XR_META_boundary_visibility isn't part of the OpenXR spec yet - it's only part of the Meta headers:

https://github.com/meta-quest/Meta-OpenXR-SDK/blob/main/OpenXR/meta_openxr_preview/meta_boundary_visibility.h

So, in order to support this, we'll need to make a final decision about whether or not we can include extensions that (perhaps, optionally) build using these headers.

noahlessard commented 1 month ago

Excited to see the discussion here :) What kinds of factors would go into that decision about including extensions?

dsnopek commented 3 weeks ago

It's mostly stuff about copyright and licenses. We've discussed this a couple times before, but never came to a definitive conclusion. I've added something about it to the agenda of the next Godot XR team meeting.

dsnopek commented 3 weeks ago

I just posted PR https://github.com/GodotVR/godot_openxr_vendors/pull/223 which removes the deprecated option