Project: Free-Form Deformations

By: Samuel Wong

Objective 1: Set up basis functions
The Bernstein basis functions were used in the paper [1]. This was first implemented. The evaluation is done by the de Casteljau algorithm. But at higher degree, the program is not responsive enough for user interaction. Therefore, the Bspline basis functions were used instead. The evaluation is done by the de Boor algorithm. The program uses the cubic Bspline basis and assumes a uniform knot vector.
Objective 2: Manipulate control points
Control points are selected/deselected with a left mouse click/multiple control points can also be selected. Control points within an area can be selected by clicking the middle mouse button and dragging to specify an area. Clicking anywhere else on the window will invert the control points selection. All control points can be deselected with the 'D' shortcut key or from the menu.
The selected control points can be moved by clicking the right mouse button and dragging across the screen.
Objective 3: Navigating the views
There are 4 views available: 3-d view, orthographic view with respect to the x-axis, y-axis and z-axis. Also there is a composite view and shows all of the 4 views in the same window.
These were made available because of the inherent difficulty of manipulating control points.
Objective 4: Other options
The control points movements can be undone (shortcut key 'U') or redone (shortcut key 'R').
There is also an option to turn off the model drawing so that control points within the model may be selected.
Objective 5: Gestures
Because of the difficulty of manipulating control points, a gesture interface is implemented. This interface is based on [3]. There are two operations available, twist and bend.
Twist is implemented like a wrench winding the model.
Bend is implemented such that the model "follows" a user defined path.
Lost Objective 1: Direct manipulation
The major feature that is now missing from the program is direct manipulation. In this mode, user is able to select a point on the model, move it and causes the lattice to change.
This was implemented using the method in [2] by using the pseudoinverse to determine the original image point and the new point, so that the control points may be solved.
An attempt was made to implement this for multiple points. For simple selections (few shared control points), it worked fine but for the more complex cases (mostly when the solution is over-determined), it becomes inconsistent.
Lost Objective 2: Other options
The following additional features were available: loading OBJ files, saving deformed models, saving non-deformed models along with current lattice configuration, auto lattice construction with bounding box on loaded model, configurable subdivisions along the 3 axes independently, setting material properties.
Lost Objective 3: More gestures
There was one additional type of gesture implemented: stretch. There are two types of stretches. One type is done by drawing a "straight" line, and dragging the line to globally stretch/squash the lattice box. The amount of stretch depended on the displacement of the line and the distance of the lattice point to the line. The closer a lattice point is to the line, the more it gets stretched.
The second type of stretch is done by drawing a "curved" line, and dragging the line to locally stretch squash the lattice box. The curve and the displaced curved is projected like a beam; any lattice points within the beam gets stretched. Again, the amount of stretch is determined like the first type.
The other two types of gestures, twist and bend, were implemented more robustly. Twist can be configurable to twist only certain "levels" in the lattice. Bend can bend according to arbitrary axis, depending on the current view.
One other feature that was implemented was local selection. Certain parts of the model can be selected, bound with a lattice, and the deformation is only applied locally to those parts.
Miscellaneous Gallery
References
[1] Sederberg, T. W. and Parry, S. R., Free-Form Deformation of Solid Geometric Models, Proceedings of SIGGRAPH ‘86, Computer Graphics 20, 4 (August 1986), 151-159.
[2] Hsu, W. M., Hughes, J. F., and Kaufman, H. 1992. Direct manipulation of free-form deformations. In Proceedings of the 19th Annual Conference on Computer Graphics and interactive Techniques J. J. Thomas, Ed. SIGGRAPH '92. ACM Press, New York, NY, 177-184.
[3] Geoffrey Draper and Parris K. Egbert. 2003. A Gestural Interface to Free-Form Deformation. Graphics Interface, 2003, 113-120.