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

From IQ-Station Wiki
Jump to navigation Jump to search
(Added some configuration bullets)
m (Moving some of the "Version" text to come later (and adding 2.7 historical link), plus new input information)
 
(5 intermediate revisions by the same user not shown)
Line 2: Line 2:
=Vrui VR integration library=
=Vrui VR integration library=


[http://idav.ucdavis.edu/~okreylos/ResDev/Vrui/index.html Vrui] is a VR integration library from the University of California at Davis' KeckCAVEs facility.
[http://web.cs.ucdavis.edu/~okreylos/ResDev/Vrui/index.html Vrui] is a VR integration library from the University of California at Davis' KeckCAVEs facility.
Vrui takes the approach of providing a framework into which applications are integrated and can
Vrui takes the approach of providing a framework into which applications are integrated and can
take advantage of many different plugin tools and navigation controls that are independently
take advantage of many different plugin tools and navigation controls that are independently
Line 10: Line 10:
of our immersive visualization ensemble.  But before using a Vrui application, one must first
of our immersive visualization ensemble.  But before using a Vrui application, one must first
install and configure Vrui.
install and configure Vrui.
[[File:BC_IUPUI_6659m.jpg|thumb|right|250px|Vrui LidarViewer]]


==Vrui Versions==
==Vrui Versions==
There are currently two branches of Vrui (the 1.0 line and the 2.x line).
 
There are some significant differences, including many changes to the API,
As of the last update of this Wiki page, the latest version of Vrui is '''12.0-001'''.
as well as to the DeviceDaemon protocol.
The API has gone through a handful of minor breaking changes, which (in the future)
may be specifically documented, though once all the old applications have been updated,
there will be diminishing need for that information.
There are also multiple versions of Vrui's VR-DeviceDaemon protocol, which
fortunately, Vrui generally negotiates a mutually agreeable protocol between
client and server before input data is transmitted.
 
If you have applications written for multiple lines of the Vrui library,
then you will need to have each branch installed.
Fortunately, this is rather easy to do, and following these directions will
ensure that your system will work with multiple versions of Vrui installed.
 
This page has most recently been updated for Vrui version 12.0-001,
but much of the configuration details are the same for older versions.
 
To determine what version of Vrui a dynamic library (SO/DLL) is, or what
version of Vrui an application was compiled with, search through the ASCII
strings of the binary for "''libVrui''".
* <CODE>% strings &LT;application&GT; | grep libVrui</CODE>
 
 
=Building Vrui=


==Vrui Dependencies==
==Vrui Dependencies==
Line 23: Line 46:


There are also a number of highly-recommended packages that will enhance Vrui:
There are also a number of highly-recommended packages that will enhance Vrui:
* libusb1-devel &mdash; for communicating with some I/O devices
* vulkan-validation-layers &mdash; for compositing video to hidden HMD screens
* glslang-devel / glslang-tools &mdash; for compositing video to hidden HMD screens
* OpenAL &mdash; for audio collaboration
* zlib-devel
* zlib-devel
* libpng-devel
* libpng-devel
Line 29: Line 56:
* libasound2-dev
* libasound2-dev
* bluez-libs-devel
* bluez-libs-devel
* libogg & libtheora &mdash; for recording VR sessions


==Installing Vrui==
==Installing Vrui==


These instructions have been tested with Vrui version 1.0-068 (the latest of the 1.0 line),
As of Vrui version 8.0 or so, Vrui can be downloaded and
installed via the [http://doc-ok.org/?topic=new-software-installation-mechanism "'''PullPackage'''"]
method, which auto-downloads and builds configurations based on the local system.
However, it is also still possible to download a tarball and
manually build/install/configure.
These instructions have been tested with Vrui version 12.0-001,
but should generally work for other versions of Vrui.
but should generally work for other versions of Vrui.
Note that mostly for the purpose of using [[Modules


# Download Vrui
<OL>
#: Download from the [http://idav.ucdavis.edu/~okreylos/ResDev/Vrui/Download.html Vrui Download page]
<LI> Download Vrui
# Untar in a local directory
: Download from the [http://vroom.library.ucdavis.edu/Software/Vrui Vrui Download page]
#: <CODE>% tar -zxf Vrui-1.0-068.tar.gz</CODE>
<LI> Untar in a local directory
#: <CODE>% cd Vrui-1.0-068</CODE>
: <CODE>% tar -zxf Vrui-12.0-001.tar.gz</CODE>
# Adjust the makefile
: <CODE>% mkdir Vrui-12.0-001_''&LT;os&GT;''</CODE>
#: <CODE>% $EDITOR makefile</CODE>
: <CODE>% cd Vrui-12.0-001</CODE>
#:* set <CODE>INSTALLDIR</CODE> to "<CODE>/opt/VR/Vrui-1.0-068</CODE>"
<LI> Adjust the makefile
#:*: NOTE: adding the build-version to INSTALLDIR helps avoid issues when upgrading
: <CODE>% $EDITOR makefile</CODE>
#:* add "-b" to the "<CODE>@install ... Share/Vrui.cfg ...</CODE>" line
:* set <CODE>INSTALLDIR</CODE> to "<CODE>/opt/VR/Vrui-12.0-001_''&LT;os&GT;''</CODE>"
#:*: (this will save you much grief in the future -- when you might otherwise wonder what happened to the config files you made)
:*: '''NOTE:''' adding the build-version to INSTALLDIR helps avoid issues when upgrading
#:*: NOTE: after the first install, commenting out this line entirely is recommended
:*: '''NOTE also:''' Adding an abbreviation for the OS (e.g. "<CODE>_el8</CODE>" or "<CODE>_u22"</CODE>) helps the ''modules'' system to install the proper version.
# Fix a bug ''(update tracking for single tracker)''
:*: '''NOTE furthermore:''' the &LT;/opt/VR&GT; path is an example.  This should be change to the actual installation directory
#: <CODE>% $EDITOR VRDeviceDaemon/VRDeviceManager.cpp</CODE>
<LI> Adjust makefile ''[optional &mdash; as required]''
#:* Change: "<CODE>if(trackerReportMask==fullTrackerReportMask)</CODE>" to "<CODE>if(trackerReportMask != 0)</CODE>"
<LI> Fix a bug ''(update tracking for single tracker)''
# Fix another bug ''(proper window placement)''
: <CODE>% cp -p VRDeviceDaemon/VRDeviceManager.cpp{,_orig}</CODE>
#: <CODE>% $EDITOR GL/GLWindow.cpp</CODE>
: <CODE>% $EDITOR VRDeviceDaemon/VRDeviceManager.cpp</CODE>
#:* Add after <CODE>XMapWindow(display,window);</CODE>
:* Change: "<CODE>if(trackerReportMask==fullTrackerReportMask)</CODE>" to "<CODE>if(trackerReportMask != 0)</CODE>"
        /* since XCreateWindow() doesn't properly place the window, we need to move it to the correct location */
:*: '''NOTE:''' Currently there are two lines where this should be changed.
        XMoveWindow(display, window, windowPos.origin[0],windowPos.origin[1]);
<LI> Set the location of SteamVR ''(if not in usual place)'' '''[optional]'''
# Add a feature ''(remove decorations on full-screen displays)''
: <CODE>% export STEAMVR=''&LT;path-above-drivers&GT;''</CODE>
#: <CODE>% $EDITOR GL/GLWindow.cpp</CODE>
:: (this is a pointer to the path where <CODE>drivers/lighthouse/bin/''&LT;OS&GT;''/driver_lighthouse.so</CODE> is found)
#:* Add after <CODE>window=XCreateWindow(...)</CODE>
<LI> Compile
      /* Add a block to turn off decorations when window is as big as one screen */
: <CODE>% make -j 8</CODE>
      if ((windowPos.size[0] == 1920) && (windowPos.size[1] == 1080)) {
:: (this will take less than a minute)
              unsigned long  wm_hints[5] = { 2, 0, 0, 0, 0 };       /* the 4th element isn't really unsigned, but it's zero, so who cares */
<LI> Install
              XChangeProperty(display, window, XInternAtom(display, "_MOTIF_WM_HINTS", False), XInternAtom(display, "_MOTIF_WM_HINTS", False), 32, PropModeReplace, (const unsigned char *)wm_hints, 5);
: <CODE>% sudo make install</CODE>
      }
<LI>Create Module file '''[optional]'''
# Compile
: <CODE>% $EDITOR $MODULEPATH/vrui/''&LT;version&GT;''</CODE>
#: <CODE>% make -j 8</CODE>
:: (Add details of where the "bin", "lib", "include" and "share" directories are)
#:: (this will take less than a minute)
:: '''NOTE:''' If <CODE>$MODULEPATH</CODE>contains more than one directory, then pick the relevant one.
# Install
</OL>
#: <CODE>% sudo mkdir -p /opt/VR/Vrui-1.0-068</CODE> ''(or whatever version you are compiling)''
#: <CODE>% sudo make install</CODE>
#:: (NOTE: after subsequent installs, you'll have to go to $INSTALLDIR and copy back from the saved backup config files)
 
That's it!
That's it!


==Configuring Vrui==
==Configuring Vrui==


Configuring Vrui can be a very difficult task. A general hint is to find a working configuration setup that's close to what you want to do and then modify! As we gain more experience, we will put more specific advice/instructions here.
Configuring Vrui can be a very difficult task.
A general hint is to find a working configuration setup that's close to what you want to do and then modify!
As we gain more experience, we will put more specific advice/instructions here.


In the meantime, here are links to other sources of information:
In the meantime, here are links to other sources of information:
* [http://wiki.cse.ucdavis.edu/keckcaves:configuration_files KECKCAVES Wiki page on Vrui Configuration]
* [http://wiki.cse.ucdavis.edu/keckcaves:configuration_files KECKCAVES Wiki page on Vrui Configuration]
* Oliver Kreylos' Vrui online documentation has three pages on configuration:
* Oliver Kreylos' Vrui online documentation has three pages on configuration:
** [http://idav.ucdavis.edu/~okreylos/ResDev/Vrui/Documentation/VruiCalibration.html Setting up and Calibrating a Vrui VR Environment]
** [http://web.cs.ucdavis.edu/~okreylos/ResDev/Vrui/Documentation/VruiCalibration.html Setting up and Calibrating a Vrui VR Environment]
** [http://idav.ucdavis.edu/~okreylos/ResDev/Vrui/Documentation/VruiConfigurationFile.html The Vrui Configuration File]
** [http://web.cs.ucdavis.edu/~okreylos/ResDev/Vrui/Documentation/VruiConfigurationFile.html The Vrui Configuration File]
** [http://idav.ucdavis.edu/~okreylos/ResDev/Vrui/Documentation/VruiConfigurationFileReference.html Vrui Configuration File Settings Reference]
** [http://web.cs.ucdavis.edu/~okreylos/ResDev/Vrui/Documentation/VruiConfigurationFileReference.html Vrui Configuration File Settings Reference]


As of Vrui version 2.7, there is a handy Vrui application called "<CODE>DrawEnvironment</CODE>"
that will display a representation of the screens and tracked objects of the current configuration.
This can come in quite handy when troubleshooting configuration difficulties &mdash; of course,
you need to have something partially working to make use of it.


Here are some unorganized bits of information as I encounter them during my trials (and tribulations):
Here are some unorganized bits of information as I encounter them during my trials (and tribulations):
Line 93: Line 129:
* Windows and Screens go hand-in-hand ''(I'd prefer them to be a single entity)''
* Windows and Screens go hand-in-hand ''(I'd prefer them to be a single entity)''
* root/displayCenter &mdash; the place where the world will go when centering the display (including initial location)
* root/displayCenter &mdash; the place where the world will go when centering the display (including initial location)
* root/displaySize is half the screen's hypotenuse ''(I'd prefer that this simply be calculated by the system)''
* root/displaySize controls the relative size that the vis-world is rendered.  A good rule-of-thumb is to set this to be half the front screen's diagonal


==Testing Vrui==


Once the VRDeviceDaemon is running (which may be through a script such
as <CODE>RunOpenVRTracker.sh</CODE>), there are tools available to
confirm the proper operation of the tracking.
From the Vrui tool suite is ''"DeviceTest"'', which connects to the daemon
server and reports input values.
To report the location values from tracker #0 use:
<CODE>% DeviceTest -t 0</CODE>
From the [[FreeVR | FreeVR tool suite]] there is a similar tool called ''"vruiddtest"'',
which will generally report all the input values.
To report all the inputs with a special "screen" rendering, use:
<CODE>% vruiddtest -screen</CODE>


=Compiling Vrui Applications=
=Compiling Vrui Applications=


Vrui comes with some example programs that can be quickly compiled and used for experimentation.
Vrui comes with some example programs that can be quickly compiled and used for experimentation.
# Adjust the makefile
#: <CODE>% cd ExamplePrograms</CODE>
#: <CODE>% cd ExamplePrograms</CODE>
# In the past it was required to adjust the makefile
#: (This is no longer required)
#: <CODE>% $EDITOR makefile</CODE>
#: <CODE>% $EDITOR makefile</CODE>
#:* ''for Vrui 2.x & 3.x:'' set <CODE>VRUI_MAKEDIR</CODE> to "<CODE>/opt/VR/Vrui-2.7-001/share/make</CODE>"
#:* ''for Vrui 1.x:'' set <CODE>VRUIDIR</CODE> to "<CODE>/opt/VR/Vrui-1.0-068</CODE>"
#:* ''for Vrui 1.x:'' set <CODE>VRUIDIR</CODE> to "<CODE>/opt/VR/Vrui-1.0-068</CODE>"
#:* ''for Vrui 2.x:'' set <CODE>VRUI_MAKEDIR</CODE> to "<CODE>/opt/VR/Vrui-2.3-001/share/make</CODE>"
# Compile
# Compile
#: <CODE>% make</CODE>
#: <CODE>% make</CODE>
Line 112: Line 167:
#:: ''This should open a window with a spinning cube.''
#:: ''This should open a window with a spinning cube.''


=Running Vrui Applications=
In normal circumstances, a properly compiled Vrui application, running
on a system with a proper Vrui configuration, can be run simply by
calling the executable from the command line.
For example:
<CODE>% ShowEarthModel</CODE>
==Running on an HMD==
To run a Vrui application such that it appears inside the view of
an HMD, there are options that can be included on the command line
to activate this.
As a shortcut, the ''"OnHMD"'' script can also be used &mdash; though
caution should be taken when the application is run through another
Bash script.
<CODE>% OnHMD ShowEarchModel</CODE>
==Activating Vrui options==
The Vrui library has it's own command-line arguments that can be applied to
any Vrui application.
Features include the ability to select a non-default display mode &mdash;
such as CAVE vs. HMD vs. Desktop.
Another example is to increase the verbosity of the application and Vrui library,
which is often useful when tweaking and debugging the configuration:
<CODE>% ShowEarthModel -vruiVerbose</CODE>
==Keyboard Inputs==
There are a handful of keyboard inputs that Vrui recognizes, in addition
to which, any unassigned keyboard action can be mapped to any of Vrui's
built-in tools.
===Keyboard Shortcuts===
Keyboard shortcuts can affect the rendering of the application scene
when typed while a window has focus.
Here is one (some):
{| class="wikitable"
|+ Vrui Keyboard Shortcuts
|-
! Keyboard Input !! Affect
|-
| Win-Scrolllock || Toggle "burn mode" (aka OSD) (FPS if it's on) ||
|}
===Mapping Inputs to Tools===
...
==Selecting Alternate Display Modes
A Vrui configuration file (''"Vrui.cfg"'') may contain multiple configuration
sections, for different systems, or for different layouts of one system.
By default, the first of these
<CODE>% ShowEarthModel -rootSection 3DTV</CODE>
==Adding Vislets==
Vrui is designed such that "generic" tools (plugins) can be written that can be
added to any application at runtime.
In Vrui parlance, these are called "vislets".
For example, to add a frame render-time display to an application:
<CODE>% ShowEarthModel -vislet FrameRateViewer</CODE>
NOTE: depending on how the application parses command-line options, it may be
required to add the Vrui options after the application-specific options.
=Older Vrui Versions=
Specific references to building, installing and configuring older versions
of Vrui will generally be removed from the primary document.
However, as this is a wiki, past versions are saved in perpetuity:
* [http://wiki.iq-station.com/index.php?title=Vrui&oldid=109 Vrui 1.0-068]
* [https://wiki.iq-station.com/index.php?title=Vrui&oldid=187 Vrui 2.7-001]
==Vrui Version release dates==
Here is a table of dates (sometimes approximate) of when different
versions of Vrui have been released):
{| class="wikitable"
|+ Vrui version release dates
|-
! Vrui Version !! Release Date !!
! Vrui Version !! Release Date
|-
| 1.0-034 || 08/03/2006 ||
| 6.0-001 || 08/05/2020
|-
| 1.0-039 || 10/03/2006 ||
| 8.0-002 || 03/13/2021
|-
| 1.0-043 || 04/04/2007 ||
| 9.0-002 || 11/18/2021
|-
| 1.0-050 || 02/29/2008 ||
| 9.0-003 || 04/15/2022
|-
| 1.0-062 || 07/01/2009 ||
| 9.0-004 || 05/24/2022
|-
| 1.0-068 || 02/25/2010 ||
| 9.0-005 || 06/14/2022
|-
| 2.3-001 || 03/14/2012 ||
| 10.0-001 || 07/27/2022
|-
| 2.4-004 || 10/30/2012 ||
| 10.1-001 || 08/08/2022
|-
| 2.6.002 || 02/05/2013 ||
| 10.1-006 || 03/14/2023
|-
| 2.7-001 || 03/16/2013 ||
| 10.2-001 || 03/20/2023
|-
| 3.0-002 || 08/13/2013 ||
| 10.2-002 || 04/13/2023
|-
| 3.1-002 || 02/04/2014 ||
| 11.0-001 || 01/26/2024
|-
| 3.2-pre || 11/03/2015 ||
| 11.0-003 || 03/22/2024
|-
| 4.0-001pre || 12/02/2015 ||
| 12.0-001 || 04/02/2024
|-
| 4.2-004 || 10/18/2016
|-
| 4.3-001 || 07/18/2017
|-
| 4.5-004 || 08/06/2018
|-
| 4.6-002 || 12/04/2018
|-
| 4.6-005 || 12/17/2018
|-
| ... || ...
|}


=See Also=
=See Also=
* [http://idav.ucdavis.edu/~okreylos/ResDev/Vrui Oliver Kreylos' Vrui page]
* [[ViveLighthouse | Vive Lighthouse]] &mdash; Setting up Vrui as a Valve Lighthouse interface
* [http://idav.ucdavis.edu/~okreylos/ResDev/Vrui/Vrui20ReleaseNotes.html Changes between Vrui 1.x and 2.x]
* [http://web.cs.ucdavis.edu/~okreylos/ResDev/Vrui Oliver Kreylos' Vrui page]
* [https://web.avl.indiana.edu/wiki/index.php?title=Vrui IU AVL Wiki's Vrui page] (which will often be in sync with this page) (Login required)
* [http://doc-ok.org Oliver Kreylos' blog]
* [http://visualideation.org/mediawiki/index.php?title=Vrui VisualIdeation Wiki's Vrui page] (Login required)
* [http://vroom.library.ucdavis.edu/Software/Vrui Vrui tarball directory]
* [http://vruione.org An unofficial continuation of the Vrui 1.x series]
* [https://web.cs.ucdavis.edu/~okreylos/ResDev/Vrui/index.html Old Download page]
* [http://web.cs.ucdavis.edu/~okreylos/ResDev/Vrui/Vrui20ReleaseNotes.html Changes between Vrui 1.x and 2.x]

Latest revision as of 14:20, 16 May 2024

Vrui VR integration library

Vrui is a VR integration library from the University of California at Davis' KeckCAVEs facility. Vrui takes the approach of providing a framework into which applications are integrated and can take advantage of many different plugin tools and navigation controls that are independently created from the application.

There are pre-existing Vrui_Applications written at UC-Davis and DRI/INL as part of our immersive visualization ensemble. But before using a Vrui application, one must first install and configure Vrui.

Vrui LidarViewer

Vrui Versions

As of the last update of this Wiki page, the latest version of Vrui is 12.0-001. The API has gone through a handful of minor breaking changes, which (in the future) may be specifically documented, though once all the old applications have been updated, there will be diminishing need for that information. There are also multiple versions of Vrui's VR-DeviceDaemon protocol, which fortunately, Vrui generally negotiates a mutually agreeable protocol between client and server before input data is transmitted.

If you have applications written for multiple lines of the Vrui library, then you will need to have each branch installed. Fortunately, this is rather easy to do, and following these directions will ensure that your system will work with multiple versions of Vrui installed.

This page has most recently been updated for Vrui version 12.0-001, but much of the configuration details are the same for older versions.

To determine what version of Vrui a dynamic library (SO/DLL) is, or what version of Vrui an application was compiled with, search through the ASCII strings of the binary for "libVrui".

  • % strings <application> | grep libVrui


Building Vrui

Vrui Dependencies

Basic Vrui depends only on two packages which are generally installed on any self-respecting computer:

  • OpenGL
  • X-windows

There are also a number of highly-recommended packages that will enhance Vrui:

  • libusb1-devel — for communicating with some I/O devices
  • vulkan-validation-layers — for compositing video to hidden HMD screens
  • glslang-devel / glslang-tools — for compositing video to hidden HMD screens
  • OpenAL — for audio collaboration
  • zlib-devel
  • libpng-devel
  • libjpeg-devel
  • libtiff-devel
  • libasound2-dev
  • bluez-libs-devel
  • libogg & libtheora — for recording VR sessions

Installing Vrui

As of Vrui version 8.0 or so, Vrui can be downloaded and installed via the "PullPackage" method, which auto-downloads and builds configurations based on the local system. However, it is also still possible to download a tarball and manually build/install/configure. These instructions have been tested with Vrui version 12.0-001, but should generally work for other versions of Vrui. Note that mostly for the purpose of using [[Modules

  1. Download Vrui
    Download from the Vrui Download page
  2. Untar in a local directory
    % tar -zxf Vrui-12.0-001.tar.gz
    % mkdir Vrui-12.0-001_<os>
    % cd Vrui-12.0-001
  3. Adjust the makefile
    % $EDITOR makefile
    • set INSTALLDIR to "/opt/VR/Vrui-12.0-001_<os>"
      NOTE: adding the build-version to INSTALLDIR helps avoid issues when upgrading
      NOTE also: Adding an abbreviation for the OS (e.g. "_el8" or "_u22") helps the modules system to install the proper version.
      NOTE furthermore: the </opt/VR> path is an example. This should be change to the actual installation directory
  4. Adjust makefile [optional — as required]
  5. Fix a bug (update tracking for single tracker)
    % cp -p VRDeviceDaemon/VRDeviceManager.cpp{,_orig}
    % $EDITOR VRDeviceDaemon/VRDeviceManager.cpp
    • Change: "if(trackerReportMask==fullTrackerReportMask)" to "if(trackerReportMask != 0)"
      NOTE: Currently there are two lines where this should be changed.
  6. Set the location of SteamVR (if not in usual place) [optional]
    % export STEAMVR=<path-above-drivers>
    (this is a pointer to the path where drivers/lighthouse/bin/<OS>/driver_lighthouse.so is found)
  7. Compile
    % make -j 8
    (this will take less than a minute)
  8. Install
    % sudo make install
  9. Create Module file [optional]
    % $EDITOR $MODULEPATH/vrui/<version>
    (Add details of where the "bin", "lib", "include" and "share" directories are)
    NOTE: If $MODULEPATHcontains more than one directory, then pick the relevant one.

That's it!

Configuring Vrui

Configuring Vrui can be a very difficult task. A general hint is to find a working configuration setup that's close to what you want to do and then modify! As we gain more experience, we will put more specific advice/instructions here.

In the meantime, here are links to other sources of information:

As of Vrui version 2.7, there is a handy Vrui application called "DrawEnvironment" that will display a representation of the screens and tracked objects of the current configuration. This can come in quite handy when troubleshooting configuration difficulties — of course, you need to have something partially working to make use of it.

Here are some unorganized bits of information as I encounter them during my trials (and tribulations):

  • Comments are denoted with the hash (#) symbol through the end-of-line
  • When discussing Vrui configuration options, a directory-like syntax is used by the Vrui library (but not the configuration file). In the configuration files, sections have sections within them.
  • In Vrui.cfg, the "root" section is the one selected for use, when not specified on the command line with the -rootSection option it defaults to Desktop
  • In theory Vrui can use any coordinate frame. In practice, use Z-up since applications seem to assume this.
    • thus, always set root/upDirection (0.0, 0.0, 1.0)
  • Windows and Screens go hand-in-hand (I'd prefer them to be a single entity)
  • root/displayCenter — the place where the world will go when centering the display (including initial location)
  • root/displaySize controls the relative size that the vis-world is rendered. A good rule-of-thumb is to set this to be half the front screen's diagonal

Testing Vrui

Once the VRDeviceDaemon is running (which may be through a script such as RunOpenVRTracker.sh), there are tools available to confirm the proper operation of the tracking.

From the Vrui tool suite is "DeviceTest", which connects to the daemon server and reports input values.

To report the location values from tracker #0 use:

% DeviceTest -t 0

From the FreeVR tool suite there is a similar tool called "vruiddtest", which will generally report all the input values.

To report all the inputs with a special "screen" rendering, use:

% vruiddtest -screen

Compiling Vrui Applications

Vrui comes with some example programs that can be quickly compiled and used for experimentation.

  1. % cd ExamplePrograms
  2. In the past it was required to adjust the makefile
    (This is no longer required)
    % $EDITOR makefile
    • for Vrui 2.x & 3.x: set VRUI_MAKEDIR to "/opt/VR/Vrui-2.7-001/share/make"
    • for Vrui 1.x: set VRUIDIR to "/opt/VR/Vrui-1.0-068"
  3. Compile
    % make
  4. Run
    % ls bin
    % bin/VruiDemo
    This should open a window with a spinning cube.

Running Vrui Applications

In normal circumstances, a properly compiled Vrui application, running on a system with a proper Vrui configuration, can be run simply by calling the executable from the command line. For example:

% ShowEarthModel

Running on an HMD

To run a Vrui application such that it appears inside the view of an HMD, there are options that can be included on the command line to activate this. As a shortcut, the "OnHMD" script can also be used — though caution should be taken when the application is run through another Bash script.

% OnHMD ShowEarchModel

Activating Vrui options

The Vrui library has it's own command-line arguments that can be applied to any Vrui application. Features include the ability to select a non-default display mode — such as CAVE vs. HMD vs. Desktop.

Another example is to increase the verbosity of the application and Vrui library, which is often useful when tweaking and debugging the configuration:

% ShowEarthModel -vruiVerbose

Keyboard Inputs

There are a handful of keyboard inputs that Vrui recognizes, in addition to which, any unassigned keyboard action can be mapped to any of Vrui's built-in tools.

Keyboard Shortcuts

Keyboard shortcuts can affect the rendering of the application scene when typed while a window has focus.

Here is one (some):

Vrui Keyboard Shortcuts
Keyboard Input Affect
Win-Scrolllock Toggle "burn mode" (aka OSD) (FPS if it's on)

Mapping Inputs to Tools

...

==Selecting Alternate Display Modes A Vrui configuration file ("Vrui.cfg") may contain multiple configuration sections, for different systems, or for different layouts of one system. By default, the first of these % ShowEarthModel -rootSection 3DTV

Adding Vislets

Vrui is designed such that "generic" tools (plugins) can be written that can be added to any application at runtime. In Vrui parlance, these are called "vislets".

For example, to add a frame render-time display to an application:

% ShowEarthModel -vislet FrameRateViewer

NOTE: depending on how the application parses command-line options, it may be required to add the Vrui options after the application-specific options.

Older Vrui Versions

Specific references to building, installing and configuring older versions of Vrui will generally be removed from the primary document. However, as this is a wiki, past versions are saved in perpetuity:

Vrui Version release dates

Here is a table of dates (sometimes approximate) of when different versions of Vrui have been released):

Vrui version release dates
Vrui Version Release Date Vrui Version Release Date
1.0-034 08/03/2006 6.0-001 08/05/2020
1.0-039 10/03/2006 8.0-002 03/13/2021
1.0-043 04/04/2007 9.0-002 11/18/2021
1.0-050 02/29/2008 9.0-003 04/15/2022
1.0-062 07/01/2009 9.0-004 05/24/2022
1.0-068 02/25/2010 9.0-005 06/14/2022
2.3-001 03/14/2012 10.0-001 07/27/2022
2.4-004 10/30/2012 10.1-001 08/08/2022
2.6.002 02/05/2013 10.1-006 03/14/2023
2.7-001 03/16/2013 10.2-001 03/20/2023
3.0-002 08/13/2013 10.2-002 04/13/2023
3.1-002 02/04/2014 11.0-001 01/26/2024
3.2-pre 11/03/2015 11.0-003 03/22/2024
4.0-001pre 12/02/2015 12.0-001 04/02/2024
4.2-004 10/18/2016
4.3-001 07/18/2017
4.5-004 08/06/2018
4.6-002 12/04/2018
4.6-005 12/17/2018
... ...

See Also