IntroductionFor all who have been in a cave the past 3 years, bezier patches are a type of curved surfaces. There are other options, but beziers are the most common. Eventually patches are rendered as polygons, but because the polygons are generated dynamically, faster machines end up with smoother models, the ultimate in scalability. A bezier patch is specified by a number of points (control points) and a tessellation factor to determine smoothness (higher factor equals smoother surfaces). The number of control points depends on the type of patch you are using; I will be covering bi-quadratic and bi-cubic patches (9 points and 16 points, respectively). While higher order bezier curves are possible, they are not feasible for use in computer games. To start, lets look at a line:
P0 and P1 are the endpoints and Q is any point on the line. This line can be represented parametrically with the following equation: Where t varies from 0 to 1. This equation has 2 basis functions (functions it is based on): The equation can now be rewritten as follows: Simplified further to: All this means is that you take the sum of each basis function times each corresponding point.
|