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 "ImmersiveParaView"

From IQ-Station Wiki
Jump to navigation Jump to search
(Added some configuration tips and some issues)
m (Minor date correction)
 
(11 intermediate revisions by the same user not shown)
Line 8: Line 8:
==How to Run Immersive ParaView==
==How to Run Immersive ParaView==


# make sure the MPI daemon is running
# if rendering to more than one immersive screen make sure the MPI daemon is running
#: <CODE>% mpd &</CODE>
#: <CODE>% mpd &</CODE>
# make sure the PARAVIEW_ROOT environment variable points to your Build directory
# make sure the PARAVIEW_ROOT environment variable points to your Build directory
#: <CODE>% export PARAVIEW_ROOT=/opt/ParaView-3.10.1/Build</CODE>
#: <CODE>% export PARAVIEW_ROOT=/opt/ParaView-v4.3.1-source/Build</CODE>
#: or <CODE>% setenv PARAVIEW_ROOT /opt/ParaView-3.10.1/Build</CODE>
#: or <CODE>% setenv PARAVIEW_ROOT /opt/ParaView-v4.3.1-source/Build</CODE>
# Run the ParaView server application (perhaps in the background)
# Run the ParaView server application (perhaps in the background)
#: This is where the screen configuration file is specified (see below)
#: This is where the screen configuration file is specified (see below)
#: <CODE>% (mpiexec -np 1 ${PARAVIEW_ROOT}/bin/pvserver /path/iqstation.pvx &)</CODE>
#: Again, the use of MPI is only needed when running more than one screen, so your choices are:
#: <CODE>% ${PARAVIEW_ROOT}/bin/pvserver /path/iqstation.pvx &</CODE>
#: or
#: <CODE>% (mpiexec -np 2 ${PARAVIEW_ROOT}/bin/pvserver /path/iqstation.pvx &)</CODE>
#: &nbsp;
#: NOTE: you can skip this step altogether if you specify this command in the "Command" method of server Startup in the configuration of the server (done in the ParaView client).  You should use complete paths for the server executable and .pvx file to be safe.
# Run the ParaView client w/ stereo and tracker options
# Run the ParaView client w/ stereo and tracker options
#: <CODE>% ${PARAVIEW_ROOT}/bin/paraview --stereo --stereo-type="Checkerboard" --server=localhost --vrpn --vrpn-address=head@156.56.14.123</CODE>
#: <CODE>% ${PARAVIEW_ROOT}/bin/paraview --stereo --stereo-type="Checkerboard" --server=local-pvserver</CODE>
#: or <CODE>% ${PARAVIEW_ROOT}/bin/paraview --stereo --stereo-type="Checkerboard" --server=localhost --vrui --vrui-address=localhost</CODE>
#: or <CODE>% ${PARAVIEW_ROOT}/bin/paraview --stereo --stereo-type="Checkerboard" --server=local-pvserver</CODE>
#:: Other common options for <CODE>stereo-type</CODE>:
#:: Other common options for <CODE>stereo-type</CODE>:
#::* "Anaglyphic"
#::* "Anaglyphic"
#::* "CrystalEyes"  (ie. active stereo glasses)
#::* "CrystalEyes"  (ie. quad-buffer stereo mode -- which should be renamed!)


==How to Test-Run Immersive ParaView==
==How to Test-Run Immersive ParaView==
Line 29: Line 34:
#: <CODE>% setenv PV_ICET_WINDOW_BORDERS 1</CODE>
#: <CODE>% setenv PV_ICET_WINDOW_BORDERS 1</CODE>
# Run the ParaView server application
# Run the ParaView server application
#: <CODE>% paraview --server=localhost
#: <CODE>% paraview --server=local-pvserver</CODE>


