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.

Visionaray

From IQ-Station Wiki
Revision as of 02:37, 10 July 2024 by WSherman (talk | contribs) (Initial page for Visionaray wth build instructions)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Visionaray C++ Ray-Tracing Library

Visionaray is an open-source ray-tracing template library API written in C++ that allows uses to use their own kernels or schedulers to the overarching ray-tracing framework. Visionary has some stand-alone example tools such as a viewer, but also has an ANARI backend interface.

Note that "Visionaray" is similar to the word "Visionary", but with an extra "a". (Think "Vision-a-ray".)

Github repositories

There is a Github repo for both the underlying library and the ANARI interface:

Building Visionaray & ANARI backend

To use Visionaray as an ANARI backend, first one must build the underlying Visionaray library, and then build the backend.

Note for my build instructions, I always add the "date" to the end of the software directory which permits me to easily switch between versions using the "module" environment system. For the installation directories, I also add the "OS" (something like "el8" or "u22") after the "date" tag.

Building Visionaray

  • Confirm use of CMake version 3.27 or higher
% cd Apps/Visionaray
% git clone --recursive https://github.com/szellmann/visionaray.git Visionaray_<date>
% mkdir !$_<OS>
% mkdir !-2$/Build_<OS>
% cd !$
% [module load tbb]
% cmake -DCMAKE_INSTALL_PREFIX=<path>_<date>_<OS> -DCMAKE_BUILD_TYPE:STRING=Release -DVSNRAY_ENABLE_VIEWER:BOOL=OFF ..
% make
% make install
% vi <path>/Modules/<OS>/visionaray/<date>
  • NOTE: At the present, for the next stage (on machines that don't have all the Boost packages installed), it may be required to edit lib/cmake/visionaray/visionarayConfig.cmake to remove the filesyatem and iostreams from the Boost list of components.

Building ANARI-Visionaray backend

NOTE: the "install" directory for the backend is the same directory as ANARI, so if the "anari" module is configured to set the $ANARI_DIR environment variable, then that can be used as the path to where the backend should be installed.

% module load anari visionaray
% cd Apps/Visionaray
% git clone https://github.com/szellmann/anari-visionaray ANARI-Visionaray_<date>
% mkdir !$/Build_<OS>
% cd !$
% cmake -DCMAKE_INSTALL_PREFIX=$ANARI_DIR -DCMAKE_BUILD_TYPE:STRING=Release -DANARI_VISIONARAY_ENABLE_CUDA:BOOL=ON -DCMAKE_CXX_FLAGS:STRING=-fPIC ..
% make
% make install
  • NOTE: If there are errors building the CUDA version of the backend, simply go back and set ANARI_VISIONARAY_ENABLE_CUDA to OFF. (Of course the rendering will be slower, as it will now take place on the CPU.)

Using the ANARI-Visionaray Backend

Using the ANARI-Visionaray backend is quite simple. Presuming all the above steps proceeded without issue, then the backend will now be installed in the ANARI backend directory, so all that should be required is:

% export ANARI_LIBRARY=visionaray_cuda
% anariViewer
  • NOTE: if the CUDA build didn't work, then just use visionaray

See Also