# Set Up Slicer Virtual reality environment

**URL:** <https://discourse.slicer.org/t/set-up-slicer-virtual-reality-environment/4689>\
**Category:** Support\
**Tags:** virtual-reality\
**Created:** [November 8, 2018, 7:25pm UTC](https://discourse.slicer.org/t/set-up-slicer-virtual-reality-environment/4689 "2018-11-08T19:25:37Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![M\_pavi](https://avatars.discourse-cdn.com/v4/letter/m/54ee81/32.png) [@M\_pavi](https://discourse.slicer.org/u/M_pavi)\
**Post date:** [November 8, 2018, 7:25pm UTC](https://discourse.slicer.org/t/set-up-slicer-virtual-reality-environment/4689/1 "2018-11-08T19:25:37Z")

</div>

I already installed Slicer VR extension and connected HTC VIVE. This works both 4.9 and 4.10. Moreover, I want to do many changes set up VR boundaries like a room. Disable moving of the model and some advanced functionality ( to add volume, to do some visualization and manipulating ). So fat I used slicer python kernel

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/c/0/c0b32ee78a7976c7195821f7a7307fb8bbf82490.png) to do some small changes.  
But when it comes to adding multiple features in VR environment how to do this?  
Is there any platform to develop it?  
The jupyter notebook can support VR development ?

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [November 8, 2018, 9:14pm UTC](https://discourse.slicer.org/t/set-up-slicer-virtual-reality-environment/4689/2 "2018-11-08T21:14:38Z")

</div>

> [@M\_pavi](#):
>
> But when it comes to adding multiple features in VR environment how to do this?  
> Is there any platform to develop it?

SlicerVirtualReality extension is open-source. Source code is available [here](https://github.com/KitwareMedical/SlicerVirtualReality). Pull requests with fixes and improvements are welcome.

> [@M\_pavi](#):
>
> The jupyter notebook can support VR development ?

Yes, you can run scripts in Jupyter notebook that set up VR views, etc. You can also customize behavior by [creating a Python scripted module](https://www.slicer.org/wiki/Documentation/Nightly/Training#Slicer4_Programming_Tutorial).

---

<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:** [November 9, 2018, 2:05pm UTC](https://discourse.slicer.org/t/set-up-slicer-virtual-reality-environment/4689/3 "2018-11-09T14:05:19Z")

</div>

> [@M\_pavi](#):
>
> Disable moving of the model

You can set the Selectable flag on the nodes you don’t want to be movable. You can do it from python or in the Data module by right-clicking the nodes.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [November 9, 2018, 5:42pm UTC](https://discourse.slicer.org/t/set-up-slicer-virtual-reality-environment/4689/4 "2018-11-09T17:42:27Z")

</div>

I’ve updated the [extension’s documentation](https://github.com/KitwareMedical/SlicerVirtualReality#how-to-use-controllers). I think all features that have been implemented are now described.

---

<div class="post-metadata">

**Author:** ![Nicholas.jacobson](https://avatars.discourse-cdn.com/v4/letter/n/ba8739/32.png) [@Nicholas.jacobson](https://discourse.slicer.org/u/Nicholas.jacobson)\
**Post date:** [November 27, 2018, 7:54pm UTC](https://discourse.slicer.org/t/set-up-slicer-virtual-reality-environment/4689/5 "2018-11-27T19:54:11Z")

</div>

Are there some basic recommendations for a graphics cards to run VR. We are getting a lot of lag in our VR movements.

---

<div class="post-metadata">

**Author:** ![M\_pavi](https://avatars.discourse-cdn.com/v4/letter/m/54ee81/32.png) [@M\_pavi](https://discourse.slicer.org/u/M_pavi)\
**Post date:** [November 27, 2018, 7:57pm UTC](https://discourse.slicer.org/t/set-up-slicer-virtual-reality-environment/4689/6 "2018-11-27T19:57:39Z")

</div>

for me I am using GeForce GTX 1080 Ti FTW3 Gaming 11G - slightly expensive was around CAD 2000.

---

<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:** [November 28, 2018, 3:52am UTC](https://discourse.slicer.org/t/set-up-slicer-virtual-reality-environment/4689/7 "2018-11-28T03:52:03Z")

</div>

> [@Nicholas.jacobson](#):
>
> Are there some basic recommendations

It highly depends on what you want to do. If you want to display a few not too complex models, then you don’t need anything fancy. Even if you render a lower resolution MR volume, a 1060 will do. However once you start volume rendering CTs, then you’ll need a high end GPU.

Keep in mind that you can reduce the lag with changing settings. There are FPS and motion sensitivity controls in the VR module to adjust quality vs speed (click the wrench icon next to the VR headset icon in the toolbar to get there). There is an “optimize scene for VR” button on the toolbar as well (looks like a magic wand) that helps with this. Also helps to change the desktop Slicer layout to one that does not have 3D view. You can also play with volume rendering quality settings directly.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [November 28, 2018, 5:36am UTC](https://discourse.slicer.org/t/set-up-slicer-virtual-reality-environment/4689/8 "2018-11-28T05:36:18Z")

</div>

> [@Nicholas.jacobson](#):
>
> We are getting a lot of lag in our VR movements.

@Nicholas.jacobson Make sure you choose Rendering: “VTK GPU Ray Casting” in Volume rendering module.

@cpinter Could you add switching to GPU volume rendering method to “Optimize scene for VR”?

---

<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:** [November 28, 2018, 4:04pm UTC](https://discourse.slicer.org/t/set-up-slicer-virtual-reality-environment/4689/9 "2018-11-28T16:04:12Z")

</div>

I’m implementing the change you suggested. It seems to me that the best way to implement it is to pass the volume rendering logic to the VR logic in order to be able to do this. Let me know if you have a better idea.

I also added this question to the SlicerVR page’s FAQ section.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [November 28, 2018, 5:34pm UTC](https://discourse.slicer.org/t/set-up-slicer-virtual-reality-environment/4689/10 "2018-11-28T17:34:06Z")

</div>

> [@cpinter](#):
>
> pass the volume rendering logic to the VR logic

I think it is the right thing to do.

We should probably add to the extension documentation the list of optimization steps performed.

---

<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:** [November 28, 2018, 6:21pm UTC](https://discourse.slicer.org/t/set-up-slicer-virtual-reality-environment/4689/11 "2018-11-28T18:21:15Z")

</div>

> [@lassoan](#):
>
> We should probably add to the extension documentation the list of optimization steps performed

I did that but then decided to remove it to keep it simple. I was also thinking about pointing to the dox, where in the header the steps are explained. But whatever you think the best…

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [November 28, 2018, 11:33pm UTC](https://discourse.slicer.org/t/set-up-slicer-virtual-reality-environment/4689/12 "2018-11-28T23:33:39Z")

</div>

I agree that it could be too complex to show on the GUI, I just meant to add it to the documentation ([https://github.com/KitwareMedical/SlicerVirtualReality/blob/master/README.md](https://github.com/KitwareMedical/SlicerVirtualReality/blob/master/README.md)).

---

<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:** [November 28, 2018, 11:51pm UTC](https://discourse.slicer.org/t/set-up-slicer-virtual-reality-environment/4689/13 "2018-11-28T23:51:00Z")

</div>

Yes that’s how I understood.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [November 29, 2018, 5:19am UTC](https://discourse.slicer.org/t/set-up-slicer-virtual-reality-environment/4689/14 "2018-11-29T05:19:45Z")

</div>

We can also link to the appropriate header file from the FAQ section for the list of exact steps (so that we don’t need to duplicate information).

---

<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:** [November 29, 2018, 2:53pm UTC](https://discourse.slicer.org/t/set-up-slicer-virtual-reality-environment/4689/15 "2018-11-29T14:53:43Z")

</div>

> [@cpinter](#):
>
> pointing to the dox

Again, that’s what I meant 🙂 I’ll do this then!

---

<div class="post-metadata">

**Author:** ![avimo1](https://avatars.discourse-cdn.com/v4/letter/a/35a633/32.png) [@avimo1](https://discourse.slicer.org/u/avimo1)\
**Post date:** [April 18, 2024, 1:15pm UTC](https://discourse.slicer.org/t/set-up-slicer-virtual-reality-environment/4689/16 "2024-04-18T13:15:16Z")

</div>

Hi,  
Was looking at slicervirtualreality for a project, please refer me to a tutorial of implementing the app in an eSy way.
