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 "BuildingParaView"
(Created page with a recipe for building ParaView with VR features (MS-Windows thus far)) |
(Adding instructions for building on Linux) |
||
Line 7: | Line 7: | ||
==Building ParaView on Linux== | ==Building ParaView on Linux== | ||
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. | |||
NOTES: | |||
* This build may not include the collaborative feature of the ''"XRInterface"'' plugin. | |||
===Prerequisites=== | |||
For ParaView on Linux, you should have the following build environment: | |||
* A standard Linux build environment with: | |||
** GNU-C++ (or maybe CLang++) | |||
** CMake | |||
** Make | |||
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 | |||
* VRPN — needed for CAVEInteraction | |||
* JsonCPP — needed for OpenXR | |||
* OpenXR-SDK — for the OpenXR option in the XRinterface plugin | |||
<!--* ZeroMQ — for the ParaView collaboration feature of the XRinterface plugin--> | |||
====Setting Environment Variables For the Packages==== | |||
For many specialized packages, '''"module"''' packages will be configured to set the proper environment variables: | |||
<syntaxhighlight> | |||
% module load mpi/mpich-x86_64 openxr vrpn | |||
</syntaxhighlight> | |||
For others, there are pre-installed packages, so set these environment variables: | |||
<syntaxhighlight> | |||
% export PYTHON_PATH=/usr/bin/python3 | |||
% export QT_PATH=/usr/lib64/cmake/Qt5 | |||
% export MPI_PATH=$MPI_BIN/mpiexec | |||
% export VRPN_PATH=$VRPN_DIR/.. | |||
</syntaxhighlight> | |||
===Fetch the ParaView source=== | |||
The standard ParaView source can be fetched with: | |||
<syntaxhighlight> | |||
% git clone --recursive https://gitlab.kitware.com/paraview/paraview.git paraview-vr-git_<date> | |||
</syntaxhighlight> | |||
To get Scott Wittenburg's experimental branch do instead: | |||
<syntaxhighlight> | |||
% git clone --recursive https://gitlab.kitware.com/scott.wittenburg/paraview.git pvSrc | |||
% cd pvSrc/VTK | |||
% git remote add scott https://gitlab.kitware.com/scott.wittenburg/vtk.git | |||
% git fetch scott | |||
% git checkout integration-testing | |||
c% d ../ | |||
% git checkout integration-testing | |||
% git submodule update --init --recursive | |||
</syntaxhighlight> | |||
===Configure and Build=== | |||
<syntaxhighlight> | |||
% cmake \ | |||
-DPARAVIEW_USE_PYTHON:STRING=RelWithDebInfo \ | |||
-DCMAKE_INSTALL_PREFIX:STRING=:BOOL=/opt/ParaView/el8 \ | |||
-DPARAVIEW_USE_PYTHON:BOOL=ON \ | |||
-DPython3_EXECUTABLE:FILEPATH=${PYTHON_PATH} \ | |||
-DVTK_DEBUG_LEAKS:BOOL=ON \ | |||
-DPARAVIEW_USE_QT:BOOL=ON \ | |||
-DQt5_DIR:PATH=${QT_PATH} \ | |||
-DPARAVIEW_USE_MPI:BOOL=ON \ | |||
-DMPIEXEC_EXECUTABLE:FILEPATH=${MPI_PATH} \ | |||
-DPARAVIEW_PLUGIN_ENABLE_CAVEInteraction:BOOL=ON \ | |||
-DPARAVIEW_PLUGIN_CAVEInteraction_USE_VRPN:BOOL=ON \ | |||
-DVRPN_INCLUDE_DIR:PATH=${VRPN_PATH}/include \ | |||
-DVRPN_LIBRARY:FILEPATH=${VRPN_PATH}/lib/libvrpn.a \ | |||
-DVRPN_QUAT_LIBRARY:FILEPATH=${VRPN_PATH}/lib/libquat.a \ | |||
-DPARAVIEW_PLUGIN_CAVEInteraction_USE_VRUI:BOOL=ON \ | |||
-DVTK_MODULE_ENABLE_VTK_RenderingOpenXR:BOOL=YES \ | |||
-DPARAVIEW_PLUGIN_ENABLE_XRInterface:BOOL=ON \ | |||
-DPARAVIEW_XRInterface_OpenVR_Support:BOOL=OFF \ | |||
-DPARAVIEW_XRInterface_OpenXR_Support:BOOL=ON \ | |||
-DVTK_MODULE_ENABLE_VTK_RenderingOpenVR:BOOL=NO \ | |||
-DOpenXR_INCLUDE_DIR:PATH=${OPENXR_DIR}/include/openxr \ | |||
-DOpenXR_LIBRARY:FILEPATH=${OPENXR_DIR}/lib64/libopenxr_loader.so \ | |||
.. | |||
</syntaxhighlight> | |||
==Building ParaView on MS-Windows== | ==Building ParaView on MS-Windows== | ||
Line 139: | Line 219: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==Running a simple ParaView visualization in VR== | ==Running a simple ParaView visualization in HMD VR== | ||
* First, just run ParaView either from a launcher, or from a shell. | * First, just run ParaView either from a launcher, or from a shell. | ||
* Load the XRInterface (nee OpenVR) plugin: | * Load the XRInterface (nee OpenVR) plugin: | ||
** "Tools" | ** "Tools" <FONT size="+2">'''→'''</FONT> "Manage Plugins" | ||
** Select <TT>XRInterface</TT> (or <TT>OpenVR</TT> until the name change fully propogates) | ** Select <TT>XRInterface</TT> (or <TT>OpenVR</TT> until the name change fully propogates) | ||
** Load selected plugin | ** Load selected plugin | ||
* Create your visualization | * Create your visualization | ||
* Press the "<TT>Send to VR</TT>" button | * Press the "<TT>Send to VR</TT>" button |
Latest revision as of 21:22, 16 May 2024
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
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.
NOTES:
- This build may not include the collaborative feature of the "XRInterface" plugin.
Prerequisites
For ParaView on Linux, you should have the following build environment:
- A standard Linux build environment with:
- GNU-C++ (or maybe CLang++)
- CMake
- Make
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
- VRPN — needed for CAVEInteraction
- JsonCPP — needed for OpenXR
- OpenXR-SDK — for the OpenXR option in the XRinterface plugin
Setting Environment Variables For the Packages
For many specialized packages, "module" packages will be configured to set the proper environment variables:
% module load mpi/mpich-x86_64 openxr vrpn
For others, there are pre-installed packages, so set these environment variables:
% export PYTHON_PATH=/usr/bin/python3
% export QT_PATH=/usr/lib64/cmake/Qt5
% export MPI_PATH=$MPI_BIN/mpiexec
% export VRPN_PATH=$VRPN_DIR/..
Fetch the ParaView source
The standard ParaView source can be fetched with:
% git clone --recursive https://gitlab.kitware.com/paraview/paraview.git paraview-vr-git_<date>
To get Scott Wittenburg's experimental branch do instead:
% git clone --recursive https://gitlab.kitware.com/scott.wittenburg/paraview.git pvSrc
% cd pvSrc/VTK
% git remote add scott https://gitlab.kitware.com/scott.wittenburg/vtk.git
% git fetch scott
% git checkout integration-testing
c% d ../
% git checkout integration-testing
% git submodule update --init --recursive
Configure and Build
% cmake \
-DPARAVIEW_USE_PYTHON:STRING=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX:STRING=:BOOL=/opt/ParaView/el8 \
-DPARAVIEW_USE_PYTHON:BOOL=ON \
-DPython3_EXECUTABLE:FILEPATH=${PYTHON_PATH} \
-DVTK_DEBUG_LEAKS:BOOL=ON \
-DPARAVIEW_USE_QT:BOOL=ON \
-DQt5_DIR:PATH=${QT_PATH} \
-DPARAVIEW_USE_MPI:BOOL=ON \
-DMPIEXEC_EXECUTABLE:FILEPATH=${MPI_PATH} \
-DPARAVIEW_PLUGIN_ENABLE_CAVEInteraction:BOOL=ON \
-DPARAVIEW_PLUGIN_CAVEInteraction_USE_VRPN:BOOL=ON \
-DVRPN_INCLUDE_DIR:PATH=${VRPN_PATH}/include \
-DVRPN_LIBRARY:FILEPATH=${VRPN_PATH}/lib/libvrpn.a \
-DVRPN_QUAT_LIBRARY:FILEPATH=${VRPN_PATH}/lib/libquat.a \
-DPARAVIEW_PLUGIN_CAVEInteraction_USE_VRUI:BOOL=ON \
-DVTK_MODULE_ENABLE_VTK_RenderingOpenXR:BOOL=YES \
-DPARAVIEW_PLUGIN_ENABLE_XRInterface:BOOL=ON \
-DPARAVIEW_XRInterface_OpenVR_Support:BOOL=OFF \
-DPARAVIEW_XRInterface_OpenXR_Support:BOOL=ON \
-DVTK_MODULE_ENABLE_VTK_RenderingOpenVR:BOOL=NO \
-DOpenXR_INCLUDE_DIR:PATH=${OPENXR_DIR}/include/openxr \
-DOpenXR_LIBRARY:FILEPATH=${OPENXR_DIR}/lib64/libopenxr_loader.so \
..
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:
- Download from:
- https://www.microsoft.com/download/details.aspx?id=100593
- MS-MPI v10.1.2 [aka msmpi]
- Install "msmpisetup.exe"
- Install "msmpisdk.msi"
- Follow the usual steps in the Setup Wizard.
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 HMD 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