[vtkusers] General Question to VTK in VR

Sankhesh Jhaveri sankhesh.jhaveri at kitware.com
Sat Apr 7 15:45:23 EDT 2018


Hi Jamil,

The OpenGL context sharing mechanism as exercised by vtkRenderingExternal
module was used to produce a bunch of examples for rendering VTK in a CAVE
environment. The examples are available as part of VruiVTK
<https://github.com/vruivtk> project on GitHub.

While those examples used VRUI as the VR engine, you could just as easily
swap it out with FreeVR. The general logic used is that VRUI/FreeVR would
create the OpenGL context. In the first display call initialize
ExternalVTKWidget to share the existing context with VTK.

Hope that helps.

Thanks,
Sankhesh
​

On Sat, Apr 7, 2018 at 6:12 AM Jamil Goettlich <jamil.goettlich at gmail.com>
wrote:

> That is all really great information, thank you so much!
>
> Jamil
>
> 2018-04-06 20:46 GMT+02:00 Sgouros, Thomas <thomas_sgouros at brown.edu>:
>
>> I'm sure the preceding answers to the question will be more than enough
>> to satisfy the OP, but there is yet another way, a project called MinVR
>> that is in alpha, but is meant to be a generic and relatively
>> straightforward way to convert any old 3D graphics program to VR, and that
>> is compatible with a wide range of displays, including head-mounted
>> displays like the Oculus and HTC, caves, desktop VR displays, and regular
>> laptop and desktop screens. I'm working on vtk examples now to illustrate
>> its use with vtk, not that I'm all that fluent in that dialect. This is a
>> joint project of people at UMinn and Brown University, and can be found at
>> github.com/MinVR.
>>
>>  -Tom
>>
>> On Fri, Apr 6, 2018 at 11:05 AM, Andras Lasso <lasso at queensu.ca> wrote:
>>
>>> > Is there anybody who has displayed unsteady states with VTK in VR and
>>> if so what method was used and how was that done?
>>>
>>>
>>>
>>> Yes! 3D Slicer has an awesome VR viewer. With a single click, the 3D
>>> scene appears in your headset and the application remains fully interactive
>>> – you can manipulate objects both on the desktop using keyboard and mouse,
>>> and using VR controllers in the VR view. You can also view dynamic content,
>>> such as 4D volumes even using volume rendering.
>>>
>>>
>>>
>>> The source code is available here:
>>> https://github.com/KitwareMedical/SlicerVirtualReality. You should be
>>> able to find all the implementation details there.
>>>
>>>
>>>
>>> To try it: Download a recent Slicer nightly version (
>>> https://download.slicer.org), install SlicerVirtualReality extension
>>> from Slicer’s extension manager. After you loaded your data you just need
>>> to click the VR headset button on the toolbar (“Show scene in virtual
>>> reality”).
>>>
>>>
>>>
>>> Limitations: There is a bug in volume rendering that clips the volume at
>>> unexpected locations (Kitware is working on a fix, expected to be ready
>>> soon). Position of objects that are moved using VR controllers are not yet
>>> synchronization back to the scene displayed in the main window (this is the
>>> next focus of development).
>>>
>>>
>>>
>>> Andras
>>>
>>>
>>>
>>>
>>>
>>> *From:* vtkusers <vtkusers-bounces at vtk.org> *On Behalf Of *Jamil
>>> Goettlich
>>> *Sent:* Friday, April 6, 2018 10:46 AM
>>> *To:* vtk <vtkusers at vtk.org>
>>> *Subject:* [vtkusers] General Question to VTK in VR
>>>
>>>
>>>
>>> Hello VTK Users,
>>>
>>>
>>>
>>> I have some general questions to the current state of VR in VTK. Please
>>> let me know if this is not the right place to ask questions about that.
>>> According to what I have read (among others "Enhancements to VTK enabling
>>> scientific visualization in immersive environments") there are two
>>> favourized ways of bringing VTK into VR:
>>> - VR-Toolkit embedding --> Using VTK with the OpenVR API (HMDs)
>>>
>>> - OpenGL context sharing (VTK Rendering External) --> Using existing
>>> contexts from other (VR-)Toolkits (Multiple devices)
>>>
>>>
>>>
>>> Until now I have only seen single frames being displayed in VR (in VTK
>>> as well as in Paraview), not unsteady state (e.g. in ParaView 5.3,
>>> OpenVR version, I cannot press the play button and send the content to
>>> OpenVR, I can only see one frame on the HMD).
>>>
>>> From what I have seen so far, the VR-Plugin of ParaView does not use any
>>> of the two methods. They are using the library VRPN for interacting but all
>>> the rest is done within ParaView.
>>>
>>>
>>>
>>> My questions are the following:
>>>
>>> - Is there anybody who has displayed unsteady states with VTK in VR and
>>> if so what method was used and how was that done?
>>>
>>> - Is there any paper or detailled documentation to the OpenGL context
>>> sharing method? I did not find alot to that except from the testing example
>>>
>>> "TestGLUTRenderWindow.cxx" which I was not able to build properly until
>>> now. Also, if anyone has experience using FreeVR with VTK OpenGL context
>>> sharing method, I would be very interested in that too.
>>>
>>> I hope my questions are appropriate (and not too widespread) and I would
>>> be very happy to be pointed to some current sources, especially concerning
>>> unsteady state simulations with VTK in VR. I would be very happy for anyone
>>> to share their own experiences or some current papers to that topic.
>>>
>>>
>>>
>>> Thanks alot,
>>>
>>>
>>>
>>> Jamil
>>>
>>>
>>>
>>> _______________________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Please keep messages on-topic and check the VTK FAQ at:
>>> http://www.vtk.org/Wiki/VTK_FAQ
>>>
>>> Search the list archives at: http://markmail.org/search/?q=vtkusers
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> https://vtk.org/mailman/listinfo/vtkusers
>>>
>>>
>>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> https://vtk.org/mailman/listinfo/vtkusers
>
-- 
Sankhesh Jhaveri *Sr. Research & Development Engineer* | Kitware
<http://www.kitware.com/> | (518) 881-4417
​
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://vtk.org/pipermail/vtkusers/attachments/20180407/8e052340/attachment.html>


More information about the vtkusers mailing list