Content area
Full Text
Realistic Damage on the fly
One thing that makes games feel realistic is the ability to interact with the environment. If a player hits or shoots something, they expect it to change in some way. Most games will at least have some sort of visual feedback, such as a decal texture or a particle system showing smoke or dust. Some games may have a few breakable objects, like glass bottles. Ideally, you would like everything in the scene to change its shape based on the damage the player does to it. Games rarely do this though, primarily because of the complexity of modifying geometry in real time and the extra preparation necessary by artists to create damage geometry. Still, a player can easily lose the sense of immersion when his RPG is able to destroy a heavily armored tank, but only leaves a scorch mark when it's shot at a wall.
Decal tessellation is a simple solution to this problem. The idea is that you can take a displacement map texture, project it onto geometry--just like a decal--and tessellate the geometry in real time so that the displaced geometry looks like physical damage to the object. Figure 1 shows an example of decal tessellation. The ability to tessellate in real time is what enables this technique. Both Direct3D 11 and OpenGL 4.0 have APIs for hardware tessellation, and at least two of the current graphics hardware vendors have GPUs that are capable of doing tessellation. Since tessellation is a required feature in Direct3D 11, you can expect most, if not all, future GPUs to be suitable for this technique.
Hardware Tessellation
Before going into too much detail about the implementation, I should first go over some of the basics of hardware tessellation. Figure 2 shows the Direct3D 11 pipeline which includes the tessellator stages. At the top of the pipeline is the vertex shader. Usually the vertex shader is responsible for all vertex transformations, including the transformation to clip space prior to rasterization. With tessellation, the input mesh is called a control cage or control mesh, since it's a mesh of patches made up of control points. The simplest patches are just triangles. The vertex shader can be used for transforming the control mesh, as...