It's free to join Gamasutra!|Have a question? Want to know who runs this site? Here you go.|Targeting the game development market with your product or service? Get info on advertising here.||For altering your contact information or changing email subscription preferences.
Registered members can log in here.Back to the home page.

Search articles, jobs, buyers guide, and more.

By Alex Ferrier
Gamasutra
August 27, 1999

Printer Friendly Version

Letters to the Editor:
Write a letter
View all letters


Features

 

Contents

Introduction

Objects and Coordinate Systems

Mathematical Definition of Bezier Curves

A Review of Bezier Surfaces

Introducing Bezier Volumes

The FFD Operation

Bringing all the Theory Together

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:

  • The curve starts at P0 and ends at P3. It travels near-to, but not normally through, P1 and P2.
  • The curve’s initial direction is the same as the direction of the line from P0 to P1 and its final direction is in the direction of P2 to P3.
  • The curve is completely contained within the convex hull of its control points.
  • The further P1 and P2 are from the line joining P0 and P3, the more exaggerated the curve is. If P0, P1, P2, and P3 all lie in a straight line, the resulting curve is a straight line.


Mathematical Definition of Bezier Curves


join | contact us | advertise | write | my profile
news | features | companies | jobs | resumes | education | product guide | projects | store



Copyright © 2003 CMP Media LLC

privacy policy
| terms of service