Skip to content
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

Add OpenXRRemoting support #151

Merged
merged 4 commits into from
Jan 11, 2024

Conversation

jcfr
Copy link
Contributor

@jcfr jcfr commented Dec 30, 2023

This commit adds support for OpenXR Remoting by adding the OpenXRRemoting and vtkRenderingOpenXRRemoting external projects. It also updates the view node by adding "Remoting" and "PlayerIPAddress" properties. The corresponding UI updates include a checkbox for toggling remoting and a QLineEdit for entering the IP address.

The macro SlicerVirtualReality_HAS_OPENXRREMOTING_SUPPORT is added to vtkMRMLVirtualRealityConfigure.h.in to conditionally include code specific to OpenXR remoting.

The "Remoting" checkbox and "PlayerIPAddress" line edit are disabled if an active connection has been established.

To fix the issue of wglDXRegisterObjectNV failed in RegisterSharedTexture() in OpenXRRemoting, the OpenXRRemoting HelperWindow MultiSamples property is explicitly set to 0.

To ensure that no background is displayed, the background alpha/color/gradient is explicitly set when remoting is used.

The last "Remoting" and "PlayerIPAddress" properties associated with a successful hardware connection are saved to and restored from the settings.


Update OpenXRRemoting from 2.9.1 to 2.9.3: This enables building the SlicerVirtualReality extension against the latest version (2.9.3) of Microsoft.Holographic.Remoting.OpenXr. This aligns SlicerVirtualReality with the corresponding version of the "Holographic Remoting Player" available on the Microsoft Store.

The update relies on VTK changes integrated into the upstream VTK project via vtk/vtk!10814. Additionally, Slicer/VTK fork branches, namely Slicer/VTK#53 for SlicerPreview and Slicer/VTK#54 for SlicerStable, have been synchronized with these changes.

For SlicerPreview, changes have been integrated in Slicer through Slicer/Slicer#7534. In the case of SlicerStable, the updated VTK fork has been manually checked out on the relevant build machines to incorporate the necessary adjustments.

@jcfr jcfr marked this pull request as draft December 30, 2023 08:02
@jcfr jcfr linked an issue Dec 30, 2023 that may be closed by this pull request
@lassoan
Copy link
Collaborator

lassoan commented Jan 3, 2024

This will be awesome! Please also describe in the documentarion how to set up remote rendering using HoloLens (what to install, how to configure, how to start).

@jcfr jcfr force-pushed the add-OpenXRRemoting-support branch 4 times, most recently from e8e082d to 62fcb09 Compare January 9, 2024 04:36
@jcfr jcfr force-pushed the add-OpenXRRemoting-support branch 4 times, most recently from c591a63 to bf5402e Compare January 10, 2024 23:12
jcfr and others added 3 commits January 11, 2024 04:43
Adds SlicerVirtualReality_HAS_OPENXRREMOTING_SUPPORT CMake option
enabling the build of OpenXRRemoting and vtkRenderingOpenXRRemoting
external projects.
This requires VTK MR-10449 (see [1]) backported to Slicer/VTK through
the Slicer PR-7190 (see [2]).

[1] https://gitlab.kitware.com/vtk/vtk/-/merge_requests/10449
[2] Slicer/Slicer#7190

(cherry picked from commit KitwareMedical/SlicerMixedReality@5d5db0b)
This commit updates the view node by adding "Remoting" and "PlayerIPAddress"
properties. The corresponding UI updates include a checkbox for toggling remoting
and a `QLineEdit` for entering the IP address.

The macro `SlicerVirtualReality_HAS_OPENXRREMOTING_SUPPORT` is added to
`vtkMRMLVirtualRealityConfigure.h.in` to conditionally include code specific
to OpenXR remoting.

The "Remoting" checkbox and "PlayerIPAddress" line edit are disabled if an
active connection has been established.

To fix OpenXRRemoting "wglDXRegisterObjectNV failed in RegisterSharedTexture()",
the OpenXRRemoting HelperWindow MultiSamples property is explicitly set to 0.

To ensure no background is displayed, the background alpha/color/gradient is
explicitly set when remoting is used.

The last "Remoting" and "PlayerIPAddress" properties associated with a successful
hardware connection are saved to and restored from the settings.

Co-authored-by: Lucas Gandel <[email protected]>
@jcfr jcfr force-pushed the add-OpenXRRemoting-support branch from a86d1a7 to 9f02ed2 Compare January 11, 2024 10:02
@jcfr jcfr changed the title WIP: Add OpenXRRemoting support Add OpenXRRemoting support Jan 11, 2024
@jcfr jcfr marked this pull request as ready for review January 11, 2024 10:06
@jcfr jcfr linked an issue Jan 11, 2024 that may be closed by this pull request
3 tasks
This enhancement enables building the SlicerVirtualReality extension against
the latest version (2.9.3) of Microsoft.Holographic.Remoting.OpenXr. This aligns
SlicerVirtualReality with the corresponding version of the "Holographic Remoting
Player" available on the Microsoft Store.

The update relies on VTK changes integrated into the upstream VTK project via
vtk/vtk!10814. Additionally, Slicer/VTK fork branches, namely Slicer/VTK#53
for SlicerPreview and Slicer/VTK#54 for SlicerStable, have been synchronized with
these changes.

For SlicerPreview, changes have been integrated in Slicer through Slicer/Slicer#7534.
In the case of SlicerStable, the updated VTK fork has been manually checked out
on the relevant build machines to incorporate the necessary adjustments.
@jcfr jcfr merged commit 8e40bc5 into KitwareMedical:master Jan 11, 2024
@jcfr jcfr deleted the add-OpenXRRemoting-support branch January 11, 2024 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add external project to build vtkRenderingOpenXRRemoting Add support for OpenXR & OpenXRRemoting
2 participants