==How To Build Immersive ParaView==
==How To Build Immersive ParaView==
Line 35: Line 40:
* Install missing dependencies
* Install missing dependencies
*: Commonly needed packages include:
*: Commonly needed packages include:
*:* mpich2
*:* qt4-devel (version 4.8 or later)
*:* mpich2-devel
*:*: NOTE: if you compile MPI yourself, you '''MUST compile the shared-object libraries'''
*:* ...
*:* ...
* Download the latest source (3.10.1 as of this writing):
* Download the latest source (4.3.1 as of this writing):
*:: [http://paraview.org/paraview/resources/software.html http://paraview.org/paraview/resources/software.html]
*:: [http://www.paraview.org/download/ http://www.paraview.org/download/]
*: NOTE: the pre-built packages do not contain the new position-tracking plugins
*: NOTE: the pre-built packages do not contain the immersive position-tracking plugin
* Untar/unzip the source ball
* Untar/unzip the source ball
*: E.g. <CODE>% tar -zxf ParaView-3.10.1.tar.gz</CODE>
*: E.g. <CODE>% tar -zxf ParaView-v4.3.1-source.tar.gz</CODE>
* Make a build directory:
* Make a build directory:
*: <CODE>% mkdir ParaView-3.10.1/Build</CODE>
*: <CODE>% mkdir ParaView-v4.3.1-source/Build</CODE>
*: <CODE>% cd ParaView-3.10.1/Build</CODE>
*: <CODE>% cd ParaView-v4.3.1-source/Build</CODE>
* Use Cmake (or ccmake) to enable the immersive options:
* Use Cmake (or ccmake) to enable the immersive options:
*:* Start the CMake process
*:*# hit 'c' to configure
*:*: NOTE: you may get an error that CMake cannot find Qt version 4.7.0 or later.  If this is the case, you will have to set the QT_QMAKE_EXECUTABLE option in the next section.
*:*# hit 'e' to exit the help (ie. warning) screen
*:* General options:
*:* General options:
*:** set BUILD_SHARED_LIBS to ON
*:** set BUILD_TESTING to OFF  (optional)
*:** set CMAKE_BUILD_TYPE to "Release" (optional)
*:** set PARAVIEW_ENABLE_PYTHON to ON
*:** set PARAVIEW_USE_MPI to ON
*:** set PARAVIEW_USE_MPI to ON
*:** set QT_QMAKE_EXECUTABLE to path of qmake or qmake-qt4
*:*# hit 'c' to continue
*:*: This will generate new options (indicated by asterisk, or yellow background)
*:* Immersive Interface options:
*:* Immersive Interface options:
*:** For VRPN:
*:** set PARAVIEW_BUILD_PLUGIN_VRPlugin to ON
*:*** PARAVIEW_BUILD_PLUGIN_VRPNPlug set to "ON"
*:*# hit 'c' to continue
*:*** VRPN_INCLUDE_DIR set appropriately (perhaps "/usr/local/include")
*:** set PARAVIEW_USE_VRPN to ON
*:*** VRPN_LIBRARY set appropriately (perhaps "/usr/local/lib/libvrpn.a")
*:** set PARAVIEW_USE_VRUI to ON
*:** For Vrui:
*:*# hit 'c' to continue
*:*** PARAVIEW_BUILD_PLUGIN_VRUIPlug set to "ON"
*:** set VRPN_INCLUDE_DIR appropriately (perhaps "/usr/local/include")
*:*** ParaView_DIR set to the build directory (perhaps "/opt/ParaView-3.10.1/Build") -- only needed until a bug in cmake config file is fixed
*:** set VRPN_LIBRARY appropriately (perhaps "/usr/local/lib/libvrpn.a")
*:* Now make the application
*:* Now make the application
*:*# hit 'c' to configure
*:*# hit 'c' to configure
*:*# if you get an error message page: hit 'e' to exit that page
*:*# if you get an error message page: hit 'e' to exit that page
*:*#: NOTE: you may get an error that ParaView can't handle QT version 4.7.0 -- ignore this
*:*#: NOTE: you may get an error message that you now need to set values for MPI_C_INCLUDE_PATH and MPI_C_LIBRARIES -- if you set these, hit 'c' again
*:*# hit 'g' to generate the makfiles
*:*# hit 'g' to generate the makefiles
*:*# run make
*:*# run make
*:*#: <CODE>% make -j 8</CODE>
*:*#: <CODE>% make -j 8</CODE>
Line 73: Line 89:
But here are some things to keep in mind:
But here are some things to keep in mind:
* ParaView is "unit-less", so whatever units you choose will affect the size of how they are rendered.
* ParaView is "unit-less", so whatever units you choose will affect the size of how they are rendered.
** Presently, using "feet" as the units in the <CODE>.pvx</CODE> file is probably the best choice.
** Presently: using "feet" as the units in the <CODE>.pvx</CODE> file is probably the best choice.
* ParaView is Y-UP, and Z-towards you (i.e. out of the screen)
* ParaView is Y-UP, and Z-towards you (i.e. out of the screen)
* Things don't seem to work well if a screen is located on the Z=0 plane (and that may be true of other planes as well).
* Things don't seem to work well if a screen is located on the Z=0 plane (and that may be true of other planes as well).
* Tracking only works on the views rendered by <CODE>pvserver</CODE> not the <CODE>paraview</CODE> client application.
* Tracking only works on the views rendered by <CODE>pvserver</CODE> not the <CODE>paraview</CODE> client application.


==New Issues==
These are some issues that have recently been encountered (or in some cases reencountered).
This list is not to imply that the previous "Issues" and "VTK Issues" lists are not still
pertinent &mdash; though it's possible some of those issues have indeed been resolved by
now, but more likely than not some of these are probably still outstanding.
* '''BUG:''' The VRPN Address line in the VR Panel disallows numeric entry.  This makes it impossible to set a port number.
* '''BUG-ish:''' The .pvvr configuration file has a <TT>&lt;TrackerTransform&gt;</TT> entry that is inaccessible from the GUI.


==Issues==
==Issues==
* stereo appears in the main PV window, even though that is typically a mono-screen -- so question is, how to control which windows are stereo, and which are not
These may be issues related directly to the new immersive features of ParaView, or they may just be bugs that were encountered as we work through the needs of ParaView for immersive users.
* When running with full-screen pvserver renderings, ParaView (or QT controlled by ParaView, or maybe down in the VTK library) disables all window movement and keyboard input for all other windows (even the non-ParaView ones)!  Of course, since it disables text into ParaView itself, that makes it hard to type in parameters.  This is definitely a bug!  One workaround is to use Alt-Ctrl, and even though the other windows don't appear, it can cause keyboard input focus to be placed in the specified window.
* '''BUG:''' stereo appears in the main/client PV window, even though that is typically a mono-screen -- so question is, how to control which windows are stereo, and which are not.
* the "--server=localhost" option does not seem to work -- ParaView bug?
*: '''Answer:''' Stereo-mode for the "pvserver" windows should be specified in the ".pvx" file, not inherited from the master "paraview" client.
* Scroll wheel moves objects in Z (i.e it's not altering their size)
* '''NOTE:''' There presently is no means of doing side-by-side stereo in VTK/ParaView.
* '''BUG:''' When running with full-screen pvserver renderings, ParaView (or QT controlled by ParaView, or maybe down in the VTK library) disables all window movement and keyboard input for all other windows (even the non-ParaView ones)!  Of course, since it disables text into ParaView itself, that makes it hard to type in parameters.  This is definitely a bug!  One workaround is to use Alt-Ctrl, and even though the other windows don't appear, it can cause keyboard input focus to be placed in the specified window.
*: '''Answer:''' remove the call to "XGrabKeyboard()" in "vtkXOpenGLRenderWindow.cxx".
* '''NOTE:''' the "--server=<server name>" option takes a name as assigned in the server configurator, not an actual machine name or address
* '''NOTE:''' Scroll wheel moves objects in Z (i.e it's not altering their size)
* '''NOTE:''' ParaView is Y-up in the server views (also Y-up by default in the client, but that can be altered).
* '''BUG:''' When a server configuration is created as a "Command Line" version, but no command is give, ParaView core-dumps from an ASSERT -- rather than say: put a warning in the ''"Output Messages"'' dialog box.
* '''BUG:''' Loading the "minimalvr.pvsm" state file causes the camera view-normal to be set to (0,0,0), which is a singularity -- thus nothing gets rendered until one of the camera buttons is pressed.  Note that minimalvr.pvsm doesn't set anything called view-normal -- though it does set an up vector -- but it sets that to (0,1,0) not (0,0,0).
* '''BUG:''' (at least for me) When loading an object that is planar, ParaView automatically goes into "2D" mode, and points the camera at the plane.  ''How can this be disabled through user-input, command-line as well as state-file?''
* '''Question:''' Why does the camera distance start at 6.69?  And how can that be changed?
 
 
==VTK fixes required==
* The removal of "XGrabKeyboard()" as mentioned in "Issues" section.
* The addition of the ability to do left/right viewport stereo (and top/bottom).
* The addition of the names "QuadBuffer" and "StereoBuffer" to the form of stereo now anachronistically called "CrystalEyes".
 
 
=See Also=
Some other pages describing Immersive ParaView installations and uses.
* [http://www.vtk.org/Wiki/ParaView/Users_Guide/CAVE_Display Kitware ParaView Wiki instructions on using Immersive ParaView]
* [https://docs.google.com/document/d/1XQTv5sayJGZY3jCwcbqxqeH9a-hEXtgPw0AoGuYlt5s/edit Starting up VR ParaView in the DIVE] -- documentation for the Duke 6-sided CAVE (Google Doc)
* [[OpenVR_ParaView]]
* [https://discourse.paraview.org/t/xrinterface-virtual-reality-plugin-menu-redesign/11601 XRInterface (Virtual Reality) Plugin: Menu Redesign] (ParaView Discourse)
 
=Links to Old Immersive ParaView wiki pages=
As the options to CMake and the ParaView command line options are still in a state of flux while the Immersive features migrate from prototype to a more end-user version, changes to the instructions between ParaView releases can also be drastic.  So if you happen to be working with an older version of ParaView, and are looking to access the immersive features, then you should try to use the instructions from the page that best matches the version used.
 
As an aid, here are links to previous versions of this page that were designed for older ParaView releases:
* [http://wiki.iq-station.com/index.php?title=ImmersiveParaView&oldid=111 ParaView 3.10.1 VRPlugin instructions (July 2012)]
* [http://wiki.iq-station.com/index.php?title=ImmersiveParaView&oldid=116 ParaView 3.14.1 VRPlugin instructions (August 2012)]
* [http://wiki.iq-station.com/index.php?title=ImmersiveParaView&oldid=258 ParaView 4.3.1 VRPlugin instructions (~July 2015)]

Latest revision as of 21:49, 21 December 2023

Immersive ParaView

ParaView is a good general-purpose visualization tool built on VTK (Visualization ToolKit). Recently, virtual reality features have begun to be incorporated into the main trunk of ParaView. This page describes how to compile, configure, and run ParaView with these extensions.

How to Run Immersive ParaView

  1. if rendering to more than one immersive screen make sure the MPI daemon is running
    % mpd &
  2. make sure the PARAVIEW_ROOT environment variable points to your Build directory
    % export PARAVIEW_ROOT=/opt/ParaView-v4.3.1-source/Build
    or % setenv PARAVIEW_ROOT /opt/ParaView-v4.3.1-source/Build
  3. Run the ParaView server application (perhaps in the background)
    This is where the screen configuration file is specified (see below)
    Again, the use of MPI is only needed when running more than one screen, so your choices are:
    % ${PARAVIEW_ROOT}/bin/pvserver /path/iqstation.pvx &
    or
    % (mpiexec -np 2 ${PARAVIEW_ROOT}/bin/pvserver /path/iqstation.pvx &)
     
    NOTE: you can skip this step altogether if you specify this command in the "Command" method of server Startup in the configuration of the server (done in the ParaView client). You should use complete paths for the server executable and .pvx file to be safe.
  4. Run the ParaView client w/ stereo and tracker options
    % ${PARAVIEW_ROOT}/bin/paraview --stereo --stereo-type="Checkerboard" --server=local-pvserver
    or % ${PARAVIEW_ROOT}/bin/paraview --stereo --stereo-type="Checkerboard" --server=local-pvserver
    Other common options for stereo-type:
    • "Anaglyphic"
    • "CrystalEyes" (ie. quad-buffer stereo mode -- which should be renamed!)

How to Test-Run Immersive ParaView

This example shows how to run Immersive ParaView in a desktop window in order to test tracking. (This test does not require the use of MPI.)

  1. Set the environment variable to create windowed-output from the ParaView server
    % setenv PV_ICET_WINDOW_BORDERS 1
  2. Run the ParaView server application
    % paraview --server=local-pvserver

How To Build Immersive ParaView

  • Install missing dependencies
    Commonly needed packages include:
    • qt4-devel (version 4.8 or later)
    • mpich2-devel
      NOTE: if you compile MPI yourself, you MUST compile the shared-object libraries
    • ...
  • Download the latest source (4.3.1 as of this writing):
    http://www.paraview.org/download/
    NOTE: the pre-built packages do not contain the immersive position-tracking plugin
  • Untar/unzip the source ball
    E.g. % tar -zxf ParaView-v4.3.1-source.tar.gz
  • Make a build directory:
    % mkdir ParaView-v4.3.1-source/Build
    % cd ParaView-v4.3.1-source/Build
  • Use Cmake (or ccmake) to enable the immersive options:
    • Start the CMake process
      1. hit 'c' to configure
      NOTE: you may get an error that CMake cannot find Qt version 4.7.0 or later. If this is the case, you will have to set the QT_QMAKE_EXECUTABLE option in the next section.
      1. hit 'e' to exit the help (ie. warning) screen
    • General options:
      • set BUILD_TESTING to OFF (optional)
      • set CMAKE_BUILD_TYPE to "Release" (optional)
      • set PARAVIEW_ENABLE_PYTHON to ON
      • set PARAVIEW_USE_MPI to ON
      • set QT_QMAKE_EXECUTABLE to path of qmake or qmake-qt4
      1. hit 'c' to continue
      This will generate new options (indicated by asterisk, or yellow background)
    • Immersive Interface options:
      • set PARAVIEW_BUILD_PLUGIN_VRPlugin to ON
      1. hit 'c' to continue
      • set PARAVIEW_USE_VRPN to ON
      • set PARAVIEW_USE_VRUI to ON
      1. hit 'c' to continue
      • set VRPN_INCLUDE_DIR appropriately (perhaps "/usr/local/include")
      • set VRPN_LIBRARY appropriately (perhaps "/usr/local/lib/libvrpn.a")
    • Now make the application
      1. hit 'c' to configure
      2. if you get an error message page: hit 'e' to exit that page
        NOTE: you may get an error message that you now need to set values for MPI_C_INCLUDE_PATH and MPI_C_LIBRARIES -- if you set these, hit 'c' again
      3. hit 'g' to generate the makefiles
      4. run make
        % make -j 8


How to Configure Immersive ParaView

Kitware also maintains a wiki site with instructions on how to use ParaView on a VR display.

But here are some things to keep in mind:

  • ParaView is "unit-less", so whatever units you choose will affect the size of how they are rendered.
    • Presently: using "feet" as the units in the .pvx file is probably the best choice.
  • ParaView is Y-UP, and Z-towards you (i.e. out of the screen)
  • Things don't seem to work well if a screen is located on the Z=0 plane (and that may be true of other planes as well).
  • Tracking only works on the views rendered by pvserver not the paraview client application.

New Issues

These are some issues that have recently been encountered (or in some cases reencountered). This list is not to imply that the previous "Issues" and "VTK Issues" lists are not still pertinent — though it's possible some of those issues have indeed been resolved by now, but more likely than not some of these are probably still outstanding.

  • BUG: The VRPN Address line in the VR Panel disallows numeric entry. This makes it impossible to set a port number.
  • BUG-ish: The .pvvr configuration file has a <TrackerTransform> entry that is inaccessible from the GUI.

Issues

These may be issues related directly to the new immersive features of ParaView, or they may just be bugs that were encountered as we work through the needs of ParaView for immersive users.

  • BUG: stereo appears in the main/client PV window, even though that is typically a mono-screen -- so question is, how to control which windows are stereo, and which are not.
    Answer: Stereo-mode for the "pvserver" windows should be specified in the ".pvx" file, not inherited from the master "paraview" client.
  • NOTE: There presently is no means of doing side-by-side stereo in VTK/ParaView.
  • BUG: When running with full-screen pvserver renderings, ParaView (or QT controlled by ParaView, or maybe down in the VTK library) disables all window movement and keyboard input for all other windows (even the non-ParaView ones)! Of course, since it disables text into ParaView itself, that makes it hard to type in parameters. This is definitely a bug! One workaround is to use Alt-Ctrl, and even though the other windows don't appear, it can cause keyboard input focus to be placed in the specified window.
    Answer: remove the call to "XGrabKeyboard()" in "vtkXOpenGLRenderWindow.cxx".
  • NOTE: the "--server=<server name>" option takes a name as assigned in the server configurator, not an actual machine name or address
  • NOTE: Scroll wheel moves objects in Z (i.e it's not altering their size)
  • NOTE: ParaView is Y-up in the server views (also Y-up by default in the client, but that can be altered).
  • BUG: When a server configuration is created as a "Command Line" version, but no command is give, ParaView core-dumps from an ASSERT -- rather than say: put a warning in the "Output Messages" dialog box.
  • BUG: Loading the "minimalvr.pvsm" state file causes the camera view-normal to be set to (0,0,0), which is a singularity -- thus nothing gets rendered until one of the camera buttons is pressed. Note that minimalvr.pvsm doesn't set anything called view-normal -- though it does set an up vector -- but it sets that to (0,1,0) not (0,0,0).
  • BUG: (at least for me) When loading an object that is planar, ParaView automatically goes into "2D" mode, and points the camera at the plane. How can this be disabled through user-input, command-line as well as state-file?
  • Question: Why does the camera distance start at 6.69? And how can that be changed?


VTK fixes required

  • The removal of "XGrabKeyboard()" as mentioned in "Issues" section.
  • The addition of the ability to do left/right viewport stereo (and top/bottom).
  • The addition of the names "QuadBuffer" and "StereoBuffer" to the form of stereo now anachronistically called "CrystalEyes".


See Also

Some other pages describing Immersive ParaView installations and uses.

Links to Old Immersive ParaView wiki pages

As the options to CMake and the ParaView command line options are still in a state of flux while the Immersive features migrate from prototype to a more end-user version, changes to the instructions between ParaView releases can also be drastic. So if you happen to be working with an older version of ParaView, and are looking to access the immersive features, then you should try to use the instructions from the page that best matches the version used.

As an aid, here are links to previous versions of this page that were designed for older ParaView releases: