Introduction

Title: Generating and rendering displacement maps with Adaptive Tessellation
Members:
Rohit Garg (05D26003)
Sriram Kashyap (08305028)

Displacement mapping is a technique using a texture (procedural or otherwise) as a height-map to cause an effect where the actual geometric position of points over the textured surface are displaced according to the value the texture function evaluates to at each point on the surface. It gives surfaces a sense of depth and detail, permitting self-occlusion, self-shadowing and silhouettes.

As it is an expensive technique owing to the large amount of additional geometry, displacement mapping has been restricted to high-end rendering systems. Real-time APIs like OpenGL, lacked this ability. One of the reasons for this absence is that the implementation of displacement mapping requires an adaptive tessellation of the surface.

Technique

Modern GPUs support a technique known as Mesh Instancing, which can be used to render large amounts of geometry with low overhead. Here the programmer can render a single mesh several times without the overhead of sending the mesh to the GPU over and over again. This is achieved through ‘instancing’ of the mesh, where there is only one copy of the mesh, but several instances of this mesh are rendered.

The vertex shader, a program that executes on the GPU has access to the ‘gl_InstanceID’ attribute which is unique to each instance of the mesh. This allows us to modify each instance of the mesh using the vertex shader, so that large amounts of apparently different geometry can be efficiently rendered on the screen. This technique has been used to refine coarse meshes by several orders of magnitude [1]. Note that current hardware does not allow us to efficiently perform geometry amplification. What we can achieve using the above technique is ‘pseudo’ tessellation.

We use this technique to adaptively refine a mesh to render a procedurally defined height field. The input is a plane and a user defined function. Initially, the plane is at z=0. The function is used to evaluate the plane’s displacement in a specified domain. Depending on the curvature of this function, we deform the mesh such that more geometry is concentrated at higher curvature region and less geometry is present at lower curvature regions.

Results


Wireframe shot showing higher geometry density at high curvature regions



Without adaptive tessellation and with adaptive tessellation


Reference

[1] A flexible kernel for adaptive Mesh refinement on GPU , Boubekeur, Schlick, Computer Graphics Forum, Vol 27, #1, page:102-114 -2008