Saturday, July 30, 2011

Real time continuous LOD rendering of height fields: Part I: Bootstrapping

The following set of posts will be aimed at chronicling my stab at implementing the paper on Real time continuous level of detail rendering of height fields (Peter Lindstrom, et all).


This marvelous technique simplifies height field rendering, by reducing the number of polygons that are sent to OpenGL, and provides for control of the loss of quality that will occur as a result of this reduction. Despite the rapid increase in the number crunching capacity of today's GPUs and the CPU, to me, the method presented in the paper still holds a lot of credence, because the reduction in polygon count obtained as a result of it is amazing.

As I'm getting into OpenGL coding after some time, I thought it prudent to, in the first post in the series, just set up to render height fields. Using SDL for windowing and eventing, and OpenGL for rendering, and a rectangular grid serving as the height-map, here's what I end up with:


This is planar terrain. The height map is rendered using triangle strips. As visible, we're using a large number triangle strips for the terrain. But, as the terrain is planar, the same effect could have, been achieved by the use of a single quad!

While this demonstrates an extreme case, by taking a small delta of difference in heights to be approximated as being coplanar, we can reduce the number of polygons in any generic height-map, not just this contrived one. One can also take in account the distance of the polygons from the view-point and carry out a coarse simplification for the polygons which are very far away. (Far away detail is anyway not visible to the user)

Next up, I'll get down to implementing the simplifications suggested in the paper.

No comments:

Post a Comment