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.

ImmersiveVTK

From IQ-Station Wiki
Jump to navigation Jump to search

** 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. **

File:Img 7185s.jpg
[1] [2] [3] VTK working on the CAVE front wall. (NOTE: my hosting site doesn't allow Media-Wiki image uploads -- so follow the external link.)

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.

Current Status -- Executive Summary

  • Seems to work okay on front wall of CAVE
  • Does not work on other walls (issues with Deering calculations)
  • Can open multiple Render-Windows on multiple X screens
  • Interface to specify which X11 screen to open on is a hack

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.

  • % vtk
  • vtk% source sphere5.tcl -- a modified version of one of my tutorial applications
  • vtk% source vruidd.tcl -- a link from the Vrui deviceDaemon to VTK
  • check the "Do Tracking" box

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 to OFF
    • set BUILD_SHARED_LIBS to OFF
    • set BUILD_TESTING to OFF
    • set VTK_WRAP_TCL to ON (since I use a Tcl script for testing)
    • 'c' to configure (may have to repeat once)
    • 'g' to generate
  • % 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'
  • vtkCamera::GetModelTransformMatrix -- get the model matrix and then alter it to move the scene relative to the CAVE origin

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).
  • vtkCamera::SetTF1 <flag> -- a generic flag for me to adjust some internal tests
  • vtkCamera::SetTF2 <flag> -- a generic flag for me to adjust some internal tests

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. :-(
    • I (BS) have a hack version that works okay for the front screen, but doesn't work for other screens yet
    • The ComputeScreenOrientation method doesn't use the proper indices (and I don't know whether to do row-major or column-major)
    • The ComputeScreenOrientation should also include the screen's location -- but I don't know how to properly do that yet
  • vtkXOpenGLRenderWindow class
    • should have the means to specify which display to render to
    • should probably call the CreateAWindow() method instead of XOpenDisplay() 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 as vtkXOpenGLRenderWindow).
  • I get this odd bug where the render window freezes when I first start the tracking loop (tested on Ubuntu 9.04):
    • I can unfreeze the window by turning off stereo, then turning it back on, after which I have to reset stereo type to CrystalEyes:
renWin SetStereoRender 0
renWin Render
renWin SetStereoRender 1
renWin SetStereoTypeToCrystalEyes
renWin Render

Other Adjustments

Bill fixed some other issues when entrenched in the code:

  • vtkCamera::PrintSelf method was improved