MeshShop
Free-Form Deformation and Direct Manipulation
Patricia Atrian-Cruz
Peter Tubig

Introduction:

Free-form deformation is a versatile modeling tool plug-in that can be used for solids, wireframe surfaces or polygonal data. FFD project involves implementing a user interface that allows someone to modify the shape of an object by picking and dragging control points. The control points form a lattice box around the model which are change as control points are drag. This plug-in allows you to select a different amount of control points for different deformation. The less control points the less weight and faster deformation. The more control points the more weight to deform faces of model. This plug-in also allows you to save up to 9 pre-deform models to form a organize animation or play all save animations. By a toggle command model interpolated save frame mesh to play a full animation.

Direct manipulation (Single-Point Constraint) is an attempt to make deformations of model more user-friendly. The user selects point on the surface of the object and moves the point to a new location. The program automatically determines adjustments to the control points that effect this change. This plug-in also allows you to turn off direct manipulation and make deformations to model directly affecting vertices of mesh which result in a spiky model.


Installation/Compilation/Use:

Use Keyboard commands to interact with plug-ins.

To compile : Need meshshop files/makefile and type in type in command line:

for Unix: make
for Cywin: make -f Makefile.cywin

To run : [meshshop, ply_file]

ex. meshshop example_data/vase.ply

To use meshshop: (ALL KEYBOARD COMMANDS ARE lower-case)

Display Plug-In Commands: Right Click >Filter >HelpMenu (New window would pop up with all the keyboard commands for deformation and direct manipulation.

Use Deformation: Right click>Interactor>deformation and use keyboard commands to interact with the plug-in.

For picking: Pick gold diamonds to drag a point. If new point is don't correctly taken, old point will take new drag movement.

For rotation: Rotation works faster when you unload control points. So if you are rotating the object, press p then arrows keys and then press p again to load control points.

Use Direct Manipulation: Right click>Interactor>direct manipulation and use keyboard commands to interact with the plug-in.

For picking: Pick gold diamonds to drag a point. If new point is don't correctly taken, old point will take new drag movement.

Note: Every time you switch between plug-in you mush do (Right click>Interactor>plug-in). Also do consider that the large the ply file (number of vertices/faces) the more time it takes for calculation to be process.


Screen shots:

Dree-Form Deformation

 


[ Load different amount of control points using keys F1(less)...F9(more) ]


[ Switch between wireframe (press 'l') polygon
and fill polygon (press 'f') display of mesh. ]
Also in Direct Manipulation .

Click to View movie (.avi)

[Example of load control points (press p),
pick and drag control points ]
Click to View movie (.avi)

[ Example of many saved (press s) meshes and all (press t) animated (press a) deform mesh. ]

 

 

Direct Manipulation (Single-Point Constraint)


 


[ Two examples of load control points (press p), pick and drag control points ]

 


[ Example of load control points (press p), control vertices of mesh (press k - turn off the direct manipulation),
pick and drag control points ]

[ Switch between wireframe (press 'l') polygon
and fill polygon (press 'f') display of mesh.
Shrink (press '-') and Enlarge (press '+')]
Also in Deformation.

Algorithm:

Free-Form Deformation

We implemented Sederberg and Parry's Free-Form Deformation algorithm. This technique defines a free-form deformation in terms of a tensor product trivariate Bezier polynomial. We begin by imposing a local coordinate system, (s, t, u axes) on a parallelepiped region in which encloses the geometric model. Any point X is specified in the region as:

X = X 0 + sS + tT + uU

We next impose a grid of control points P ijk on the parallelepiped region, where it lies on the lattice. Their locations are defined:

P ijk = X 0 + (i/l)S + (j/m)T + (k/n)U

These form l + 1 planes in the S direction, m + 1 planes in the T direction, and n + 1 planes in the U direction.

The deformation is specified by moving the P ijk from their undisplaced, lattical positions. The deformed position X ffd of an arbitrary point X is found by first computing its (s, t, u) coordinates, and then evaluating the vector valued trivariate Bezier polynomial:

The new location of an object point is determined by the weighted sum of the control points.

 

Direct Manipulation (Single-Point Constraint)

We describe this technique that converts a user action of the form “move this point of the object to there” and finds control point positions that will effect this action. We implemented a single point constraint where the user wants to move a single selected point to a new position, or target point.

As the user moves a target point our goal is to configure the control points such that the deformed location of the selected point matches the target point location. The control-point configuration is based on moving the control points the least (in the least-squares sense).

We use Hsu’s algorithm of direct manipulation, where the algorithm is solving the “inverse” of FFD. The FFD algorithm rearranged is:


or

where we have to solve for the .

To find , first we solve the pseudoinverse of B, represented as B +.

Once the pseudoinverse of B is determined, the change in position of the control points based on the movement of the target point can be expressed as:

Then with , we add that to the original, undisplaced position of P and run the FFD algorithm.

 

Link:

Note: This program was design in windows machine using cywin.

Source Code available here.

Sample fly files : Stanford Buddy file1, file 2, file 3
                               Vase file1

 

Reference :
  • T.W. Sederberg, S.R.Parry. Free-Form Deformation of Solid Geometric Models. SIGGRAPH 1986 Vol. 20. No. 4.
  • W.H. Hsu, J.F. Hughes and H. Kaufman. Direct Manipulation of Free-Form Deformations. SIGGRAPH 1992 Vol. 26. No. 2.