| |
|
|
||||
![]() |
||||||
| |
|
|||||
|
Objects and Coordinate Systems Usually, a polygon mesh object's shape is defined by the coordinates of its vertices in its local coordinate system. The cornerstone of FFD is that the position of the object’s vertices is not modified directly. Instead, the object’s local coordinate system is modified, which changes the resulting position of the object’s vertices in world space. It's common in graphics to refer to "an object being rotated" or "an object being scaled." However, when describing FFDs, it is more useful to think in terms of coordinate systems – "the object’s local coordinate system is rotated, so the object appears to rotate." Thinking of the object in terms of changes to its local coordinate system means that the object can be animated in virtually any way so long as you deform its coordinate system appropriately. So FFD has the advantage of being a very general technique. A particular FFD-generated effect can be applied to any object with similar results. It's also not limited to a particular type of object – FFDs are equally applicable to polygonal models, Bezier curves, or any other object representation. This generality makes the technique ideal for use in game engines. Operations such as rotating and scaling are easy coordinate-system-based transformations to perform. Deformation techniques are not. They apply exactly the same operation to every vertex in the object, and straight lines in the object before the operation are still straight afterwards. If we have a coordinate system which supports bending or stretching more readily, the object will follow suit. To accomplish this we’re going to define a coordinate system with more freedom than our regular (X, Y, Z) axes. It’s going to be based upon Bezier volumes, which are an extension of Bezier curves and surfaces. Because of this, FFDs are dependent upon Bezier theory - but since most of this theory is becoming commonplace in game graphics, this shouldn’t be a problem. It’s often useful to visualize a new technique in terms of things with which you are already familiar. For instance, you can consider a Bezier curve a generalization of a straight-line segment. In fact, it's mathematically correct to say that a straight-line segment is "a Bezier curve of degree one." Similarly, a Bezier surface is a generalization of a plane, and a Bezier volume is just a generalization of a normal cubic volume. The only two differences between all these surface forms and their straight counterpoints are that 1) the surface forms are curved and 2) the number of points necessary to define them is greater. So there's not a lot to it, then - as Jim Blinn said, "We use complicated math all the time. Most everyday math is just a specific case of something more complex." A Review of Bezier Curves Fig. 1 shows two examples of Bezier curves. In fact, these are cubic Bezier curves – the kind that most computer graphics commonly use. I've labeled their control points P0, P1, P2 and P3, for each curve. The control points are a very important concept – they completely define the shape of the curve. Figure 1
From an artist's perspective, the advantages of Bezier curves are clear. The curve is easy to specify via its control point because given just the control points it's easy to visualize how the resulting curve will look.
From the curves shown, it is easy to see the following:
|
|
|