O'Reilly logo

GPU PRO 3 by Wolfgang Engel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

2
I
Real-Time Deformable Terrain
Rendering with DirectX 11
Egor Yusov
2.1 Introduction
High geometric fidelity real-time terrain visualization is a critical part of many
applications such as flight simulators and computer games. For a large data set, a
brute-force approach cannot be exploited even on the highest-end graphics plat-
forms due to memory and computational-power limitations. Thus, it is essential
to dynamically control the triangulation complexity and reduce the height-map
size to fit the hardware limitations and meet real-time constraints.
Figure 2.1. Puget Sound elevation data set rendered with the proposed method.
13
14 I Geometry Manipulation
To effectively render large terrains, many dynamic multiresolution approaches
have been developed in the past years. These algorithms typically adapt the
terrain tessellation using local surface-roughness criteria together with the view
parameters. This allows dramatic reduction of the model complexity without sig-
nificant loss of visual accuracy. New capabilities of DX11-class graphics hardware
enable a new approach, when adaptive terrain tessellation is built entirely on the
GPU using the dedicated hardware unit. This increases the triangle throughput
and reduces the memory-storage requirements together with the CPU load. It
also reduces the amount of data to be transferred from the main memory to the
GPU that improves rendering performance as well.
To reduce the storage requirements, several recent approaches exploit com-
pression schemes. Examples of such methods are geometry clipmaps [Losasso
and Hoppe 04] and C-BDAM [Gobbetti et al. 06]. Though these methods are
optimized for maximum GPU efficiency, they completely ignore local terrain sur-
face features, significantly increasing the GPU load, and do not support real-time
deformations.
Dynamic terrain modifications are an important feature for a number of ap-
plications such as games, where the action changes the terrain, landscape editors,
and other elements. It poses a number of problems such as the need to construct
new triangulation and update internal data structures, which are especially com-
plex when compressed representation is exploited. As a result, real-time terrain
deformations are usually not considered.
The new terrain-rendering technique presented in this chapter combines an
efficient compression scheme with the GPU-accelerated triangulation construction
method and, at the same time, supports dynamic modifications. The technique
has the following advantages:
The proposed multiresolution compressed height-map representation sub-
stantially reduces the storage requirements and enables direct control of a
reconstruction precision.
Height-map decompression is accelerated by the GPU, which reduces ex-
pensive CPU-GPU data-transfer overhead and eliminates data duplication
in main and GPU memory.
Triangulation construction is completely done by the tessellation unit of
recent graphics hardware:
Topology is not encoded and completely generated by the GPU for
each camera position.
Strict screen space error bound of the rendered surface is provided.
The topology is updated automatically as the terrain is modified.
The technique is efficiently implemented using hardware-supported features
such as texture arrays and instancing.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required