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.

BuildingParaView

From IQ-Station Wiki
Jump to navigation Jump to search

Instructions for how to build ParaView on Linux and MS-Windows, such that the VR features are enabled to the fullest extent.

(NOTE: These instructions based on the detailed instructions provided by Scott Wittenburg of Kitware.)

(NOTE: These instructions do not (yet) include information on building the CAVEInteraction plugin -- nee VRPlugin.)

Building ParaView on Linux

Building ParaView on MS-Windows

Generally when building ParaView, a specific version of VTK will be included, so building VTK is not a prerequisite for building ParaView.

First make sure to have the build system requirements, and then the necessary dependencies. If you happened to already install VTK as an independent tool, then you will have already built/installed some of these.

Prerequisites

For ParaView on MS-Windows, you should have the following build environment:

  • Visual Studio 2019 — specifically, you need to use the command shell for configuring and building
    (it includes CMake and Ninja)
    use the search panel to find: x64 Native Tools Command Prompt for VS 2019
  • [optional] Git bash and/or Cygwin Terminal can be handy for standard Unix-style commands

And you will need these packages:

  • Qt — the windowing/GUI framework used by ParaView
  • MPI — used for the client-server model (including for CAVE displays)
  • Python3 — needed for the live interaction
  • JsonCPP — needed for OpenXR
  • OpenXR-SDK — for the OpenXR option in the XRinterface plugin
  • OpenVR-SDK — for the OpenVR option in the XRinterface plugin
  • ZeroMQ — for the ParaView collaboration feature of the XRinterface plugin

Installing QT

For now, we're using QT version 5.12.0 as recommended by Scott Wittenburg.

To determine whether you have a working version of Qt (and also determine the version number), run:

% qmake --version

If it's not found find where the Qt bin directory is, and add that to your path:

% set PATH=%PATH%;C:\Qt\5.12.12\msvc2017_64/bin
% qmake --version

Installing MPI

You can confirm whether you have MPI installed with the mpiexec command:

% mpiexec
Microsoft MPI Startup Program [Version 10.1.12498.18]
[... (usage information)]

And if you don't, install it. And note that you need both "msmpisetup.exe" and "msmpisdk.msi" installed.

Steps:

Installing Python3

For Python3, it's easy to just download an installer and follow the prompts.

Be sure to add Python 3.10 to %PATH%.

Building JsonCPP

(Same steps as with the VTK build)

% cd C:\<project_dir>
% git clone https://github.com/open-source-parsers/jsoncpp.git jsonCpp
% mkdir jsonCpp\Build
% cd jsonCpp\Build
% cmake -GNinja -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo -DCMAKE_INSTALL_PREFIX:PATH=C:<install_dir>\jsoncpp_Install ..
% ninja
% ninja install

Building OpenXR-SDK-Source

(Same steps as with the VTK build)

% mkdir C:\<project_dir>\OpenXR-SDK
% cd C:\<project_dir>\OpenXR-SDK
% git clone https://github.com/KhronosGroup/OpenXR-SDK.git
% mkdir OpenXR-SDK\Build
% cd OpenXR-SDK\Build
% cmake -GNinja -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo -DCMAKE_INSTALL_PREFIX:PATH=C:<install_dir>\OpenXR-SDK_Install -DJsonCpp_INCLUDE_DIR:PATH=C:<install_dir>\jsoncpp_Install\include -DJsonCpp_LIBRARY:FILEPATH=C:<install_dir>\jsoncpp_Install\lib\jsoncpp.lib -DDYNAMIC_LOADER:BOOL=ON ..
% ninja
% ninja install

Installing OpenVR-SDK

(Same steps as with the VTK build)

% cd C:\<project_dir>
% git clone https://github.com/ValveSoftware/openvr.git
% mv openvr openvr_<version|date>

Building ParaView

Ensure the path is correct to find the dependencies:

vs2019% set PATH=%PATH%;C:\Qt\5.12.12\msvc2017_64/bin
vs2019% set PATH=%PATH%;C:\Build\OpenXR-SDK_20220128_Install\bin;C:\Build\OpenVR\openvr_20220130\bin\win64
vs2019% set PATH=%PATH%;C:\Build\jsoncpp\install\bin
vs2019% set PATH=%PATH%;C:\Build\libzmq-4.3.4_Install\bin

Now do the build:

% mkdir -p C:\<project_dir>\ParaView
% cd C:\<project_dir>\ParaView
% git clone --recursive https://gitlab.kitware.com/paraview/paraview.git
% mkdir ParaView\Build
% cd ParaView\Build
% cmake -GNinja -DCMAKE_INSTALL_PREFIX=C:\Build\ParaView_Master_Install -DPARAVIEW_USE_PYTHON=ON -DPython3_EXECUTABLE:FILEPATH=C:<Python_path>\Python\Python310\python.exe -DPARAVIEW_USE_MPI=ON -DPARAVIEW_PLUGIN_ENABLE_OpenVR:BOOL=ON -DOpenVR_INCLUDE_DIR:PATH=C:<OpenVR_install>/headers -DOpenVR_LIBRARY:FILEPATH=C:<OpenVR_install>/lib/win64/openvr_api.lib -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo -DPARAVIEW_BUILD_TESTING:STRING=WANT -DVTK_MODULE_ENABLE_VTK_RenderingOpenXR:STRING=WANT -DOpenXR_INCLUDE_DIR:PATH=C:<OpenXR-SDK_install>\include\openxr -DOpenXR_LIBRARY:FILEPATH=C:<OpenXR-SDK_install>\lib\openxr_loader.lib -DVTK_ENABLE_VR_COLLABORATION:BOOL=ON -DZeroMQ_DIR:PATH=C:/Build/libzmq-4.3.4_Install/CMake -DVTK_SMP_IMPLEMENTATION_TYPE=Sequential ..
% ninja
% ninja install


Running ParaView (on MS-Windows)

Once the build and installation completes, there are a few remaining details to address. Specifically, there are environment variables that must be properly configured, and JSON and DLL files that need to be found when running the application.

Copy dependency DLLs

(Easiest to use git-bash or Cygwin terminal)

Cygwin% cp -p openvr/openvr/bin/win64/openvr_api.* <...>/paraview_branch_build/build/bin/.
Cygwin% cp -p jsoncpp/install/bin/jsoncpp.dll <...>/paraview_branch_build/build/bin/.
Cygwin% cp -p KhronosGroup/OpenXR-SDK/install/bin/openxr_loader.* <...>/paraview_branch_build/build/bin/.

Library/Executable search PATH

Here is my %PATH% environment variable:

% set PATH=%PATH%;C:\Users\wrs1\AppData\Local\Programs\Python\Python310;C:\Qt\5.12.12\msvc2017_64/bin;C:\Build\jsoncpp\install\bin;C:\Build\libzmq-4.3.4_Install\bin;C:\Build\OpenVR\openvr_20220130\bin\win64;C:\Build\OpenXR-SDK_20220128_Install\bin

Running a simple ParaView visualization in VR

  • First, just run ParaView either from a launcher, or from a shell.
  • Load the XRInterface (nee OpenVR) plugin:
    • "Tools" -> "Manage Plugins"
    • Select XRInterface (or OpenVR until the name change fully propogates)
    • Load selected plugin
  • Create your visualization
  • Press the "Send to VR" button