Vrui and the CAVE run using configuration files that set many environmental parameters. These generally can not be changed from within the CAVE. Rather, one overrides default (global) configuration parameters by writing a partial configuration file and merging it with the default file when an application is started. The name of the global configuration file is hard-coded into Vrui when the software is built from source. Vrui first reads the global configuration file and then the private one, e.g. global settings are overridden by your private ones.
If a file called Vrui.cfg exists in the current directory from which a Vrui application is started, it will be used automatically. When a user Vrui.cfg file is found, its sections and tags are merged into Vrui's configuration. This means that any new sections or tags are inserted, and the values of existing tags are replaced. Alternatively, Vrui's configuration can be adapted on a task-by-task basis by merging so-called patch configuration files after the global and user configuration files have already been loaded. If you want to change the global settings to private values every time you run a Vrui application, it is best to create a Vrui.cfg with those changes in the directory from which you start the application. In contrast, if you want different settings at different times, it is most convenient to use patch configuration files.
Configuration files need to have a particular structure that can be merged with the global Vrui.cfg. There are a number of examples listed below. In general, each configuration file has a section for the type of environment, rendering options, tools, etc. A more in-depth description of the way Vrui handles configuration files, and what the sections and settings mean, can be found in the online Vrui HTML documentation. Follow the links to The Vrui Configuration File or Vrui Configuration File Settings Reference.
An example of a private setting you might want to include for every application would be your left and right eye locations relative to the tracker in the glasses for better stereo viewing (if your eyes are not 2.5 inches apart). Here is what a Vrui.cfg file to do this would look like:
section Vrui section "caveman.geology.ucdavis.edu" # Choose a viewing mode by commenting out the ones you don't want viewerNames (Viewer, ConsoleViewer) # default settings # Viewer = person wearing the tracking device # ConsoleViewer = computer monitor section Viewer name Viewer headTracked true # true or false, use false for fixed view rendering headDevice Head # your eye positions relative to the base of the tracker # when wearing the glasses leftEyePosition (-1.1, -2.0, -1.5) rightEyePosition (1.1, -2.0, -1.5) # for mono rendering, make right and left eye positions identical endsection endsection endsection
In most other cases, changes to configuration settings are done on a case-by-case basis using patch configuration files.
The names of any number of patch configuration files can be supplied via a Vrui application's command line, using any number of
<commands to start the application> -mergeConfig <configuration file name>
-mergeConfig is followed by the name of a single patch configuration file, and the patch configuration files are merged into Vrui's configuration in the same order they appear on the command line. Patch configuration files are good for changing the background color, changing the rendering to have a fixed stereo projection location, to mono, or to anaglyph, etc.
We have a number of patch configuration files that do different things. They include:
Some are available on caveman at /home/shared/VruiConfig