glSOAR Information

glSOAR is ObjectPascal implementation of SOAR terrain rendering algorithm using OpenGL. It can be compiled using FPC or Delphi compiler and works in Windows and Linux (only benchmarking mode). No fancy OpenGL extensions are required, it should work with any OpenGL 1.2 and newer drivers.

SOAR algorithm was published by Peter Lindstrom and Valerio Pascucci in 2001. SOAR starts with coarse terrain mesh each frame and uses view-dependent refinement (standard longest edge bisection) to calculate mesh to be rendered - stress is on the CPU.

Startup Parameters

You can set many glSOAR options by passing values to it using command line parameters. All supported parameters and their usage are listed in the table below. Or you can conveniently set them using GUI Launcher program if you don't like command line.

parameter usage
-map=<file name> selected image will be used as height map of the terrain
-texture=<file name> selected image will be used as terrain color texture map
-size=<integer> size of the terrain block in samples (must be 2n)
-blocks=<integer> number of terrain blocks used
-scale=<integer> scaling of samples of source terrain height map (in percents)
-startx=<integer> default camera position (X axis)
-starty=<integer> default camera position (Y axis)
-anisometric=<true|false> enables/disables anisotropic error metric
-filter8bit=<true|false> enables/disables filtering of 8 bit height maps (before terrain is build)
-fullscreen=<true|false> enables/disables fullscreen mode (uses desktop resolution)
-dxt=<true|false> enables/disables DXTC texture compression
-detail=<true|false> enables/disables terrain detail texture
-anisotex=<true|false> enables/disables anisotropic texture filtering
-fog=<true|false> enables/disables fog
-benchmark=<true|false> runs program in benchmark mode

Controls

You can control camera and change SOAR settings using keyboard and mouse. Details on what does what are in the table below. There is also popup menu where you can change some settings without the need to touch the keyboard. Menu can be opened by pressing right mouse button.

camera movement
key or action usage
mouse movement looking around
cursor key Left strafe left
cursor key Right strafe right
cursor key Up step forward
cursor key Down step backward
holding Shift increase movement speed
holding Ctrl increase movement speed A LOT (for very large terrains)
F turn on/off flying (camera won't follow terrain)
PageUp increase camera height (when flying is on)
PageDown decrease camera height (when flying is on)
SOAR settings
key or action usage
S show/hide statistics and current SOAR settings
R turn on/off forced full terrain refinement
C turn on/off invisible geometry culling
E switches between isotropic and anisotropic error metric
P increase tolerance value (user error in pixels)
O decrease tolerance value (user error in pixels)
L increase FOV angle defining view frustum (for culling)
K decrease FOV angle defining view frustum (for culling)
M increase minimal LOD level (refinement won't use LODs more detailed than this)
N decrease minimal LOD level (refinement won't use LODs more detailed than this)
rendering settings
key or action usage
W turn on/off wireframe rendering
T turn on/off terrain texture map
D turn on/off terrain detail texture map
G turn on/off fog

Benchmarking

You can run glSOAR in benchmarking mode using -benchmark=true command line parameter or just by pressing Benchmark button in Launcher program. Benchmarking consists of several flybys over terrains, each with different settings. Various stats are collected for each test scene and after last test they're written to output. You can compare your results with benchmarks on other PC setups which are located in Bin/Results directory.

Links