# SlicerVirtualReality extension for recent versions

**URL:** https://discourse.slicer.org/t/slicervirtualreality-extension-for-recent-versions/33476
**Category:** Support
**Tags:** extensions-manager, virtual-reality
**Created:** [December 20, 2023, 8:36pm UTC](https://discourse.slicer.org/t/slicervirtualreality-extension-for-recent-versions/33476 "2023-12-20T20:36:37Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![Billuc](https://avatars.discourse-cdn.com/v4/letter/b/f17d59/32.png) [@Billuc](https://discourse.slicer.org/u/Billuc)
#### Post date: [December 20, 2023, 8:36pm UTC](https://discourse.slicer.org/t/slicervirtualreality-extension-for-recent-versions/33476/1 "2023-12-20T20:36:37Z")

</div>

Hi !  
I am new to Slicer, but I am interested in the SlicerVirtualReality extension. I wanted to try it with the latest versions of Slicer (5.6 or 5.7), but I couldn’t find it in the extension manager, while I could find it with Slicer 5.2.2.  
Has this extension not been compiled for the most recent versions ? Do I have to compile it myself if I want to try it out ?

Thanks in advance.  
Luc

---

<div class="post-metadata">

### Author: ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)
#### Post date: [December 21, 2023, 5:00am UTC](https://discourse.slicer.org/t/slicervirtualreality-extension-for-recent-versions/33476/2 "2023-12-21T05:00:09Z")

</div>

I believe it is broken for current stable and preview. Use it with 5.4.

---

<div class="post-metadata">

### Author: ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)
#### Post date: [December 21, 2023, 7:58am UTC](https://discourse.slicer.org/t/slicervirtualreality-extension-for-recent-versions/33476/3 "2023-12-21T07:58:37Z")

</div>

The extension is actively being worked on and you should expect a working OpenVR, OpenXR as well as experimental OpenXRRemoting integration within 1 or 2 weeks. Thanks for your patience 🙏

---

<div class="post-metadata">

### Author: ![Billuc](https://avatars.discourse-cdn.com/v4/letter/b/f17d59/32.png) [@Billuc](https://discourse.slicer.org/u/Billuc)
#### Post date: [January 10, 2024, 4:00pm UTC](https://discourse.slicer.org/t/slicervirtualreality-extension-for-recent-versions/33476/4 "2024-01-10T16:00:58Z")

</div>

@jcfr I tried to use the extension today, as I saw you made updates and the extension was available for Slicer5.6.1. I could install it, but I got some problems…  
I have a Meta Quest 2, so that is maybe part of the reason why I got these problems, but I thought that since I could use SteamVR, it should work.  
The thing is that whatever I do, whatever option I change, whatever data I try to open, I always get the same result : a blank scene, with the controllers at the top of my FOV (moving alongside my head, but also moving when I move the controller) and no model appearing (or not in my FOV).

Are you aware of this ? Or maybe the new version isn’t stable yet ?  
Thanks in advance.  
Luc

---

<div class="post-metadata">

### Author: ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)
#### Post date: [January 10, 2024, 7:19pm UTC](https://discourse.slicer.org/t/slicervirtualreality-extension-for-recent-versions/33476/5 "2024-01-10T19:19:57Z")

</div>

I don’t know if it’s still an issue, but at one point I know that you needed to have some data loaded in the Slicer scene for the VR to initialize correctly.

---

<div class="post-metadata">

### Author: ![Billuc](https://avatars.discourse-cdn.com/v4/letter/b/f17d59/32.png) [@Billuc](https://discourse.slicer.org/u/Billuc)
#### Post date: [January 11, 2024, 8:11am UTC](https://discourse.slicer.org/t/slicervirtualreality-extension-for-recent-versions/33476/6 "2024-01-11T08:11:14Z")

</div>

Unfortunately, I did have some data loaded. I haven’t tried initializing the VR before loading data, might try later…

---

<div class="post-metadata">

### Author: ![petr.raunigr](https://avatars.discourse-cdn.com/v4/letter/p/2acd7d/32.png) [@petr.raunigr](https://discourse.slicer.org/u/petr.raunigr)
#### Post date: [December 11, 2024, 2:40pm UTC](https://discourse.slicer.org/t/slicervirtualreality-extension-for-recent-versions/33476/7 "2024-12-11T14:40:48Z")

</div>

Sorry for re-opening a long dead post… did you (or anyone else) ever figured it out? I’m dealing with the exact same issue… blank space and controllers hanging at top of my FOV (rotating correctly).

Thanks.

---

<div class="post-metadata">

### Author: ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)
#### Post date: [December 11, 2024, 3:23pm UTC](https://discourse.slicer.org/t/slicervirtualreality-extension-for-recent-versions/33476/8 "2024-12-11T15:23:58Z")

</div>

Are you using the latest Slicer? Which backend do you use OpenXR or OpenVR (via SteamVR)?

---

<div class="post-metadata">

### Author: ![petr.raunigr](https://avatars.discourse-cdn.com/v4/letter/p/2acd7d/32.png) [@petr.raunigr](https://discourse.slicer.org/u/petr.raunigr)
#### Post date: [December 12, 2024, 8:55am UTC](https://discourse.slicer.org/t/slicervirtualreality-extension-for-recent-versions/33476/9 "2024-12-12T08:55:26Z")

</div>

Hello, so…

**3D Slicer** : 5.7.0-2024-11-26 r33130 / c5e8d83  
**SlicerVirtualReality** : cloned 3. 12. 2024 (can’t find version info)  
**SteamVR** : 2.8.8  
**Varjo Base** : 4.3.0.14 (available update to 4.5.1.18)

My setup consists of HTC Vive controllers (1st edition) and Varjo Aero headset + SteamVR.

I tried to use SteamVR OpenXR, I also tried to set Varjo (in their software Varjo Base) as an OpenXR provider + OpenVR provider.

In SlicerVirtualReality settings I tried to set OpenXR and also OpenVR but I have the same problem for both of them but there are few differencies.

_(Examples below were captured with no data loaded. It doesn’t matter because even if I load any kind of data the result would be the same)_

**Set OpenXR**

> **Console output**
>
> Switch to module: “Welcome”  
> Switch to module: “VirtualReality”  
> Initializing “OpenXR” XR backend (1/1)  
> void \_\_cdecl qMRMLVirtualRealityView::updateViewFromReferenceViewCamera(void) failed: no reference view node is set  
> Optional extensions HandTracking is supported  
> Runtime Name: SteamVR/OpenXRRuntime Version: 2.8.8  
> Debug: In vtkOpenXRManager.cxx, line 879  
> (nullptr): Successfully got XrSystem with id 1153015959527621024 for HMD form factor.
> 
> System Properties for system id:1153015959527621024, with name “SteamVR/OpenXR : lighthouse”, vendorID=10462  
> Max Layers : 16  
> Max Swapchain Height: 2692  
> Max Swapchain Width : 3140  
> Orientation Tracking: True  
> Position Tracking : True  
> Hand Tracking : 1  
> Runtime supports 1 view configurations  
> Type XR\_VIEW\_CONFIGURATION\_TYPE\_PRIMARY\_STEREO: FOV mutable: True  
> Runtime supports 3 reference spaces:  
> XR\_REFERENCE\_SPACE\_TYPE\_VIEW  
> XR\_REFERENCE\_SPACE\_TYPE\_LOCAL  
> XR\_REFERENCE\_SPACE\_TYPE\_STAGE  
> Debug: In vtkOpenXRManager.cxx, line 1030  
> (nullptr): Runtime supports 8 swapchain formats
> 
> View Configuration View 0  
> Resolution : Recommended: 3140x2692, Max: 8192x8192  
> Swapchain Samples: Recommended: 1, Max: 1  
> View Configuration View 1  
> Resolution : Recommended: 3140x2692, Max: 8192x8192  
> Swapchain Samples: Recommended: 1, Max: 1  
> XR backend " OpenXR " initialized  
> ActionManifestPath: “D:/Slicer\_plugins/SlicerVirtualReality/build\_debug/vtkRenderingOpenXR-build/vtkRenderingOpenXR/”  
> Number of registered displayable manager: 8  
> Registered displayable managers:  
> vtkMRMLModelDisplayableManager  
> vtkMRMLThreeDReformatDisplayableManager  
> vtkMRMLCrosshairDisplayableManager3D  
> vtkMRMLMarkupsDisplayableManager  
> vtkMRMLSegmentationsDisplayableManager3D  
> vtkMRMLTransformsDisplayableManager3D  
> vtkMRMLLinearTransformsDisplayableManager  
> vtkMRMLVolumeRenderingDisplayableManager  
> Debug: In vtkOpenXRManager.cxx, line 264  
> (nullptr): Session started.
> 
> Debug: In vtkOpenXRManager.cxx, line 1197  
> (nullptr): Create action set vtk-actions: VTK actions
> 
> Debug: In vtkOpenXRManager.cxx, line 1349  
> (nullptr): SuggestActions for profile : /interaction\_profiles/khr/simple\_controller
> 
> Debug: In vtkOpenXRManager.cxx, line 1349  
> (nullptr): SuggestActions for profile : /interaction\_profiles/htc/vive\_controller
> 
> Debug: In vtkOpenXRManager.cxx, line 1349  
> (nullptr): SuggestActions for profile : /interaction\_profiles/oculus/touch\_controller
> 
> Debug: In vtkOpenXRManager.cxx, line 1349  
> (nullptr): SuggestActions for profile : /interaction\_profiles/hp/mixed\_reality\_controller
> 
> Debug: In vtkOpenXRManager.cxx, line 1349  
> (nullptr): SuggestActions for profile : /interaction\_profiles/valve/index\_controller
> 
> Debug: In vtkOpenXRManager.cxx, line 1349  
> (nullptr): SuggestActions for profile : /interaction\_profiles/microsoft/hand\_interaction
> 
> Debug: In vtkOpenXRManager.cxx, line 552  
> (nullptr): Could not suggest actions [XR\_ERROR\_PATH\_UNSUPPORTED].
> 
> failed at glDeleteFramebuffers 16 OpenGL errors detected  
> 0 : (1282) Invalid operation  
> 1 : (1282) Invalid operation  
> 2 : (1282) Invalid operation  
> 3 : (1282) Invalid operation  
> 4 : (1282) Invalid operation  
> 5 : (1282) Invalid operation  
> 6 : (1282) Invalid operation  
> 7 : (1282) Invalid operation  
> 8 : (1282) Invalid operation  
> 9 : (1282) Invalid operation  
> 10 : (1282) Invalid operation  
> 11 : (1282) Invalid operation  
> 12 : (1282) Invalid operation  
> 13 : (1282) Invalid operation  
> 14 : (1282) Invalid operation  
> 15 : (1282) Invalid operation
> 
> failed at glDeleteFramebuffers 16 OpenGL errors detected  
> 0 : (1282) Invalid operation  
> 1 : (1282) Invalid operation  
> 2 : (1282) Invalid operation  
> 3 : (1282) Invalid operation  
> 4 : (1282) Invalid operation  
> 5 : (1282) Invalid operation  
> 6 : (1282) Invalid operation  
> 7 : (1282) Invalid operation  
> 8 : (1282) Invalid operation  
> 9 : (1282) Invalid operation  
> 10 : (1282) Invalid operation  
> 11 : (1282) Invalid operation  
> 12 : (1282) Invalid operation  
> 13 : (1282) Invalid operation  
> 14 : (1282) Invalid operation  
> 15 : (1282) Invalid operation
> 
> failed at glDeleteFramebuffers 16 OpenGL errors detected  
> 0 : (1282) Invalid operation  
> 1 : (1282) Invalid operation  
> 2 : (1282) Invalid operation  
> 3 : (1282) Invalid operation  
> 4 : (1282) Invalid operation  
> 5 : (1282) Invalid operation  
> 6 : (1282) Invalid operation  
> 7 : (1282) Invalid operation  
> 8 : (1282) Invalid operation  
> 9 : (1282) Invalid operation  
> 10 : (1282) Invalid operation  
> 11 : (1282) Invalid operation  
> 12 : (1282) Invalid operation  
> 13 : (1282) Invalid operation  
> 14 : (1282) Invalid operation  
> 15 : (1282) Invalid operation
> 
> failed at glDeleteFramebuffers 16 OpenGL errors detected  
> 0 : (1282) Invalid operation  
> 1 : (1282) Invalid operation  
> 2 : (1282) Invalid operation  
> 3 : (1282) Invalid operation  
> 4 : (1282) Invalid operation  
> 5 : (1282) Invalid operation  
> 6 : (1282) Invalid operation  
> 7 : (1282) Invalid operation  
> 8 : (1282) Invalid operation  
> 9 : (1282) Invalid operation  
> 10 : (1282) Invalid operation  
> 11 : (1282) Invalid operation  
> 12 : (1282) Invalid operation  
> 13 : (1282) Invalid operation  
> 14 : (1282) Invalid operation  
> 15 : (1282) Invalid operation

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/7/1/71b28e35f989ab3a852d45946ad87a56c944e5f6.png)  
Instead of a green headset icon + two green controllers icons I get this orange warning (sometimes there are all 3 of them).  
**Also I don’t see controller models in VR but only green triangles.**

