time by specifying editing strokes, in which quadtree
hierarchy is used to represent the heightmap for mul-
tiresolution editing. (Bhattacharjee et al., 2008) im-
prove performance by utilising the GPU for render-
ing and editing the terrain simultaneously. The au-
thors use a fragment shader to operate on each height
value, and every time the terrain undergoes deforma-
tion or modification, the parameters of the actual pro-
cess are parsed into the shader, which could be a re-
sult of simulation of terrain dynamics or direct editing
performed by user using input devices such as mice.
(Dan et al., 2009) discuss various ways of terrain
editing, including geometric editing and texture edit-
ing. Similar to (Bhattacharjee et al., 2008), they also
modify the height point, but add natural looking varia-
tions by defining new height values using an outer and
inner radius and a parameter determining the radius.
We add to this work by providing an incremental up-
date technique which enables interactive terrain mod-
elling by minimizing data transfer and data structure
updates in GPU memory.
3 GEOMETRY CLIPMAPS
Geometry Clipmaps is a level-of-detail GPU-based
terrain rendering technique (Losasso and Hoppe,
2004; Asirvatham and Hoppe, 2005). It uses multiple
representations of the same terrain at different resolu-
tions to increase the efficiency of the rendering pro-
cess. The clipmaps data structure is broken into sev-
eral layers, each of which contains a higher resolution
than the layer below it. These layers are arranged by
centering them about the viewpoint and then render-
ing them. The terrain data is stored in a vertex buffer
object and updated as the viewpoint moves through-
out the simulation. This grid of data is stored using
an offset into the vertex buffer object to allow for a
toroidal access. By using a toroidal index the vertex
buffer object is able to only update a single column
or row rather than moving all rows or columns within
the vertex buffer object to a new location.
The update process examines each level in the
clipmap, starting from the lowest resolution and iter-
ating to the highest. Each level uses the viewpoint
of the camera to determine an active region of the
clipmap. If this active region differs from the previ-
ous update’s active region, then the vertex buffer ob-
ject is updated, and the data will be synchronised with
the terrain data that is stored within the RAM mem-
ory. When the terrain is rendered, each clipmap layer
renders a ring section within which the next clipmap
layer is rendered. The resolution decreases with in-
creasing distance from the viewpoint.
The most important aspect of the clipmaps data
structure is the way clipmap layers are blended to cre-
ate smooth transitions between them. The vertex in-
formation of the terrain stored by each clipmap layer
includes not only the x, y, and z coordinates of each
point in the terrain, but also an additional channel con-
taining the height of the parent layer at this point.
During the render method, an alpha value is calcu-
lated to interpolate between the vertex height and the
parent vertex height. The alpha value approaches one
for the vertices that are closer to edge of the clipmap,
therefore aligning the edge of the clipmap with the
edge of its parent clipmap layer.
4 DESIGN
In order to interactively model terrains we need a
technique with suitable data structures, which can be
modified to support interactive updates, and with as
few constraints as possible when using it. After care-
ful analysis we chose the Geometry Clipmaps algo-
rithm (Asirvatham and Hoppe, 2005). A major advan-
tage is that the algorithm performs well when viewed
from a top down perspective, which is important dur-
ing modelling, e.g., to add and view terrain structures
such as mountain ranges and rivers. The algorithm
also loads large sections of terrain, allowing for a
fast rotation of the viewpoint without a large com-
putational requirement. The algorithm merges well
with the sampling technique that the sketch based in-
put provides. The geometry clipmaps algorithm uses
multiple levels of detail and the sketch based input can
provide these different levels by sampling the con-
tours at different resolutions. Real-time incremental
updating of the terrain is achieved by computing small
clipmap sections fitting into multiple resolution repre-
sentations and as such minimizing the amount of data
passed between the RAM and graphics card memory.
4.1 Data Structures
The data for the surface of the terrain will be stored
within the RAM memory during the runtime of the
program. In order to access the terrain data and pro-
vide it to the clipmaps data structure, we wrote the
TerrainSurface interface.
The clipmaps algorithm requires different repre-
sentations of the same terrain at different resolutions.
The desired representations are obtained by calling
the methods within this interface with a Dimension
parameter. The terrain data is stored in RAM using
a one-dimensional array of floats. This packed data
is then accessed using offsets within the data. A data
GRAPP 2011 - International Conference on Computer Graphics Theory and Applications
182