Immersive Visualization / IQ-Station Wiki
This site hosts information on virtual reality systems that are geared toward scientific visualization, and as such often toward VR on Linux-based systems. Thus, pages here cover various software (and sometimes hardware) technologies that enable virtual reality operation on Linux.
The original IQ-station effort was to create low-cost (for the time) VR systems making use of 3DTV displays to produce CAVE/Fishtank-style VR displays. That effort pre-dated the rise of the consumer HMD VR systems, however, the realm of midrange-cost large-fishtank systems is still important, and has transitioned from 3DTV-based systems to short-throw projectors.
Difference between revisions of "ImmersiveVTK"
(MINOR: sample image reference) |
|||
Line 29: | Line 29: | ||
Immersive VTK is currently only available as a special git development branch known as "<CODE>vtk-stereo</CODE>". | Immersive VTK is currently only available as a special git development branch known as "<CODE>vtk-stereo</CODE>". | ||
<FONT SIZE=26>...</FONT> | <FONT SIZE=26>...</FONT> (Aashish can explain this part) | ||
==How to Compile Immersive VTK== | ==How to Compile Immersive VTK== | ||
< | |||
Basically compilation is no different than any trunk/branch of VTK. | |||
But there are some cmake flags that I set to speed things up since I compile frequently: | |||
* <CODE>% cd build</CODE> | |||
* <CODE>% ccmake ../vtk-stereo</CODE> | |||
** set <CODE>BUILD_EXAMPLES</CODE> to <CODE>OFF</CODE> | |||
** set <CODE>BUILD_SHARED_LIBS</CODE> to <CODE>OFF</CODE> | |||
** set <CODE>BUILD_TESTING</CODE> to <CODE>OFF</CODE> | |||
** set <CODE>VTK_WRAP_TCL</CODE> to <CODE>ON</CODE> (since I use a Tcl script for testing) | |||
** 'c' to configure (may have to repeat once) | |||
** 'g' to generate | |||
* <CODE>% make -j 8</CODE> (or however many threads are desired) | |||
Line 40: | Line 52: | ||
There are several new methods/values associated with the <CODE>vtkCamera</CODE> class designed to enable quick and easy usage of off-axis rendering. | There are several new methods/values associated with the <CODE>vtkCamera</CODE> class designed to enable quick and easy usage of off-axis rendering. | ||
* < | * vtkCamera::SetScreenBottomLeft <x> <y> <z> | ||
* vtkCamera::SetScreenBottomRight <x> <y> <z> | |||
* vtkCamera::SetScreenTopRight <x> <y> <z> | |||
* vtkCamera::SetEyePosition <x> <y> <z> -- really just sets the location of the center of the two eyes | |||
* vtkCamera::SetUseDeeringFrustrum <flag> -- NOTE: new version will remove the extra 'r' | |||
Here are some methods added by Bill: | |||
* vtkRenderWindow::SetXDisplay <screen> -- actually this sets the screen portion of the display (BS: I couldn't figure out how to do strings, so just did the screen number since that's all I need for testing in the CAVE -- and I'll let Kitware do things the proper way). | |||
And for stereo, there are the already-existing methods: | |||
* vtkRenderWindow::SetStereoCapableWindow <flag> -- for active stereo (must be done before the window is opened) | |||
* vtkRenderWindow::SetStereoTypeToCrystalEyes -- for active stereo | |||
* vtkRenderWindow::SetStereoRender <flag> -- set to <CODE>1</CODE> to turn stereo on | |||
==Immersive VTK Internals== | ==Immersive VTK Internals== | ||
Line 54: | Line 78: | ||
** should probably call the <CODE>CreateAWindow()</CODE> method instead of <CODE>XOpenDisplay()</CODE> all over the place. | ** should probably call the <CODE>CreateAWindow()</CODE> method instead of <CODE>XOpenDisplay()</CODE> all over the place. | ||
* Thus the <CODE>vtkRenderWindow</CODE> class should have a value and method to set the display context that is passed down to the hardware handlers (such as <CODE>vtkXOpenGLRenderWindow</CODE>). | * Thus the <CODE>vtkRenderWindow</CODE> class should have a value and method to set the display context that is passed down to the hardware handlers (such as <CODE>vtkXOpenGLRenderWindow</CODE>). | ||
* I get this odd bug where the render window freezes when I first start the tracking loop |
Revision as of 10:45, 14 June 2011
** NOTE: This page is currently unreferenced by the IQ-station wiki, as it is yet preliminary, and thus intended as a means of communication between those working on the effort. However, the page should, as much as possible, be designed with an eye toward being a fully public page. **
Immersive VTK
VTK is a general-purpose visualization library that is widely used by the Scientific Visualization Community. VTK is supported by the commercial company Kitware, Inc.
There are also many general-purpose user-oriented tools built on VTK, including Kitware's ParaView, as well as VisIt.
Recently, Kitware has been supported by Idaho National Lab to add immersive functionality to ParaView. As part of this effort, VTK is also gaining capabilities.
Through now, the focus has been (and still is) on enabling off-axis rendering through the standard vtkCamera
class. Future enhancements will include
This page describes how to compile, configure, and run VTK with these extensions.
How to Run Immersive VTK
- Presently, Bill uses a TCL script he wrote that can read the Vrui 1.0 VRDeviceDaemon protocol and then set the eye/head position from the incoming stream.
- ...
How to Download Immersive VTK
Immersive VTK is currently only available as a special git development branch known as "vtk-stereo
".
... (Aashish can explain this part)
How to Compile Immersive VTK
Basically compilation is no different than any trunk/branch of VTK.
But there are some cmake flags that I set to speed things up since I compile frequently:
% cd build
% ccmake ../vtk-stereo
- set
BUILD_EXAMPLES
toOFF
- set
BUILD_SHARED_LIBS
toOFF
- set
BUILD_TESTING
toOFF
- set
VTK_WRAP_TCL
toON
(since I use a Tcl script for testing) - 'c' to configure (may have to repeat once)
- 'g' to generate
- set
% make -j 8
(or however many threads are desired)
The Immersive VTK API
There are several new methods/values associated with the vtkCamera
class designed to enable quick and easy usage of off-axis rendering.
- vtkCamera::SetScreenBottomLeft <x> <y> <z>
- vtkCamera::SetScreenBottomRight <x> <y> <z>
- vtkCamera::SetScreenTopRight <x> <y> <z>
- vtkCamera::SetEyePosition <x> <y> <z> -- really just sets the location of the center of the two eyes
- vtkCamera::SetUseDeeringFrustrum <flag> -- NOTE: new version will remove the extra 'r'
Here are some methods added by Bill:
- vtkRenderWindow::SetXDisplay <screen> -- actually this sets the screen portion of the display (BS: I couldn't figure out how to do strings, so just did the screen number since that's all I need for testing in the CAVE -- and I'll let Kitware do things the proper way).
And for stereo, there are the already-existing methods:
- vtkRenderWindow::SetStereoCapableWindow <flag> -- for active stereo (must be done before the window is opened)
- vtkRenderWindow::SetStereoTypeToCrystalEyes -- for active stereo
- vtkRenderWindow::SetStereoRender <flag> -- set to
1
to turn stereo on
Immersive VTK Internals
...
Outstanding Issues
- The Deering off-axis rendering code still doesn't work.
:-(
vtkXOpenGLRenderWindow
class- should have the means to specify which display to render to
- should probably call the
CreateAWindow()
method instead ofXOpenDisplay()
all over the place.
- Thus the
vtkRenderWindow
class should have a value and method to set the display context that is passed down to the hardware handlers (such asvtkXOpenGLRenderWindow
). - I get this odd bug where the render window freezes when I first start the tracking loop