Graphics Reference
In-Depth Information
the bottleneck of the algorithm, vertex skinning may introduce a performance limitation.
Luckily, there are techniques available that can reduce this dependency on vertex counts.
8.3 Vertex Skinning with Displacement Mapping
By using vertex skinning, we have significantly expanded the number of objects we can
represent with our rendering algorithms. We have techniques for both static and dynamic
meshes, and can perform animation with both of these mesh types. However, as mentioned
in the last section, using vertex skinning can introduce a performance bottleneck, due to the
additional mathematic operations performed on each vertex. It would be better to diminish
the link between geometric complexity and the number of vertices that must be processed.
Fortunately, some of the new abilities in the Direct3D 11 rendering pipeline can help us
achieve this decoupling.
Ideally, we would like to perform the skinning operation on a low-resolution model,
but we still want the detailed look of a high-resolution model. The tessellation stages of
the rendering pipeline allow us to perform this geometry detail injection. There are many
available techniques, but we will focus on one of the more versatile solutions— displace-
ment mapping. Displacement mapping essentially applies a height-map to every triangle in
a triangle mesh. By using the tessellation stages, we can tessellate a low-resolution mesh
to generate a higher number of vertices, and then sample the displacement map and modify
the position of each of the vertex with respect to the original lower-resolution triangles.
This effectively moves the highly detailed geometry out of the static vertex informa-
tion and into a texture instead. This has many advantages. The first is that we can perform
skinning on the lower-resolution geometry, but there are other benefits. Since a displace-
ment map can be mip-mapped, it allows for a simple level of detail (LOD) system to
be implemented automatically. In the following section, we will see how this technique
works, and how to implement it in the context of the Direct3D 11 rendering pipeline.
8.3.1 Theory
To displace the surface of the low-resolution triangle mesh, we must perform two opera-
tions. The first is to determine how much detail to add into the model, and the second is
to understand more precisely how we can perform this displacement operation. We will
consider these two items before moving on to the implementation details of this algorithm.
Dynamic Tessellation
Since we will be dynamically determining how much detail to add into the lower-reso-
lution mesh, we must consider the appropriate measures to select how much geometry is
Search WWH ::




Custom Search