**Set OpenVR**

> **Console output**
>
> Switch to module: “Welcome”  
> Switch to module: “VirtualReality”  
> Initializing “OpenVR” XR backend (1/1)  
> void \_\_cdecl qMRMLVirtualRealityView::updateViewFromReferenceViewCamera(void) failed: no reference view node is set  
> XR backend " OpenVR " initialized  
> ActionManifestPath: “D:/Slicer\_plugins/SlicerVirtualReality/build\_debug/vtkRenderingOpenVR-build/vtkRenderingOpenVR/”  
> Number of registered displayable manager: 8  
> Registered displayable managers:  
> vtkMRMLModelDisplayableManager  
> vtkMRMLThreeDReformatDisplayableManager  
> vtkMRMLCrosshairDisplayableManager3D  
> vtkMRMLMarkupsDisplayableManager  
> vtkMRMLSegmentationsDisplayableManager3D  
> vtkMRMLTransformsDisplayableManager3D  
> vtkMRMLLinearTransformsDisplayableManager  
> vtkMRMLVolumeRenderingDisplayableManager

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/a/9/a95e77f024940c45771987b8619d6915b43ce8fb.png)

This time there is a correct icon for a headset and sometimes also for controllers (don’t know what causes controller icons to show up though).

This time I can see controller models in VR but they have the same problem… sitting at top of my FOV. Moreover, I can see a strange cube/square:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/e/b/eb728f1b615b44782a12cdfeeee931d9f44fcd59.png)

**A possible clue**  
I see controllers and the cube (in case of OpenVR) twice… like if it’s rendered for both eyes separately or no depth perception is happening.

**Summary** :  
I tried to use OpenVR, OpenXR, switch between OpenXR/VR provider from SteamVR to Varjo Base and back. I tried loading MHD data and tried VR without loading any data. The only difference I can see are different icons representing VR headset and controllers in 3D Slicer and different controller models in VR (green triangles for OpenXR, correct models for OpenVR) + in case of OpenVR I also see a cube/square. I also can see controller models/triangles + cube for each eye separately.

EDIT:  
If I select OpenVR and in SlicerVirtualReality settings check the “Controller Transform” option this errors spam my console:

> **Console output**
>
> void \_\_cdecl qMRMLVirtualRealityViewPrivate::updateTransformNodeAttributesFromDevice(class vtkMRMLTransformNode \*,enum vtkEventDataDevice,unsigned int) : Unable to retrieve LeftController pose  
> void \_\_cdecl qMRMLVirtualRealityViewPrivate::updateTransformNodeAttributesFromDevice(class vtkMRMLTransformNode \*,enum vtkEventDataDevice,unsigned int) : Unable to retrieve RightController pose

---

<div class="post-metadata">

### Author: ![petr.raunigr](https://avatars.discourse-cdn.com/v4/letter/p/2acd7d/32.png) [@petr.raunigr](https://discourse.slicer.org/u/petr.raunigr)
#### Post date: [December 18, 2024, 12:25pm UTC](https://discourse.slicer.org/t/slicervirtualreality-extension-for-recent-versions/33476/10 "2024-12-18T12:25:55Z")

