<div dir="ltr"><div class="markdown-here-wrapper" style="font-family:"Lucida Sans",Cantarell,Verdana,sans-serif;color:rgb(11,83,148)"><p style="margin:0px 0px 1.2em!important">Hi Jamil,</p>
<p style="margin:0px 0px 1.2em!important">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 <a href="https://github.com/vruivtk">VruiVTK</a> project on GitHub.</p>
<p style="margin:0px 0px 1.2em!important">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 <code style="font-size:0.95em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(218,218,218);background-color:rgb(232,232,232);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;display:inline">display</code> call initialize <code style="font-size:0.95em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(218,218,218);background-color:rgb(232,232,232);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;display:inline">ExternalVTKWidget</code> to share the existing context with VTK.</p>
<p style="margin:0px 0px 1.2em!important">Hope that helps.</p>
<p style="margin:0px 0px 1.2em!important">Thanks,<br>Sankhesh</p>
<div title="MDH:SGkgSmFtaWwsPGRpdj48YnI+PC9kaXY+PGRpdj5UaGUgT3BlbkdMIGNvbnRleHQgc2hhcmluZyBt
ZWNoYW5pc20gYXMgZXhlcmNpc2VkIGJ5IHZ0a1JlbmRlcmluZ0V4dGVybmFsIG1vZHVsZSB3YXMg
dXNlZCB0byBwcm9kdWNlIGEgYnVuY2ggb2YgZXhhbXBsZXMgZm9yIHJlbmRlcmluZyBWVEsgaW4g
YSBDQVZFIGVudmlyb25tZW50LiBUaGUgZXhhbXBsZXMgYXJlIGF2YWlsYWJsZSBhcyBwYXJ0IG9m
IFtWcnVpVlRLXSg8YSBocmVmPSJodHRwczovL2dpdGh1Yi5jb20vdnJ1aXZ0ayI+aHR0cHM6Ly9n
aXRodWIuY29tL3ZydWl2dGs8L2E+KSBwcm9qZWN0IG9uIEdpdEh1Yi48L2Rpdj48ZGl2Pjxicj48
L2Rpdj48ZGl2PldoaWxlIHRob3NlIGV4YW1wbGVzIHVzZWQgVlJVSSBhcyB0aGUgVlIgZW5naW5l
LCB5b3UgY291bGQganVzdCBhcyBlYXNpbHkgc3dhcCBpdCBvdXQgd2l0aCBGcmVlVlIuIFRoZSBn
ZW5lcmFsIGxvZ2ljIHVzZWQgaXMgdGhhdCBWUlVJL0ZyZWVWUiB3b3VsZCBjcmVhdGUgdGhlIE9w
ZW5HTCBjb250ZXh0LiBJbiB0aGUgZmlyc3QgYGRpc3BsYXlgIGNhbGwgaW5pdGlhbGl6ZSBgRXh0
ZXJuYWxWVEtXaWRnZXRgIHRvIHNoYXJlIHRoZSBleGlzdGluZyBjb250ZXh0IHdpdGggVlRLLjwv
ZGl2PjxkaXY+PGJyPjwvZGl2PjxkaXY+SG9wZSB0aGF0IGhlbHBzLjwvZGl2PjxkaXY+PGJyPjwv
ZGl2PjxkaXY+VGhhbmtzLDwvZGl2PjxkaXY+U2Fua2hlc2g8L2Rpdj4=" style="height:0;width:0;max-height:0;max-width:0;overflow:hidden;font-size:0em;padding:0;margin:0"></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Sat, Apr 7, 2018 at 6:12 AM Jamil Goettlich <<a href="mailto:jamil.goettlich@gmail.com">jamil.goettlich@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">That is all really great information, thank you so much!</div><div dir="ltr"><div><br></div><div>Jamil</div></div><div class="gmail_extra"><br><div class="gmail_quote">2018-04-06 20:46 GMT+02:00 Sgouros, Thomas <span dir="ltr"><<a href="mailto:thomas_sgouros@brown.edu" target="_blank">thomas_sgouros@brown.edu</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">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 <a href="http://github.com/MinVR" target="_blank">github.com/MinVR</a>.<div><br></div><div> -Tom</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_8725481536110844286h5">On Fri, Apr 6, 2018 at 11:05 AM, Andras Lasso <span dir="ltr"><<a href="mailto:lasso@queensu.ca" target="_blank">lasso@queensu.ca</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_8725481536110844286h5">
<div lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="m_8725481536110844286m_-7999947051545284285m_-8089836542670681795WordSection1"><span>
<p class="MsoNormal">> Is there anybody who has displayed unsteady states with VTK in VR and if so what method was used and how was that done?<u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
</span><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">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.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">The source code is available here:
<a href="https://github.com/KitwareMedical/SlicerVirtualReality" target="_blank">https://github.com/KitwareMedical/SlicerVirtualReality</a>. You should be able to find all the implementation details there.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">To try it: Download a recent Slicer nightly version (<a href="https://download.slicer.org" target="_blank">https://download.slicer.org</a>), 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”).<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">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).<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Andras<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> vtkusers <<a href="mailto:vtkusers-bounces@vtk.org" target="_blank">vtkusers-bounces@vtk.org</a>>
<b>On Behalf Of </b>Jamil Goettlich<br>
<b>Sent:</b> Friday, April 6, 2018 10:46 AM<br>
<b>To:</b> vtk <<a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a>><br>
<b>Subject:</b> [vtkusers] General Question to VTK in VR<u></u><u></u></span></p><div><div class="m_8725481536110844286m_-7999947051545284285h5">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">Hello VTK Users,<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">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:<br>
- VR-Toolkit embedding --> Using VTK with the OpenVR API (HMDs)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">- OpenGL context sharing (VTK Rendering External) --> Using existing contexts from other (VR-)Toolkits (Multiple devices)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Until now I have only seen single frames being displayed in VR
<span style="font-family:"Arial",sans-serif;color:#222222;background:white">(in VTK as well as in Paraview)</span>, 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).<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">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.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">My questions are the following:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">- Is there anybody who has displayed unsteady states with VTK in VR and if so what method was used and how was that done?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">- 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 <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">"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. <br>
<br>
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.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Thanks alot,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Jamil<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</div></div></div>
</div>
<br></div></div><span>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://vtk.org/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">https://vtk.org/mailman/listinfo/vtkusers</a><br>
<br></span></blockquote></div><br></div>
</blockquote></div><br></div>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://vtk.org/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">https://vtk.org/mailman/listinfo/vtkusers</a><br>
</blockquote></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div class="inbox-inbox-inbox-inbox-inbox-inbox-inbox-markdown-here-wrapper" style="font-family:"proza libre",sans-serif;color:rgb(0,56,107)"><h5 id="inbox-inbox-inbox-inbox-inbox-inbox-inbox-sankhesh-jhaveri" style="margin:1.3em 0px 1em;padding:0px;font-size:1.1em;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(238,238,238);font-weight:bold;color:rgb(11,65,148)">Sankhesh Jhaveri</h5>
<h6 id="inbox-inbox-inbox-inbox-inbox-inbox-inbox--sr-research-development-engineer-kitware-http-www-kitware-com-518-881-4417" style="margin:1.3em 0px 1em;padding:0px;font-size:1em;color:rgb(11,83,148);font-family:"open sans",sans-serif;font-weight:normal"><em>Sr. Research & Development Engineer</em> | <a href="http://www.kitware.com/">Kitware</a> | (518) 881-4417</h6>
<div title="MDH:PGIgc3R5bGU9ImZvbnQtZmFtaWx5OiB2ZXJkYW5hLCBzYW5zLXNlcmlmOyBjb2xvcjogcmdiKDEx
LCA4MywgMTQ4KTsiPjxmb250IHNpemU9IjIiPiMjIyMjU2Fua2hlc2ggSmhhdmVyaTwvZm9udD48
L2I+PGRpdj48Zm9udCBjb2xvcj0iIzBiNTM5NCIgZmFjZT0idmVyZGFuYSwgc2Fucy1zZXJpZiIg
c2l6ZT0iMiI+PGI+PGJyPjwvYj48L2ZvbnQ+PGRpdj48c3BhbiBzdHlsZT0iZm9udC1mYW1pbHk6
IGFyaWFsLCBzYW5zLXNlcmlmOyBjb2xvcjogcmdiKDExLCA4MywgMTQ4KTsiPjxzcGFuIHN0eWxl
PSJmb250LWZhbWlseTogdmVyZGFuYSwgc2Fucy1zZXJpZjsiPjxpPiMjIyMjIypTci4gUmVzZWFy
Y2ggJmFtcDsgRGV2ZWxvcG1lbnQgRW5naW5lZXIqPC9pPiZuYnNwO3wmbmJzcDs8L3NwYW4+PC9z
cGFuPjxzcGFuIHN0eWxlPSJmb250LWZhbWlseTogdmVyZGFuYSwgc2Fucy1zZXJpZjsgY29sb3I6
IHJnYigxMSwgODMsIDE0OCk7Ij48YSBocmVmPSJodHRwOi8vd3d3LmtpdHdhcmUuY29tLyIgdGFy
Z2V0PSJfYmxhbmsiIHN0eWxlPSJjb2xvcjogcmdiKDE3LCA4NSwgMjA0KTsiPktpdHdhcmU8L2E+
Jm5ic3A7fCZuYnNwOzwvc3Bhbj48c3BhbiBzdHlsZT0iZm9udC1mYW1pbHk6IHZlcmRhbmEsIHNh
bnMtc2VyaWY7IGNvbG9yOiByZ2IoMTEsIDgzLCAxNDgpOyI+KDUxOCkgODgxLTQ0MTc8L3NwYW4+
PGJyPjwvZGl2PjxkaXY+PGRpdj48ZGl2PjxzcGFuIHN0eWxlPSJmb250LWZhbWlseTogdmVyZGFu
YSwgc2Fucy1zZXJpZjsgY29sb3I6IHJnYigxMSwgODMsIDE0OCk7Ij48L3NwYW4+PC9kaXY+PC9k
aXY+PC9kaXY+PC9kaXY+" style="height:0px;width:0px;max-height:0px;max-width:0px;overflow:hidden;font-size:0em;padding:0px;margin:0px"></div></div></div></div>