Using Shake's shape-based Warper node, you can easily create specific warping effects using tools very similar to those used by the RotoShape node. Using shapes, you can deform parts of an image to conform to shapes you draw in the Viewer.
The Warper and Morpher nodes use a lot of memory when processing high-resolution images--using four image channels of the full image buffer in float space for each processing thread used. Memory usage may become an issue when warping and morphing large images when multi-threaded processing is enabled. As a result, virtual memory usage may noticeably slow processing speed when the maximum available RAM is used.
For example, if you have 2GB of RAM in your computer, and Shake plus assorted OS operations use 300 MB, this leaves 1.7 GB of total memory left for image processing by the Warper or Morpher nodes for any given frame. You can calculate the RAM used for a frame at a given image size using the following formula:
4 * (image width * image height * 4) * (number of threads)
Using this formula yields the following memory usage table:
If you don't have enough RAM to handle the resolution you're working at, switch the maxThread parameter in the Globals tab to 1. This reduces the memory requirements for this operation.
The Warper allows you to use animated shapes to control and animate the deformation of an image using four types of shapes that you draw. These shapes work together to define which parts of an image will be deformed to fit into shapes that you define.

Note: The colors of each control shape type can be modified in the shapeColors group of the guiSettings section of the Globals tab.
Source shapes and target shapes may be drawn separately, or you can duplicate the source shape you create and modify it to quickly create a target shape. It's not necessary for the source and target shapes to have the same number of points, since the actual path that an animated deformation will follow runs along the connection lines that appear once you connect a source shape to a target shape.
In both the Warper and Morpher nodes, you may create as many Source/Target shape pairs as necessary to deform various parts of the subject. Unlike the RotoShape node, which only allows for the creation of closed shapes, the Warper and Morpher nodes allow you to create closed shapes, open-ended shapes, and single-point shapes. This flexibility allows you to create any kind of deformation you need.
Unless you're deforming a still image, it will probably be necessary to animate the source and target shapes you use to fit the motion of the subject you're deforming. For example, if you're creating a warp for an actor who's moving, you'll need to animate the source shape to conform to the outlines of the actor so that they follow his or her motion. You'll then need to animate the target outlines to follow the same motion.
Here's a shortcut that may save you some effort when you create a warp effect using an animated shape. First, animate the source shape that defines the area of the image you want to warp. Afterwards, you can duplicate and modify it as necessary to use as the target shape, without having to reanimate the entire shape.
For more information about keyframing shapes, see "Animating Shapes" in chapter 15 of the the Shake Reference Guide, "Painting, Rotoscoping, and Other Image Functions."
In addition to manually keyframing source and target shapes, you can attach Stabilize or Tracker nodes to either source or target shapes to aid you when rotoscoping moving features. This works identically to the way you attach Stabilize or Tracker nodes to shapes in the RotoShape node. For more information, see "Attaching a Tracker to a RotoShape" in chapter 15 of the Shake Reference Guide, "Painting, Rotoscoping, and Other Image Functions."
When you first connect a source shape to a target shape in the Viewer, four connection lines appear that run from the source to the target shapes. These control lines serve two purposes. First, they show you which segments of a source shape correspond to which segments of its connected target shape. Second, their angles define the path the pixels of the image will follow when warping from their original position to the target position you've defined.

The start and end points of control lines that are connected to the source and target shapes can be moved by dragging them back and forth along the shapes themselves. Changing the angle of the lines by moving the in or out point of a control line independently allows you to redefine the angle of deformation for all pixels in that area of the warp.

Control lines can be moved, and even animated, to control the way the speed and direction of deformation. Additional control lines may also be created to give you more precise control over the deformation itself.
The Warper and Morpher both work by pushing and pulling the pixels of an image to move parts of the image defined by the source shapes to the region defined by the target shapes. When part of an image is warped, the surrounding area stretches to accommodate the change, as if the image is on a sheet of rubber being pushed and pulled to distort it.

The region affected by the resulting deformation is not limited to the area defined by the source/target shape pairs. In fact, you'll notice that a significant area of the image surrounding each source/target shape pair is also deformed. While there is a 100 percent displacement at the actual position of the source and target shapes, the total area of deformation lessens gradually with the distance from the shape pair. This may result in a warp not only affecting the intended subject, but also the surrounding background.
This aspect of the Shake warper is useful in that it helps to smooth the transition between the warped and unwarped parts of your image, resulting in a more realistic effect. It also means that sometimes it's not necessary to create as many source/target shape pairs as you might think--a single shape pair's area of influence may be enough to create the effect you want.
On the other hand, there are usually parts of an image that you don't want warped. For example, if you're warping someone's eyebrows, chances are you don't want his or her hair to be distorted as well. You exclude parts of an image from being affected by the Warper or Morpher nodes using boundary shapes.
It's important to understand that boundary shapes don't eliminate distortion from the surrounding image; they minimize it.

It may take more than one boundary shape to completely lock down an image. Fortunately, you can create as many boundary shapes as necessary to eliminate unwanted distortion in an image.
Warning: Target shapes should never cross boundary shapes. Doing so may create unwanted distortion and tearing in the resulting image.
There are many ways you can use boundary shapes to prevent parts of an image surrounding an area of deformation you've set up from being affected by a warp effect. One is to use a closed shape to surround a pair of source/target shapes, which minimizes their effect on the surrounding area of the image.
For example, if you warp a subject's eyes so that they bulge open, but you don't want the effect to overly stretch the rest of the face, you can create a boundary shape to isolate the source/target shapes around the eyes. Sometimes, you may have to use several concentric rings of boundary shapes to completely lock down an area of the image.

You can also use boundary shapes to "pin down" specific areas of an image that you don't want to be affected by a warping effect. For example, if you were creating a warp effect to manipulate an animal's face, you could use a combination of open and closed shapes and single-point shapes to prevent the eyes and nose from being affected by the warp you're applying to the eyebrow area.

Note: By default, the outer edge of the frame is used as a boundary shape. This behavior can be disabled by turning off the addBorderShape parameter in the Parameters tab for the Warper or Morpher node you're adjusting, but this may produce unexpected results.
Even when you use one or more boundary shapes to pin down areas surrounding a warp effect, you may find that some of the surrounding image is still affected, however slightly. For this reason, it may be useful to isolate the subject of the image prior to using either the Warper or Morpher nodes. Ideally, the subject of the warp effect was shot against blue or green-screen, and can be keyed. If not, you can always rotoscope the image using a RotoShape node.
In either case, the Warper and Morpher nodes affect the alpha channel of the image along with the RGB portion, so you can always add either to the end of a node tree you've created to isolate your subject. This way, you can add a clean background no matter how extreme the warping effect is.
Many of the shape controls of the Warper and Morpher nodes are identical to those of the RotoShape node, and all share the same methods for creating tangents, closing shapes, inserting and deleting points, etc. If necessary, you may refer to the RotoShape documentation for more information on creating and modifying shapes.
When a Warper or Morpher node is selected, the following buttons appear in the Viewer Shelf.
The Warper and Morpher nodes both have the following controls.
The biggest difference between drawing shapes with the RotoShape node and the Warper and Morpher nodes is that while the RotoShape node only allows you to draw closed shapes, the Warper and Morpher nodes also allow you to create open shapes and single-point shapes. Open shapes make it very simple to define deformations for things like eyebrows, muscle outlines, and other contours that don't require a complete outline. Single-point shapes allow you to define deformations for small image details, and are also very effective as boundary shapes you can use to pin down parts of the image you don't want to be affected by nearby source/target shape pairs.
The Warper and Morpher nodes both warp the image using the same shape controls, and the methods used to create and edit shapes for use by each node are identical.
Click the Parameter control of the Warper or Morpher node you want to create a new shape with to load its parameters into the Parameter tab, and its controls into the Viewer Shelf.
In the Viewer Shelf, click the Add Shape button.
If necessary, zoom into the image in the Viewer to better trace the necessary features of the subject you want to warp.
In the Viewer, begin drawing a shape by clicking anywhere on the image to place a point.
Continue clicking to add more points to the shape. Click once to create a sharply angled point.

