\section{Related Work}

Terrain algorithms can be classified based on the underlying surface
used for displacement. Extensive research has been performed for
plane-based algorithms. Real-time Optimally Adapting Meshes (ROAM)
by Duchaineau\ea{DWS*97} is an effective CPU-based algorithm that
progressively refines the terrain mesh for the current view.  Losasso
and Hoppe~\cite{LH04} present geometry clipmapping, which is capable
of handling large amounts of static terrain data.  Asirvatham and
Hoppe~\cite{AH05} extend geometry clipmaps to use programmable
shaders, making the approach one of the first terrain algorithms to
take advantage of modern GPU capabilities.  Dick\ea{DKW09} implement
ray casting for terrain and find success with large amounts of data.

There are few terrain rendering algorithms that address the issue of rendering on a sphere or planetary body.
Cignoni\ea{CGG*03} describe Planetary Batched Dynamic Adaptive Meshes
(P-BDAM).  Large terrain databases are managed and rendered using the
batching capabilities of the GPU.  The planet is divided into a number
of tiles, where each tile corresponds to an individual triangle bintree.
Accuracy issues presented by high-resolution planetary datasets are
resolved using GPU hardware.

Kooima\ea{KLJ*09} present a method of planetary terrain rendering
that builds a terrain mesh using the CPU and the GPU. The algorithm
creates a mesh with vertices on the sphere, and later displaces these
vertices based on composited heights. First, coarse-grained refinement
is performed on the CPU to determine view-dependent levels of detail
within the mesh. Next, the coarse mesh is refined on the GPU to create
the final terrain. The mesh exists on the GPU as raster data, allowing for
various height maps to be composited and displace the mesh.

To create a planetary algorithm that operates entirely on the GPU,
we adapt the projected grid approach or PGM for planetary rendering.
PGM is a technique for approximating a surface displaced from a plane.
The technique was first applied as a method for visualization of waves
by Hinsinger~\ea{HNC02} and later extended by Johanson~\cite{Joh04}.
Bruneton\ea{BNH10} currently uses a projected grid for ocean wave
animation.

PGM was first applied to terrain by Livny\ea{LSGES08} and later
extended to make use of screen space error metrics to guide sampling
by L{\"{o}}ffler\ea{LRS09}. Schneider\ea{SBW06} use PGM for planetary
terrain synthesis, however they do not handle terrain beyond the horizon,
instead electing to obscure the horizon with atmosphere and fog effects.

PGM begins with a regular grid of points stretched across the viewport.
Each point is projected onto the terrain along its corresponding eye ray.
The terrain intersection point of each projected grid point corresponds to
a location within the height map. Therefore at each projected grid point,
the height map is queried and the point is displaced vertically along the
base plane normal. The projected and displaced grid is now interpreted as
a triangle mesh and rasterized.

There are some problem with this. The viewing camera may miss areas
of the terrain below the camera which could include mountains that
should intersect the viewing camera. This is solved by creating a
special sampling camera. Another problem is that the sampling rate of
the projected grid becomes much lower than that of the height map as the
distance from the viewpoint increases; although this leads to a positive,
gradual reduction of detail, the low sampling leads to missing details and
the appearance of wavy mesh.  This can be addressed by either increasing
the number of samples of the projective grid or using filtered versions of
the height map as the distance increases to reduce the sampling frequency
of the terrain function.
