| |
| | ||||
![]() | ||||||
| | | |||||
|
Dynamic Level of Detail Terrain Rendering with Bézier Patches This
paper discusses the terrain system used in SSX. An algorithm for
the tessellation of polynomial surfaces is presented. The system allows
for adaptive tessellation with continuous level-of-detail while avoiding
the introduction of cracks and seams between adjacent surfaces with different
geometric resolution. The Surface lighting on the terrain is discussed.
Bézier
patches are chosen for their fast run time evaluation, affine invariance,
and convex hull property (for quick occlusion and intersection tests).
The terrain is represented as a grid of Bi-cubic Bézier surfaces.
Traditional polygonal lighting models require a vertex-normal pair in order to generate a colour for each vertex. The graphics hardware interpolates the vertex colours over the polygon surface. With dynamic evaluation of a parametric surface the number of vertices and their position will be changing. As a result a dynamically tessellated vertex-normal lighting system will tend to pop and move which will detract from the quality of the moving image. In order to avoid this one must decouple the geometric resolution from the light sample resolution. We use light-maps. Light maps encode lighting as 2D textures. At run time the light map texture is modulated with a surface texture of each polygon to create the final image. With this method the surface lighting does not pop when the geometric resolution changes. We also have the added benefit of calculating the lighting off-line using whatever lighting model we like. The trade off is we lose the ability to dynamically change the surface lighting without recalculating light maps at run time. Background A parametric curve defined in three dimensions is given by three univariate functions: As we vary u from 0 to 1 and we hold v constant we sweep out a curve in three-space. An infinity of such curves exists as we vary v from 0 to 1 and this defines the surface in three dimensions. A Parametric curve is usually a polynomial: Computer graphics generally stick to a degree of 3 that is cubic. For degrees greater then 3 there is a trade off between curve flexibility and descriptions that are more cumbersome to work with. The cubic form looks like this:
For equation 2 the control points are (p0, p1, p2, and p3) and the basis polynomial are (1, u, u2 and u3). A bi-cubic parametric surface has the form of equation 3 and is traced out as the parameters (u,v) take all possible values between 0 and 1. This is known as a patch. Free form surfaces are modelled using nets of patches. Bi-cubic parametric patches are defined over a rectangular domain in uv-space and the boundary curves of the patch are themselves cubic polynomial curves. A point Q with the co-ordinates (x,y,z) in Cartesian space is represented by the parameters (u,v) in parametric space. Using the same control point and basis function representation we define the patch as: Where pij is a set of 16 control points:
The net
of control points forms a polyhedron in Cartesian space and the position
of the points in this space controls the shape of the surface. where: For a cubic Bézier curve the basis functions are:
|
||||||||||||||||||||||||
|
|