To create a point with tangent controls to make a Bezier curve, click and hold the mouse button down, and drag to one side of the point until the angled point becomes a curve.

The distance you have to drag before the angled point becomes a curve is customizable via the rotoTangentCreationRadius parameter in the shapeControls section of the guiSettings group in the Globals tab.
There are three ways you can end shape drawing to create different kinds of shapes:

Every time you create a new shape, an additional shape parameter appears in the parameter tab of the corresponding Warper or Morpher node. By default, each new shape parameter that's created is named "shape1Name," and the middle number is incremented with each new shape you draw. These names can be changed to more easily identify the specific parts of the subject you've isolated for individual manipulation later.
Once you've created a shape, there are several ways you can modify it. These techniques also work for keyframing shapes used for animated warping effects. For more information about keyframing shapes, see "Animating Shapes" in Chapter 15 of the Shake Reference Guide, "Painting, Rotoscoping, and Other Image Functions."
When editing shapes that are close to other shapes, it may be helpful to turn off the Enable/Disable Shape Transform control in the Viewer Shelf, to hide Transform controls from other shapes that may overlap the shape you're editing. After your source/target shape pairs have been defined it may also be helpful to turn off the visibility of shape types that you don't need to see. For example, turning off the visibility of all source shapes while you're editing their corresponding target shapes will prevent accidental adjustment of the wrong overlapping points. You can turn different groups of visibility controls on and off for each setting of the Select Display pop-up menu in the Viewer Shelf.
Click the Parameter control of the Warper or Morpher node with the shape you want to modify to load its parameters into the Parameter tab, and its controls into the Viewer Shelf.
In the Viewer Shelf, click the Edit Shapes button.
Select one or more points you want to edit by doing one of the following:
When the selected points are hilighted, rearrange them as necessary by doing one of the following:
Using the transform control without the Shift key pressed modifies the entire shape, regardless of how many points are selected.
Click the Edit Shapes Mode button.
Shift-click the part of the shape you want to add a control point to.A new control point appears on the shape where you clicked.
Select the point or points you want to remove.
Those points disappear, and the shape changes to conform to the remaining points.
Select the point or points you want to convert.
Click the Toggle Shape/Line Mode button to convert angled points to curves, or curves to angled points.
An optional step is to set the Show/Hide Tangents button to All or Pick to view tangents as they're created.
Make sure the Show/Hide Tangents button is set to All to view all tangents, or Pick to view only the tangents of points that you select.
Make sure the lock tangents control is turned off.



Make sure the Enable/Disable Shape Transform Control is turned on.
When you move, scale, or rotate a shape using its Transform control, each transformation occurs relative to the position of the transform control. To move a shape's Transform control in order to change the center point about which that shape's transformation occurs, press the Command or Control key while dragging the transform control to a new position.
To manipulate the shape, drag one of the transform control's handles:

Individual shapes may be hidden, if necessary, to help you isolate one or more shapes you want to make adjustments to. Hiding shapes simply makes them invisible. Hiding a shape has no affect on the resulting warp effect, all source/target shape pairs continue to warp the image as before.
When a Warper or Morpher node is selected in the Node View, each shape in that node is labeled in the Viewer. By default, each shape is numbered in the order that it was created. These names can be customized in that shape's corresponding parameter in the Parameter tab. These names help you to identify which shapes are which when you're changing their individual visibility.
You can also show or hide all shapes of a particular type using the Visibility Toggles in the Viewer Shelf. Each control affects the visibility of all shapes of that type in the Viewer. The Visibility Toggles supersede the Visibility settings in the Parameter tab.
Each setting in the Select Display pop-up menu in the Viewer Shelf of the Warper and Morpher allow these controls to be set independently. For example, in the Warper, the visibility settings set when displaying the Source image can differ from those set when displaying the Target image.
Click the Visibility toggle control in the Viewer Shelf that corresponds to the shape type you want to hide.
A fast and easy way to create corresponding target shapes once you've drawn a source shape is to duplicate it, and modify the duplicate. This is especially useful for instances where the general shape of the target shape you want to create is similar to the source.
Click the Edit Shapes Mode button to allow you to select shapes in the Viewer.
Move the mouse cursor over the edge, or the transform control, of the shape you want to duplicate so that it's hilighted, then right-click and choose one of the following commands from the shortcut menu:
After using the Duplicate and Connect Shape command, locking or hiding the source shape immediately insures you won't accidently modify it when making changes to the new duplicate.
You can copy shapes from a RotoShape node and paste them into a Warper or Morpher node for use as a source, target, or boundary shape. This is especially useful in cases where you've already isolated the subject using a RotoShape node and you can use that shape as a starting point for your warp effect.
With the mouse over the transform control of the shape you want to copy in the Viewer, do one of the following:
Note: When copying a shape, the mouse cursor must be directly on the shape you intend to copy. Otherwise you may not copy the correct shape.
Select the Warper or Morpher node you want to paste it into.
The pasted shape appears just like any other newly created closed shape, and you can modify or duplicate it as necessary.
To create the actual warp effect, you need to connect each source shape you've created to a corresponding target shape. You can do so by either drawing two shapes separately and connecting them afterwards, or by drawing the source shape and duplicating it to use it as a starting point for the target (two shortcut menu commands, Duplicate Shape, and Duplicate and Connect Shape make this easy). Regardless of your intended use for the shapes you've created, until they're connected to one another they remain unassigned.
Click the Connect Shapes Mode button.
Immediately click the target shape you want to connect to the source shape you clicked in step 2.
After they've been connected, the source shape appears light blue, and the target shape appears dark blue to indicate that the connection has been made. Purple connection lines appear between the source and target shapes to show which parts of each shape are connected.
In the Parameters tab of the corresponding Warper or Morpher node, an additional connection parameter appears for the connection you established. By default, each new connection parameter that's created is named "connection1Name," with the middle number incremented as each new connection is created. These names can be changed to more easily identify each specific connection for individual manipulation later on.
In the Parameters tab of the corresponding Warper or Morpher node, click the Delete button of the connection parameter corresponding to the connection you want to break.
After disconnecting a source/target shape pair, both shapes become unassigned, and turn yellow by default.
Once you've connected a pair of source/target shapes, connection lines appear to show the deformation path that pixels along the source shape will follow to conform to the target shape. These connection lines can be moved to change this path, and alter the look of the warp effect. You can also add more connection lines to increase the amount of control you have over the warp effect.
Click the Edit Connection Mode button.
Drag a connection point to another location on the shape. The connection point's movement is restricted to the contour of the shape.
Click the Edit Connection Mode button.
Drag a bounding box or Shift -click each point to select both the start and end points of the connection line you want to move.
With both points selected, dragging one of them will move both at the same time. Both ends of the connection line are restricted to moving along the contours of the source and target shapes, and you can't move a connection point past another connection point.
Click the Edit Connection Mode button.
Shift -click either a source or target shape at the location you want a new connection line to be created.
A new connection line is immediately created where you clicked. The other end of the new connection line is placed at the closest point of the corresponding shape in the pair.

