-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hololens2 MixedRealityToolkit and OpenCV samples port for OpenXR ? #96
Comments
@sahilagnihotri The WinRT APIs for HoloLens 2 research mode and they as they are will continue to work on HoloLens 2. We don't have plan nor have enough resource to replace every single HL2 samples in the past few years with openxr APIs. We believe we've provided enough sample code for developers to learn and compose together for wide variety of scenarios. If you'd like to see specific feature coverage for OpenXR usage on HL2, let us know. The MRTK document mentioned OpenXR will replace WinRT in the context of Unity integration, not the platform itself. MRTK in future version of Unity 2021 will be OpenXR only on HoloLens2. |
I was asking it in context to custom 3D engines (they still exists :-), not unity and unreal ) as we were planning to add Hololens 2 openXR support in our dx11 and dx12 renderer. |
@yl-msft I second @sahilagnihotri request. How would you adapt e. g. Microsoft's Holographic face tracking sample (https://docs.microsoft.com/samples/microsoft/windows-universal-samples/holographicfacetracking/) using the OpenXR API? I can't seem to find a way to get HoloLens 2 PV Camera pixel data using OpenXR, as some were also wondering for other devices (https://community.khronos.org/t/access-to-raw-undistored-image-from-headset-camera/107936). As I understand, this can only be achieved using proprietary vendor extensions. I'm aware of Microsoft XR_MSFT_secondary_view_configuration and XR_MSFT_first_person_observer extensions for HoloLens 2. But as outlined in the overview of the latter, "The runtime is responsible for composing the application’s rendered observer view onto the camera frame based on the chosen environment blend mode for this view configuration, as this extension does not provide the associated camera frame to the application." Scenarios involving image processing prior to hologram reprojection are numerous. Think about drawing labels as holograms following people/objects identified in the surrounding environment, for example. Or does it mean that for such use cases, we're stuck with the legacy WinRT API? How would you then interop the HolographicSpace API in the context of an OpenXR UWP app? |
@emaschino , @sahilagnihotri , There are several different usages for the PV Camera on HoloLens 2 that's typically get confused, let me try to explain
I also understand the old sample code holographicfacetracking was using c++/cx, and can be hard to convert to a game engine. You will need to convert the sample code to use c++/winrt for the MediaCapture logics. Unfortunately our team don't have resource to make such conversion for you. |
@yl-msft Thank you for clarifying the various usages. One thing that still puzzles me in the second use case is how do you access the frame data, such as PV camera pose? Once you got a MediaFrameReference, what's the difference between getting the associated camera pose with MediaFrameReference::CoordinateSystem() and then SpatialCoordinateSystem::TryGetTransformTo() or the approach that you described in #88? As you outlined there, We've not publish the sample code on this yet, but here are some code snippet for you to get started. We will clean up our internal sample and publish here to github soon. I can't find any update on the subject, so don't know if the proposed solution is still relevant. As also emphasized in this SO question, documents and samples about the OpenXR XR_MSFT_spatial_graph_bridge extension are a bit lacking. |
Hi! Is there any plan for porting the MixedRealityToolkit and opencv code samples that are here: https://github.com/microsoft/HoloLens2ForCV/tree/main/Samples and
https://github.com/microsoft/MixedRealityToolkit to work with OpenXR as the documentation says that WinRT is legacy now ?
The text was updated successfully, but these errors were encountered: