Eyeon:Manual/Grid Deformation

From VFXPedia

< Eyeon:Manual
Revision as of 20:17, 14 March 2008 by Izyk (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The Grid Warp tool is a 2D mesh warper. It provides a grid of points that can be used to deform the image according to a source and destination grid. This tool is useful for advanced deformation, set extension, and basic morphing operations, to name just a few.

The grid size can be adjusted to include as few as four control points or as many as 2500. The control points are created by subdividing the grid along the X and Y axis. Control points are created wherever the subdivisions meet.

Grid Deformations are based on a linked pair of source and destination grids. The source grid is used to set up the initial mapping coordinates of the image. Adjustments made to the source do not directly affect the image. They only define the initial state of the grid.

Both grids can be animated over time, allowing the deformation to follow a moving or changing object within the scene. Each grid has its own independent animation spline.

See also the Grid Warp tool reference

Contents


Getting Started

Drag and drop a Grid Warper tool into the flow and display the image into the view. The default setup is an 8 x 8 grid with 64 control points. There is a source or destination grid. These are chosen by selecting the buttons in the tool controls. By selecting and dragging the points on the grid, the image can be warped.

This approach is fine for simple warping but the real power of the grid warper is revealed when a proper source grid is set up first.

The Source Grid

Generally, artists using the grid warp tool start by setting up the Source Grid. Select the Source button in the tool's controls to work with the grid.

Use the source grid to set up the initial conditions of the grid, placing points where they are most needed. Once the source grid is set up, it is copied to the destination grid as indicated below so that the actual warping can begin.

Changes made to the source grid do not warp the image. It may help to think of the source grid as a place to set the mapping coordinates of a 2D texture that will be warped by the destination grid.

Positioning The Grid

Layout the grid to cover the area that is to be deformed. This may be the entire image or it may just be a region. If this is to cover the entire image, no changes are required.

Often, the target of a deformation does not cover the entire frame of the image. A grid that covers the entire image is undesirable, requiring far too many control vertices to achieve proper resolution in the areas that need it. For example, warping the lips of a character who is frowning into a smile will change the performance.

To cover a smaller region, set the mode to Edit Rect and adjust the corners of the grid using the onscreen controls until the grid covers the area of interest. If the area of interest is moving, it is often helpful to animate the center of the grid or connect it to a tracker, both of which can be done while in edit rectangle mode. When the right position and size of the grid is achieved, switch back to Edit Grid to continue.

Dividing The Grid

Now that the source grid is in place, choose how detailed the grid will be by selecting the number of divisions in the grid along the X and Y axis. A control point is added wherever the grid separations intersect.

To create a grid with more density along the Y axis than the X axis, set the X Grid Size to 2 and Y to 6. The resulting grid will contain 12 control points.

Arranging The Control Points

Now that the grid is divided, Arranging The Control Points to better suit the shape of the object to be warped in the image may be required. For example, when warping an apple, shift some of the points to line up along the outline of the apple, as shown below.

Using the selected method of moving points rather than the region or magnet modes is generally preferred, so click on the Selected button in the tool controls.

Note
Once the shape of the grid has been adjusted, any changes to the X and Y size will reset the grid, destroying all changes.



Edit Line Mode

Many of the objects that need to be morphed are organic and do not lend themselves to square type deformation. The Edit Line Mode provides a shortcut that may help to quickly create a grid using a simple shaping spline.

Click on the Edit Line button and create a polyline shape by clicking to add points in the display view. A grid will be drawn using the points as a guide. Use the Point Tolerance slider to determine the grid's density. Higher values produce a less dense grid. Snap distance is used to draw in points that are close to the edge of the shaping spline.

Once the grid is complete, switch back to Edit Grid mode.


Using The Destination Grid

Now that the source grid is set, click on the Destination button to start using the destination grid. This is where the image starts to be warped.

The image may look quite distorted at first while the grid maps the source grid to the destination grid. Click on the Copy Source To Destination button at the end of the tool controls.

If the grid is smaller than the size of the image, the pixels outside of the grid will likely be blacked out. Switch to the tool's Render tab and deselect the Black Background checkbox.

Now adjust the grid's control points to warp the image.


Selection Modes

There are three methods to selecting points in the grid, using the button array in the tool controls.

Selected
The Selected method only manipulates control points that have been explicitly selected.
Region
The default is the Region method. The region method only affects the vertices within the range of the circle when the mesh is first clicked. A circle around the mouse pointer appears in the display view to show the size of the region.
Magnetic
The Magnetic method (as well as the region method) is used to assist with creating smooth, organic meshes. A circle around the mouse pointer appears in the display view to show the size of the magnetic region.


Neither the Region or Magnetic modes require a direct click on a control point. Click anywhere in the mesh and any points within the region of the circle will be moved as the pointer is dragged. The magnetic method affects all vertices that come within the domain of the circle, even if they only enter the region after the pointer is moved.

The distance of the magnet's effect can be changed by changing the Magnet Distance slider in the grid warp tool's Controls Tab or by holding down the D key while click-dragging the mouse to the left and right.

More details on the operation and setting of the magnet cursor can be found in the description of each control found below.


Animating The Grids

Grid's often need to be animated to adapt to changes in the source material over time. Neither the source or destination grid is animated by default. Right-click on the label in the tool controls that reads Right-Click Here For Mesh Animation and select Animate from the context menu.

This attaches the grid to a polychange spline, just like the spline used to animate the shape of polyline and baseline masks. All points on the grid are driven by the one spline. Changes made to one control point will keyframe the position of all control points for that frame.

For more explicit control over an individual point in the grid, the point can be published. Publishing a point disconnects it from the polychange spline, allowing the point to be animated using a path or a tracker. For more details on publishing a point, see Publishing Points in the Effect Masks chapter.


Advanced Spline Shaping Modes

The same Advanced Spline Shaping Modes that are available for splines can also be applied to vertices on the mesh. Select the points to be transformed and:

  • Hold down the T key. Click-drag to twist the selected points.
  • Hold down the S key. Click-drag to scale the selected points.
  • Hold down the X key. Click-drag to horizontally scale the selected points.
  • Hold down the Y key. Click-drag to vertically scale the selected points.

The position of the mouse pointer when the transformation begins becomes the center used for the transformation.