Once you've created one or more source or target shapes, you can lock them individually in a Warper or Morpher node's parameters tab, or all together using the Lock Source/Target Shapes buttons under the Viewer. This is useful if you're modifying source and target shapes that are very close together, and you want to make changes to one without accidentally moving the other.
Do one of the following:
You can also lock individual source and target shapes using the lock control to the left of each shape parameter in that node's parameter tab. However, the Lock Source/Target Shapes buttons under the Viewer always supersede these individual shape-locking parameter controls. See See Parameters in the Warper Node for more information.
You can use any open or closed shape or single-point shape as a boundary shape to pin down areas of the image you don't want to be warped, or to exclude whole areas of the image from being affected by the source/target shape pairs you've created. You can create as many boundary shapes as you need to lock areas of the image you don't want to be warped.
Since boundary shapes are essentially shapes that are both source and target shapes simultaneously, you also define them using the Connect Shapes button.
Select the Warper or Morpher node you're working on, then create a new shape outlining the region of the image you want to lock down.
To turn this shape into a boundy shape, do one of the following:
The shape turns orange by default to indicate that it's now a boundary shape, and a new connection parameter appears in the Parameters tab of the Warper or Morpher node. By default, each connection parameter that defines a boundary shape is named after the shape it corresponds to. For example, if the original shape was named "shape3," the connection parameter that defines it as a boundary shape is named "shape3_boundary."
Once you've turned a shape into a boundary shape, the only way to turn it back into an unassigned shape is to delete the connection parameter that corresponds to it in the Parameters tab of the Warper or Morpher node using that parameter's Delete button.
Click the guiSettings disclosure control to open the guiSettings parameters.
To access different shape customization controls, do one of the following:
By default, source shapes appear light blue, target shapes appear dark blue, connection lines appear purple, boundary shapes appear orange, and unassigned shapes are yellow. These colors can all be changed using the following parameters in the rotoShapeColors section of the guiSettings group of the Globals.
Click the color swatch of the shape color parameter you want to change.
Use the Color Picker tab to select a new color to use for that shape type.
All shapes of that type are now displayed with the new default color you selected.
Various behaviors for selecting points, creating Bezier curves, and adjusting each shape's transformation control may also be customized in the rotoShapeControls section of the guiSettings group of the Globals. You can modify how each of these controls works to better suit your working style or input method, for example, whether you use a graphics tablet or mouse.
Each parameter has a slider that adjusts the control's behavior:
The Warper node is useful for creating targeted deformations to alter the shape of a subject in an image. Examples might include making someone's nose grow, making an animal's eyes widen in surprise, or causing a bump to grow on someone's forehead. The warper can be used to make a static change to a subject, or it can be animated to cause dynamic changes in the subject's shape.
A simple example of a Warp node used to warp an image with a single pair of source/target shapes would appear with the following parameters. For Warp nodes with more source/target shape pairs defined, there will be more shapeName and connectionName parameters listed.
Attach the Warper node to an image.

First, draw and, if necessary, animate your source shapes.
These shapes define the parts of the subject you want to warp. When you're ready to finish your shape, do one of the following:
To add additional source shapes to define additional areas of the subject to warp, click the Add Shape button. Each shape you create using the Morpher node is yellow, indicating that it's unassigned and does not yet have any effect on the image.

Next, you need to create a corresponding target shape for each source shape you created. Target shapes define the contour of deformation that the pixels identified by each source shape are moved to. You create target shapes using the same shape-drawing techniques you used to draw the source shapes in step 2.
Another technique you can use to create a target shape quickly is to duplicate the source shape by right-clicking it and choosing Duplicate Shape from the shortcut menu. You can also choose Duplicate and Connect Shape ( Control or Command + D ), in which case you can skip step 4. If you're using either of these options, you may want to be sure you animate the original source shape first, as the copied shape inherits the animation. This could save you some keyframing.
As you create target shapes for each source shape, they remain yellow to indicate that they're still unassigned, and have no affect on the image.

