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 "BuildingANARI"
m (More minor tweaks (I should have waited to do them together)) |
(Adding new section for building the VisRTX/VisGL backends) |
||
Line 28: | Line 28: | ||
% make | % make | ||
% make install | % make install | ||
% cp -p anariViewer INSTALL_PREFIX/bin | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 58: | Line 59: | ||
<syntaxhighlight> | <syntaxhighlight> | ||
% ./anariViewer | % ./anariViewer | ||
</syntaxhighlight> | |||
==Build/Install the VisRTX & VisGL ANARI backends== | |||
Once the base ANARI SDK is built, additional backends can be compiled and added to the overall ANARI installation: | |||
<syntaxhighlight> | |||
% module load optix cuda anari | |||
% git clone -b next_release --single-branch https://github.com/NVIDIA/VisRTX visrtx2_version | |||
% mkdir visrtx2_version/Build | |||
% cd visrtx2_version/Build | |||
% cmake -DCMAKE_INSTALL_PREFIX=<same-as-ANARI-base> .. | |||
% make | |||
% make install | |||
</syntaxhighlight> | |||
Then: | |||
<syntaxhighlight> | |||
% export ANARI_LIBRARY=visrtx | |||
% anariViewer | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 66: | Line 84: | ||
* CMake should be fixed to not produce an erroneous GLFW library for <TT>anariViewer</TT> | * CMake should be fixed to not produce an erroneous GLFW library for <TT>anariViewer</TT> | ||
* Running <TT>anariTutorial</TT> shouldn't seg-fault | * Running <TT>anariTutorial</TT> shouldn't seg-fault | ||
** Also anariTutorial should honor the <TT>ANARI_LIBRARY</TT> flag. | |||
* Running <TT>anariInfo -l visgl</TT> shouldn't seg-fault | |||
==Other issues that I am personally experiencing== | |||
* My ANARI-VR test programs crash when running with the <TT>helide</TT> backend, apparently because it doesn't have ''directional lights'' | |||
* When running <TT>anariInfo -l visrtx</TT> there appear to be some spaces in parameter names that are bugs — e.g. " transform" | |||
** There are other odd inconsistencies between the output of <TT>anariInfo</TT> for the backends that I've built | |||
* The file <TT>anari_feature_utility.h</TT> seems to no longer exist — likely I missed a meeting when a change was discussed | |||
** So no call to <TT>anariGetDeviceFeatureStruct()</TT> is available | |||
* There is some code in the installed <TT>share/anari</TT> directory that I'm not sure what it does/is-for |
Revision as of 12:26, 10 January 2024
Instructions for how to build ANARI on Linux. This is the basic ANARI, independent of VR capabilities, which will be documented separately.
Building ANARI on Linux
The generic ANARI SDK has minimal system requirements to build. However, for the GPU-accelerated backends, there generally will be additional required features (such as Cuda or Optix).
When building ANARI, there is a choice between downloading/cloning the reference ANARI-SDK, and separately obtaining the GPU accelerated backends, or it is possible to download the pseudo-Superbuild that will download selected backends, and do a complete build.
Prerequisites
ANARI makes use of the CMake build system. You should have at least version 3.11 of CMake.
Cloning ANARI
Clone from the Khronos Github ANARI reposoitory:
% git clone https://github.com/KhronosGroup/ANARI-SDK.git
Configuring the Build and Installing
Configuring and compiling the build:
% mkdir ANARI-SDK/Build
% cd ANARI-SDK/Build
% cmake -DCMAKE_INSTALL_PREFIX=... -DCMAKE_BUILD_TYPE:STRING=Debug -DBUILD_CTS:BOOL=OFF -DBUILD_TESTING:BOOL=OFF -DBUILD_VIEWER:BOOL=ON ..
% make
% make install
% cp -p anariViewer INSTALL_PREFIX/bin
- NOTE: As of ANARI version 0.8.0, I've had to modify the file "imgui_impl_glfw.cpp" to remove three GLFW function calls that are not part of my version of that library:
- glfwGetError
- glfwGetMonitorWorkarea
- glfwGetMonitorContentScale
Running ANARI
The ANARI build process includes a simple tutorial application that will render a scene consisting of a pair of triangles into two image files (one with the first pass of the render, and one with a later pass). An optional "anariViewer" may also be built which contains a handful of reference scenes, along with an OBJ viewer.
Running the ANARI backend info tool
% ./anariInfo -helide
This will then output a slew of information about the backend, including what version of ANARI it was built for, and what Parameters and Extensions it handles.
Running the ANARI tutorial example
% ./anariTutorial
% display *.ppm
Running the ANARI viewer example
% ./anariViewer
Build/Install the VisRTX & VisGL ANARI backends
Once the base ANARI SDK is built, additional backends can be compiled and added to the overall ANARI installation:
% module load optix cuda anari
% git clone -b next_release --single-branch https://github.com/NVIDIA/VisRTX visrtx2_version
% mkdir visrtx2_version/Build
% cd visrtx2_version/Build
% cmake -DCMAKE_INSTALL_PREFIX=<same-as-ANARI-base> ..
% make
% make install
Then:
% export ANARI_LIBRARY=visrtx
% anariViewer
Suggestions for improving the ANARI build process
I have a few things that I need to pass along to the ANARI working group that could/should be fixed in future versions -- especially by the time we get to version 1.0.0.
- anariViewer should be copied to INSTALL_PREFIX/bin
- CMake should be fixed to not produce an erroneous GLFW library for anariViewer
- Running anariTutorial shouldn't seg-fault
- Also anariTutorial should honor the ANARI_LIBRARY flag.
- Running anariInfo -l visgl shouldn't seg-fault
Other issues that I am personally experiencing
- My ANARI-VR test programs crash when running with the helide backend, apparently because it doesn't have directional lights
- When running anariInfo -l visrtx there appear to be some spaces in parameter names that are bugs — e.g. " transform"
- There are other odd inconsistencies between the output of anariInfo for the backends that I've built
- The file anari_feature_utility.h seems to no longer exist — likely I missed a meeting when a change was discussed
- So no call to anariGetDeviceFeatureStruct() is available
- There is some code in the installed share/anari directory that I'm not sure what it does/is-for