There are a few additional steps one might want to do after successfully installing and calibrating the AR Sandbox software that I left out of the full installation instructions for brevity. These are minor tweaks: ensuring that CalibrateProjector and SARndbox always run in full-screen mode, automatically binding calibration or water management tools to keys, and automatically hiding the mouse cursor if the mouse isn’t moved.
These steps involve creating custom configuration files, which open up another host of possible fine-tuning options if one wants to go there. The following assumes an installation of Vrui-4.2-005 or newer, and SARndbox-2.3 or newer.
As of version 4.2, Vrui supports per-application configuration files. These are stored in a directory ~/.config/Vrui-<version>/Applications, and given the same name as the application to which they apply, plus a .cfg extension. In the following, replace Vrui-4.2 with your actual Vrui version, and replace pluma with another text editor if you do not use the MATE desktop environment. For example, the Gnome text editor is called gedit.
First, create a configuration file to force CalibrateProjector to start in full-screen mode, and bind the calibration tool to two buttons:
cd ~/.config/Vrui-4.2
mkdir Applications
cd Applications
pluma CalibrateProjector.cfg
Into the new file, paste the following text exactly:
section Vrui
section Desktop
section Window
windowFullscreen true
endsection
section Tools
section DefaultTools
section CalibrationTool
toolClass CaptureTool
bindings ((Mouse, 1, 2))
endsection
endsection
endsection
endsection
endsection
and then save the file and exit from the text editor.
If you now start CalibrateProjector, its window will cover the entire screen, with no title bars or panels remaining. If you press the “1” key, the program will capture a tie point, and if you press the “2” key, the program will re-capture the background, indicated by the screen turning red for two seconds.
You can replace the “1” and “2” key names in the “bindings” tag with any other keys you like.
Next, create a configuration file to set up the SARndbox itself. In the same terminal, run:
pluma SARndbox.cfg
Into the new file, paste the following text exactly:
section Vrui
section Desktop
section MouseAdapter
mouseIdleTimeout 5.0
endsection
section Window
windowFullscreen true
endsection
section Tools
section DefaultTools
section WaterTool
toolClass GlobalWaterTool
bindings ((Mouse, 1, 2))
endsection
endsection
endsection
endsection
endsection
and then save the file and exit from the text editor.
As in the first case, this will force SARndbox to start in full-screen mode, ensuring that the calibration created using CalibrateProjector exactly matches the one used in the actual AR Sandbox. In addition, the “mouseIdleTimeout 5.0” setting will hide the mouse cursor after five seconds of inactivity. To get the cursor back, simply move the mouse. Finally, the “WaterTool” section binds a tool to add or remove water from the AR Sandbox globally, by pressing “1” to rain, and “2” to drain. As above, set the binding to whatever keys you prefer.
If you run the AR Sandbox from a laptop, or if your computer has a main display screen in addition to the projector, and you are using “extended desktop” mode where the two displays are logically placed next to each other, then the CalibrateProjector or SARndbox windows might show up on the wrong display. To automatically force them to the correct display, you can use Vrui-4.2’s output naming functionality.
Open up the SARndbox.cfg configuration file with a text editor, and insert the following into the “Window” section:
section Window
...
outputName Foo
...
endsection
then save the file and exit from the text editor. Now run SARndbox with the -vruiVerbose command line option:
cd ~/src/SARndbox-2.3
./bin/SARndbox -uhm -fpv -vruiVerbose
This will print a lot of information to the console, including the names of all video outputs and monitors connected to your PC. Note the name that corresponds to your projector, and enter it in the configuration file in place of “Foo” above. Then apply the same change to the CalibrateProjector.cfg configuration file.