To create the actual warping effect, you have to connect the shapes you created a pair at a time. First, Click the Connect Shapes button.
Now, click a source shape that follows the actual position of the first feature you identified. Then, immediately click the corresponding target shape you created. After the second click the source/target shape pair is defined, the shape colors change, and a connectionName parameter appears in the Parameters tab. Since the overallDisplacement parameter defaults to 1, the effect is immediately seen.
Once connected, source shapes become light blue, target shapes become dark blue, and the connection lines between them become purple. These colors can be customized, if necessary.

If necessary, adjust the connection lines running between the source and target shapes by clicking the Edit Connections button.
Drag the source and target connection points and slide them along the shape to change the angle of deformation necessary to create the effect you need. In this example, the connection lines are straighted in the eyes.

If necessary, adjust the amount of warp by modifying the overallDisplacement parameter in the Parameters tab. You can also adjust the displacement of each source/target shape pair individually using the connectionDisplacement parameter in that pair's connectionName parameter.
A value of 0 in the overallDisplacement parameter results in an unwarped image. A value of.5 produces a warp that's halfway in-between the source and target shapes, and a value of 1 results in a warp that completely conforms to the target shape.
To see the actual warp effect, choose Warped Image from the Select Display pop-up menu in the Viewer Shelf (you can also press the F3 key).
Tip: In addition to viewing the actual warp effect, you can make the Displaced Target Shapes visible in the Viewer Shelf to view the actual position of the displacement targets as defined by the overallDisplacement and connectionDisplacement parameters. These indicators are designed to help you see what the deformation will be without having to render the entire image. Displaced target shapes are pink by default.

This example displays a characteristic of the warper--it works as if the image is made of a sheet of rubber and you're actually pushing the pixels of the image around, stretching the surrounding image. In the above image, the pixels of the eyebrow are moved up because they lie directly on the source shape which defines the warp. You'll also notice that the right edge of the eyebrow appears to stretch back to the original position of the eyebrow. This is because the pixels surrounding the eyebrow are stretching to fill in the areas of the image where the eyebrow used to be. If the effect is not what you want, try experimenting with a differently shaped source shape to redefine the area of the image being manipulated.
You'll notice that, in addition to the eye and eyebrow being warped, a significant area of the face surrounding the source/target shape pair is also affected, and the top of the head is pushed upwards. To limit the warping effect to the region immediately surrounding the eyes and eybrows, create one or more boundary shapes.
First, select the Source image from the Select Display Image pop-up menu in the Viewer Shelf. This allows you to draw your boundary shapes to match features in the original image. Draw more shapes identifying the areas of the source image you wish to lock down. Boundary shapes can be either open, closed, or single-point shapes, depending on how much of the image you want to lock down. In this instance, we want to exclude the entire image from the warp effect except for the eye, eyebrow, and surrounding region, so a closed shape is drawn surrounding this area. After it's drawn, it remains yellow to indicate that it's still unassigned and has no effect.
Control or Command -click the shape you just created, and choose Set to Boundary Shape from the shortcut menu. This effectively sets this shape to be both a source and target shape, which pins that area of the image down.

Now, you'll probably need to make adjustments to refine the effect you're trying to achieve. It'll probably be helpful to use the visibility and lock toggles to assist you when manipulating the shapes, to make sure you don't accidentally adjust the wrong points when two shapes overlap. You can use the controls in the Viewer Shelf to change the visibility and locking of all shapes of a given type simultaneously, or you can set the visibility and locking of each shape individually in the Parameters tab.
Using the Parameters tab controls for each individual shape, you may rename the shape, enable it, toggle its visibility, lock the curve so it is visible but can't be modified, or delete it. Additional parameters also appear for each connection line and boundary shape definition you've set up.
To create an animated effect, keyframe the overallDisplacement parameter to animate every source/target shape pair simultaneously. You can also animate the displacement caused by each source/target shape pair you've defined individually. Click the disclosure control next to a connectionName parameter to reveal its connectionDisplacement parameter. This can create a more organic-looking effect.
