Set location to start scene with VR plugin. Text not working in VR pluging

Hello,

Firstly, I’m wondering if it is possible to set a starting location for the VR camera. I was hoping for something akin to unity’s camera object, where you can move it in the window. It then always starts from that location. If it were possible to move around with the headset, then it saves that location, that would work.

Second, text seems to not work in world space. The annotations seem to all appear clumped on the screen.

Any help would be appreciated :slight_smile:, Thanks!

set a starting location for the VR camera

This function sets the VR view to match that of an existing 3D view in Slicer:

2D actors cannot be displayed well in stereoscopic vision. You need to use 3D text.

@smallvalthoss it would be great if you could explore this further, maybe with getting advice from the VTK forum. It may be possible to render all the 2D actors at some fixed plane at a convenient reading distance. If needed, we could replace all 2D actors by 3D counterparts at application level, but it would add a lot of complexity.

1 Like

Thank you for the reply! I’m new to 3D slicer as well as creating/modifying extensions, so I appreciate the patience.

Do you know of a way to have it as a 3D object in the scene? So I could position it to start at the same spot every time?

I noticed in the code it sets the magnification to the default of 10x. Would I go in to the code and change that hard-coded bit (line 792) to get the value from the scene window?

@lassoan I will take a look! Thanks :slight_smile:

Where in slicer is it possible to create 3D text?

There are many ways to add 3D text, at various levels. The simplest solution is probably to create a custom markups type, where you change the 3D representation of point labels to use a 3D text actor (any of the classes that you see here, for example vtkTextActor3D or vtkFlagpoleLabel). You can find a complete example of a custom markups node+widget+representation here.

Thank you Andras, I will play around with this

I asked twice on the forum and no one has responded. But still thinking about it

This function does set the same location, but the magnification is always set to 10x. Is there a way of making it the same magnification? Also, wondering about saving the start location when you save the mrml scene node?