Content uploaded by Matthias Trapp
Author content
All content in this area was uploaded by Matthias Trapp
Content may be subject to copyright.
EUROGRAPHICS 2010 / H. P. A. Lensch and S. Seipel Short Paper
3D Isocontours – Real-time Generation and Visualization of
3D Stepped Terrain Models
T. Glander, M. Trapp and J. Döllner
Hasso-Plattner-Institut, University of Potsdam, Germany
Abstract
Isocontours (also isopleths, isolines, level sets) are commonly used to visualize real-valued data defined over a 2D
plane according to a set of given isovalues. To support the 3D landscape metaphor for information visualization,
a 3D stepped terrain can be derived by lifting and extruding isolines to their particular isovalue, but typically
requires triangulation of the resulting surface representation in a preprocessing step. We present a concept and
rendering technique for triangle-based terrain models that provide interactive, adaptive generation and visualiza-
tion of such stepped terrains without preprocessing. Our fully hardware-accelerated rendering technique creates
additional step geometry for each triangle intersecting an iso-plane on-the-fly. Further, an additional interpolation
schema facilitates smooth transition between established 3D terrain visualization and its stepped variant.
Categories and Subject Descriptors (according to ACM CCS): I.3.5 [Computer Graphics]: Computational Geometry
and Object Modeling—Geometric algorithms, languages, and systems I.3.7 [Computer Graphics]: Picture/Three-
Dimensional Graphics and Realism—Animation
1. Introduction
Isolines or isopleths are closed contours that are tradition-
ally used on maps to visualize terrain height, originally es-
pecially in mountain cartography [Imh07]. In addition to
height of a terrain model, arbitrary real-valued data defined
over a 2D domain is commonly presented using isoline vi-
sualization. 2D isolines apply quantization to the displayed
variable and map it directly to color, 3D visualization using
the terrain metaphor applies quantized colors to continuous
surface. We suggest to complement these traditional alterna-
tives with stepped terrain visualization, in which quantiza-
tion is applied not only to color, but also to geometry (Fig. 1).
We present a technique for triangle-based terrain mod-
els that provides real-time rendering for a 3D stepped ter-
rain visualization. Using GPU programs, vertex positions are
adapted to the nearest particular isovalue. Further, each trian-
gle intersecting an isoplane is tesselated into geometry con-
sisting of vertical or horizontal triangles to form a sharp stair
structure. The resulting values can be blended according to a
given factor with the original values, allowing intermediate
states.
Our technique makes the following main contributions:
•Stepped terrain geometry is created dynamically, support-
ing interactive changes, e.g., through time-variant data or
changing intervals of the contours.
•The proposed interpolation schema enables smooth blend-
ing of the original data, allowing for focus+context visu-
alization with soft-edged lenses or camera dependent vi-
sualization.
2. Previous work
Visualization of terrains was studied extensively in cartogra-
phy and presented, for example, by [Imh07]. Regarding lay-
ered relief depictions, Tanaka studied their construction and
the effect of lighting, therefore these maps often are called
Tanaka contour maps though being used earlier in similar
form [Tan50]. Today, most researchers dealing with terrain
visualization concentrate on photorealistic rendering of mas-
sive data models, e.g. [DKW09, PG07]. Methods to apply
cartographic visualization styles on terrains were presented
in [D¨
07] based on image space operations.
In information visualization, 2D data is often presented
using a terrain metaphor [SML06], either by mapping the
variable of interest to color (2D) or height (3D). Here, iso-
contours reveal classes in the data. A typical application is
c
The Eurographics Association 2010.
EARLY DRAFT
T. Glander & M. Trapp & J. Döllner / 3D Isocontours
Figure 1: Traditional isoline visualization (left), continuous 3D terrain with draped isolines (center), our stepped 3D terrain
visualization (right).
dot spatialization, e.g., in visualization of document collec-
tions: to show clusters in the data, a density field is computed
and presented as a terrain surface. The appropriateness of 3D
vs 2D visualization methods depends on the use case and is
subject to experiments [TSD09,CM01].
Existing approaches for geometric contour extraction re-
quire precomputed index structures, and identify seed sets of
cells containing or points lying on a contour [CSA03]. The
focus was also put on I/O-efficient processing of massive
data sets, e.g., [SCESL02].
A similar problem is approached by the marching cubes
algorithm [LC87]: by classifying cells of a 3D scalar field,
fitting geometry from a lookup table is placed in the cell.
This idea was also transferred to graphics hardware to per-
form isosurface extraction in realtime, e.g., by [TSD07].
Even before the advent of GPUs capable of geometry gener-
ation, they where used to accelerate visualization of isosur-
faces, as surveyed in [SCESL02].
3. Rendering
3.1. Preliminaries
Input data commonly used in 2.5D terrain visualization can
be defined as a function f(x,y) = zthat maps continuous co-
ordinates (x,y)∈R2to a continuous value z∈R. In practice,
this typically amounts to a grid or a set of triangles that ap-
proximates the surface through piecewise planar primitives.
Isovalues are a discrete, uniformly distributed and typi-
cally small set of real values α∈ I ⊂ R. They implicitly
define isolines as g(f(x,y),I) = {(x,y):f(x,y)∈ I}. 2D
plots of f(x,y)use a mapping for values of zto a color, and
display isolines in a distictable color. For presentation, the
color between isolines is often also quantized according to
the isolines.
A 3D visualization can be naturally obtained using
f(x,y) = zdirectly for height. The 3D surface is then de-
scribed in R3by all points p= (x,y,z)that satisfy f. Ac-
cordingly, isolines are given by h(f(x,y),I) = {(x,y,z)∈
R3:f(x,y)∈ I}. For 3D stepped terrain visualization, we
have to subdivide triangles crossing isolines and create new
geometry representing steps. A threshold tihalfway between
two subsequent isovalues αi,αi+1describes the split height.
3.2. Step tessellation
We use GPU programs at vertex, primitive, and fragment
level to create 3D stepped terrain visualization.
At vertex level, we quantize each vertex’ height, adapt-
ing it to its nearest isovalue αi(Fig. 2, left). The major part
is done at primitive, i.e., triangle, level, where we generate
vertical walls approximating the isoline avoiding alignment
to the original structure.
v2
v0
v1
z
x
sr
s'l
sl
z
x
z
y
x
v2
v0
v1
αi
αi+1
αi+2
αi+3
ti
ti+1
ti+2
Figure 2: Left: input triangle spanning several quantiza-
tion levels, Center: segments sland srdescribe the triangle
stepwise. Right: tesselation forming step geometry.
As additional geometry is only needed for triangles cross-
ing one or more isolines, we are only concerned with trian-
gles, where the quantized height values hq(vi)of their partic-
ular vertices viare different: Wi=0,1,2hq(vi)6=hq(vi+), with
vi+,vi−defined cyclical. If this criterion is met by a trian-
gle, we calculate its minimum height. Starting with the min-
imum height, the algorithm increases height in steps of the
quantization interval until the maximum height is reached.
To guide the geometry construction, we calculate and adapt
c
The Eurographics Association 2010.
T. Glander & M. Trapp & J. Döllner / 3D Isocontours
a left and a right segment sl= [vi,vi−],sr= [vj,vj+]that
describe the current part of the triangle (Fig. 2).
At each step, we do the following:
Identify configuration: All vertices’ quantized heights are
compared with the current height in counter-clockwise or-
der starting with v0. Zero to two vertices will be found and
assigned to sl,sr. At the initial iteration, two vertices al,ar
are set to the lower boundaries of sl,sr. The segments re-
main unchanged if no new vertex was found.
Calculate threshold positions: At points pt
land pt
rthe seg-
ments cross the next threshold t. Their positions can be
obtained by linearly interpolating each segment’s bound-
aries using the threshold height t:
pt
l= (1−βl)vi+βlvi−with βl=t−h(vi)
h(vi−)−h(vi)
pt
r= (1−βr)vj+βrvj+with βr=t−h(vj)
h(vj+)−h(vj)
Create geometry By lifting pt
l,pt
rto the next isovalue αi+1
we obtain bl,br, which complete the definition of the cur-
rent step. The step consists of a horizontal quad with
vertices s0=al,s1=ar,s3,s2and a vertical quad s2,
s3,s5=br,s4=bl. The concave vertices s2,s3corre-
spond to bl,brwith their height set to the current isolevel:
s2=lift(br,αi),s3=lift(bl,αi).
The algorithm generates these triangles (Fig. 3(a)) and
sets color, normal, texture attributes as appropriate, using
βl,βrto interpolate given values from the original ver-
tices. Correct orientation is guaranteed by the differentia-
tion of left and right segments. Finally, alis set to bland
arto brfor the next iteration.
Special handling is needed for the case, that a single ver-
tex vwas identified in between (Fig. 3(c)). A new triangle
(al,ar,v)must be created and either alor arreplaced by v,
then, depending on the segment vbelonged to.
The loop stops, after maximum height has been reached.
To complete the step geometry, one finishing triangle – both
segments’ ends share the same vertex – or two finishing tri-
angles – the segments have different ends – are generated
(Fig. 3(b)).
The tesselation creates step geometry based on input tri-
angles and a desired quantization, only. If, additionally, a
height field is given, the geometry can be smoothed by ap-
plying multi-sampling. Also newly calculated normals at the
steps can be smoothed by specifying the same normals at
vertices of neighboring triangles, using local gradients in the
height field.
3.3. Interpolation schema
Some applications require the ability to generate intermedi-
ate states of the stepped terrain visualization, e.g., for smooth
activation of the effect or a soft lens application. Therefore,
al=ar
blbrblbr
alar
(a) Step triangles
vi=bl=br
alar
vi+1 =blvi=br
ar
al
(b) Closing triangles
vi
(c) Complex configuration
Figure 3: All configurations including complex cases (c)
can be expressed by four basic tesselations (a,b).
it is desirable to have an interpolation schema that allows for
specifying the degree of the effect in an interval γ∈[0,1].
To implement this, we have to linearly blend the quantized
heights with the original height v.z= (1−γ)·v.z+γ·hq(v).
For the step geometry, heights of the vertices on the isoline
s2,s3,s4,s5have to be blended with the threshold height ti.
This enables to specify γglobally, apply it depending on
camera distance, or individually according to a function de-
fined on the same domain as the height field, i.e., a grayscale
texture.
4. Application examples
Dynamic data, which changes according to an additional
dimension, e.g., weather forecast, measured audio fre-
quencies, 3D functions, is a common use case for isoline
visualization. To demonstrate our technique on dynamic
data, we generated a series of images from 3D noise func-
tion. At runtime, our application uses these images as
height maps of an artificial terrain model, that are iterated
at regular time intervals. In the rendering, emerging and
collapsing peaks can be observed (see the accompanying
video) in quantized visualization.
Lenses are used to show different data representations in
the same place using a lens metaphor [BSP∗93]. Through
the presented interpolation schema, we are able to apply
a smooth lens to the visualization, that shows the origi-
nal continuous terrain model inside the lens, and show the
abstracted, quantized model outside (Fig. 4). Our imple-
c
The Eurographics Association 2010.
T. Glander & M. Trapp & J. Döllner / 3D Isocontours
Figure 4: The lens reveals the ridge on the backround while
presenting layered steps on the left side and foreground.
mentation is based on an additional grayscale texture to
represent the lens by values in [0,1].
5. Discussion
Method As our technique creates new geometry in the
shader stage, it can be integrated easily into existing ter-
rain rendering systems. While a simple shading approach
would suffice for static view parameters, interactive ex-
ploration requires extra geometry to yield distinct silhou-
ettes. An alternative would be to preprocess the terrain,
which would also allow merging triangles on plateaus. For
dynamic data, however, preprocessing and upload to the
graphics card would occur each frame.
The bottleneck of our current approach is the complex de-
cision tree run for each step of a triangle, the worst case
being a triangle crossing all quantization levels.
Performance We tested our technique on an Intel Core2
Duo (3GHz) with 4 GB memory and nVidia Geforce 9800
GT graphics card having 512 MB VRAM. Our perfor-
mance measurements show interactive rates for small data
sets, dropping below 6 FPS for 256x256 sized terrain
models (Table 1). It shows that the technique is limited by
the size of the input model and the number of quantization
steps. In our tests, screen resolution had no significant im-
pact on the performance.
#steps 64x64 128x128 256x256
5 47.42 22.25 5.08
10 27.26 14.04 2.98
15 24.65 11.51 2.32
20 21.25 11.07 1.87
Table 1: Frames-per-seconds measured at a screen resolu-
tion 1024x768 are given for different configurations.
6. Conclusion
We present a novel concept and technique for the rendering
of 3D terrain models using a stepped terrain visualization.
Our approach creates the necessary geometry on-the-fly and
is therefore suited for dynamic applications such as dynamic
magic lenses and dynamic, e.g., time-variant data models.
Achnowledgements
This work has been funded by the German Federal Ministry
of Education and Research (BMBF) as part of the InnoPro-
file research group “3D Geoinformation” (www.3dgi.de).
We are grateful for helpful comments from the anonymous
reviewers as well as from our colleagues.
References
[BSP∗93] BIER E., STON E M. , PI ER K ., BUXTON W., DERO SE
T.: Toolglass and magic lenses: the see-through interface. In Pro-
ceedings of the SIGGRAPH conference (New York, New York,
USA, 1993), ACM Press, pp. 73–80.
[CM01] COCKBURN A. , MCKENZIE B .: 3D or not 3D? Evaluat-
ing the effect of the third dimension in a document management
system. In Proceedings of the SIGCHI conference (New York,
NY, USA, 2001), ACM Press, pp. 434–441.
[CSA03] CARR H., SNOEYINK J., AXEN U.: Computing con-
tour trees in all dimensions. Computational Geometry: Theory
and Applications 24, 2 (2003).
[D¨
07] DÖLLNER J.: Non-Photorealistic 3D Geovisualization,
2nd ed. Springer, Berlin, Heidelberg, 2007, pp. 229–240.
[DKW09] DICK C., KRUG ER J., WESTERMANN R.: GPU Ray-
Casting for Scalable Terrain Rendering. In Proceedings of Euro-
graphics 2009 (2009), pp. 43–50.
[Imh07] IMHOF E.: Cartographic Relief Presentation. ESRI
Press, 2007.
[LC87] LORENSEN W. E., CL INE H. E.: Marching cubes: A high
resolution 3D surface construction algorithm. In Proceedings of
the SIGGRAPH conference (New York, NY, USA, 1987), ACM
Press.
[PG07] PAJAROLA R. , GOBBETTI E .: Survey of semi-regular
multiresolution models for interactive terrain rendering. The Vi-
sual Computer 23, 8 (2007), 583–605.
[SCESL02] SILVA C., CHIANG Y., EL-SA NA J., LINDSTRO M
P.: Out-of-core algorithms for scientific visualization and com-
puter graphics. In Visualization ’02 (Los Alamitos, CA, USA,
2002), IEEE Computer Society Press.
[SML06] SCHRO ED ER W., MARTIN K., LORENSEN B.: Visu-
alization Toolkit: An Object-Oriented Approach to 3D Graphics,
4th Edition. Kitware, 2006.
[Tan50] TAN AK A K.: The Relief Contour Method of Represent-
ing Topography on Maps. Geographical Review 40, 3 (Januar
1950), 444–456.
[TSD07] TATARCHUK N., SHOPF J., DECORO C.: Real-Time
Isosurface Extraction Using the GPU Programmable Geometry
Pipeline. In SIGGRAPH course notes (2007).
[TSD09] TORY M., SWINDELLS C., DR EE ZE R R.: Comparing
dot and landscape spatializations for visual memory differences.
IEEE transactions on visualization and computer graphics 15, 6
(2009), 1033–9.
c
The Eurographics Association 2010.