</div>

Ok, so the problem was more about me not knowing how to work with 3D Slicer rather than a bug in the extension.

As I mentioned, I loaded data, drag and dropped a volume model into the 3D scene and I thought that’s it.

What I needed to do was to check VirtualRealityVIew in the Volume Rendering module (see the screenshot below). Other thing that properly initialized a VR scene was to add one of the 3 CT slices into the 3D scene.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/2/8/2896d91d738e3e576b2522ff58fd008b881a715d.jpeg)

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/9/b/9bbe7f46a64bed6363a8dc96a4a7ea456e76e829.jpeg)

**UX proposition**  
I find it still a bit weird that not doing that I don’t have a properly running VR scene (problems described in the previous post). I would expect that if I don’t properly prepare a model/data that I would at least end up with an empty VR space with controllers properly synced etc.

---

<div class="post-metadata">

### Author: ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)
#### Post date: [December 18, 2024, 3:26pm UTC](https://discourse.slicer.org/t/slicervirtualreality-extension-for-recent-versions/33476/11 "2024-12-18T15:26:35Z")

</div>

The VR view is not added to the views where the volume rendering appears, because by the time you show it, there is no VR view yet. So it needs to be manually added if you do things in this order. Great that you figured this out yourself! (I think that there have been topics here in the forum where we describe this though)

> [@petr.raunigr](#):
>
> empty VR space with controllers properly synced etc.

I agree. I’m not sure why not even the controllers appear. Maybe it’s the result of the undefined view parameters.
