About the Morpher Node

Using Shake's shape-based Morphing node, you can easily create Morphing effects by warping source and targe images to match one another using tools very similar to those used by the RotoShape node. Using shapes, you can deform two images to conform to shapes you draw in the Viewer, and then dissolve between them to create the illusion of the source image turning into the target image.

Chapter Summary

Using the Morpher Node

Morpher Node Syntax

Morpher Memory Usage

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. As a result, memory usage may become an issue when warping and morphing large images with multi-threaded processing enabled. In this situation, 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:

Number of
Threads

2K Image
Calculation

4K Image
Calculation

8K Image
Calculation

1

49 MB

195 MB

778 MB

2

97 MB

389 MB

1.6 GB

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.

Using Shapes to Morph

The Morpher 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.

Types of Control Shapes

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.

Animating Control Shapes

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."

Using Motion Tracking to Animate Control Shapes

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."

Controlling Warp and Morph Deformation Using Connection Lines

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.

Using Boundary Shapes to Limit Deformation in an Image

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 or morph not only affecting the intended subject, but also the surrounding background.

This aspect of the Shake Morpher 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 or morph 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.

Isolating the Subject of Deformation Prior to Morphing

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.

Creating and Modifying Shapes

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.

The Morpher Viewer Shelf

When a Morpher node is selected, the following buttons appear in the Viewer Shelf.

The Morpher nodes has the following controls.

Button

Name

Action

 

Add New Shapes

Creates new shapes. Closed shapes are created by clicking on the first shape point you created. Open shapes and single-point shapes are created by double-clicking when creating the last point, or by right-clicking in the Viewer and choosing Finish Shape from the contextual menu.

 

Edit Shapes

Allows you to edit shapes.

 

Connect Shapes

Clicking this control allows you to create a Source/Target shape pair by clicking first on the shape you want to be the Source, and then clicking a second time on the Target shape you want to link it to.

To define a Boundary shape, click this control, then click twice on a shape you want to turn into a Boundary shape. This effectively makes a single shape into both a source and target shape.

 

Edit Connections

Once two shapes have been joined with the Connect Shapes button, the location and angle of each Connection Line that links source to target shapes may be edited by clicking this control. With this control turned on, select one or Shift-click to select both of the source and destination points of a Connection Line to move them along each shape.

 

Show/Hide Tangents

Toggles the Viewer among showing All shape tangents (the handles that allow you to manipulate Bezier curves), None, or Pick, which only shows the shape tangents of individually selected points.

 

Lock Tangents On/Off

Locks or unlocks all shape tangents in the Viewer. If locked, shape points may still be moved, but the tangents defining the angle of curvature remain locked.

 

Toggle Shape/Line Mode

Toggles selected points between being corner points and Bezier curves.

 

Delete Knot

Deletes selected points on a shape.

 

Keyframe Current Shape/All Shapes

Toggles between two shape keyframing modes. In All Shapes, all shapes are keyframed whenever any one shape is modified while auto-keyframing is on. In Current Shape, only the selected shape is keyframed while auto-keyframing is on.

 

Enable/Disable Shape Transform Control

When turned on, this control makes the Shape Transform controls for each shape visible in the Viewer. Each shape can be manipulated as a whole using this control. When turned off, all Shape Transform controls are hidden, and cannot be used.

 

Visibility Toggles

These buttons toggle the visibility of specific types of shapes in the Viewer. From left to right, they control:

  • Source Shape Visibility
  • Target Shape Visibility
  • Connection Visibility
  • Boundary (or lockdown) Shape Visibility
  • Unconnected Shape Visibility
  • Displaced Target Shape Visibility

Each control affects the visibility of all shapes of that type in the Viewer. Individual shapes may be made invisible using controls in the Parameters tab. However, the Visibility toggles in the Viewer Shelf supersede the Visibility settings in the Parameter tab.

Each setting in the Select Display pop-up menu of the Warper and Morpher allow these controls to be toggled independently. For example, in the Warper, the visibility settings of the Source image can differ from those used by the Target.

 

Shape Lock Toggles

These three buttons lock all Source, Target, and Boundary shapes in the Viewer, preventing them from being edited. Each control locks all shapes of that type in the Viewer.

Individual shapes may be locked using controls in the Parameters tab. However, the Lock controls in the Viewer Shelf supersede the Lock controls in the Parameter tab.

 

Select Display Image

The Source/Warped Image pulldown allows you to toggle the Viewer's display between the unmodified and modified images.

You may quickly jump between views by pressing:

  • F1 to view the original Source Image
  • F2 to view the original Target Image (Morpher only)
  • F3 to view the Warped Image

Drawing and Editing Shapes

The biggest difference between drawing shapes with the RotoShape node and the Morpher node 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.

Drawing New Shapes

Drawing new shapes works the same whether you're creating a source, target, or boundary shape. In each case, you create a new, unassigned shape first, and you assign its type in a subsequent step. Unassigned shapes appear yellow, by default.

To create a new unassigned shape:

Click the Parameter control of the 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 morph.

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.

Editing Shapes

Once you've created a shape, there are several ways you can modify it. These techniques also work for keyframing shapes used for animated morphing 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.

To edit a shape:

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.

To add a point to a shape:

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.

To remove one or more points from a shape:

Select the point or points you want to remove.

Do one of the following:

 

Those points disappear, and the shape changes to conform to the remaining points.

To convert angled points to curves, and vice versa:

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.

To change a curve by editing a point's tangent handles:

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.

Do one of the following:

 
 
 

To edit a shape using its Transform control:

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:

Showing and Hiding Shapes

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 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.

To show or hide an individual shape directly in the Viewer:

Do one of the following:

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.

To show or hide all shapes of a particular type:

Click the Visibility toggle control in the Viewer Shelf that corresponds to the shape type you want to hide.

Duplicating Shapes

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.

To duplicate a shape:

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.

Copying Shapes from a RotoShape Node

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.

To copy a shape from a RotoShape node:

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.

Do one of the following:

The pasted shape appears just like any other newly created closed shape, and you can modify or duplicate it as necessary.

Connecting Source and Target Shapes

To create the actual morph 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.

To connect a separately drawn source shape to a target shape:

Click the Connect Shapes Mode button.

 

Click a source shape.

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.

 

To disconnect a source shape from a target shape:

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.

Modifying Connection Lines

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 morph effect. You can also add more connection lines to increase the amount of control you have over the morph effect.

To move the start or end point of a connection line independently:

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.

To move the entire connection line at once:

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.

To add more connection lines to a source/target shape pair:

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.

Locking Source and Target Shapes

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.

To lock all source and/or target shapes in the currently selected node:

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.

Defining Boundary Shapes

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.

To make an unassigned shape into a boundary shape:

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."

 

Turning Boundary Shapes Into Unassigned Shapes

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.

 

Customizing Shape Controls

Several parameters in the guiSettings section of the Globals tab allow you to customize the color and behavior of shapes and shape controls in the Viewer.

To access the shape control parameters in the Globals tab:

Click the Globals tab.

Click the guiSettings disclosure control to open the guiSettings parameters.

To access different shape customization controls, do one of the following:

Shape Colors

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.

Parameter

Shape Type

Default Color

ShapeColor

Unassigned shapes

Yellow

sourceColor

Source shapes

Light Blue

targetColor

Target shapes

Dark Blue

connectionColor

Connection lines

Purple

boundaryColor

Boundary shapes

Orange

lockedColor

Locked shapes

Grey

displacedColor

Displaced Target shapes

Pink

To change the default color of a shape color parameter:

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.

Shape Editing Controls

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:

Using the Morpher Node

The Morpher node blends two images together to create the effect of one subject changing shape to turn into another. The Morpher node does this by performing two warping operations, one on the source image to warp it into the shape of the target image, and another warping operation to warp the target image from the shape of the source back to its own shape. Once both warping operations match the shapes of the source and target images to one another, a built-in cross-fade dissolves from the first warp to the second, providing the illusion that the first image is changing into the second.

Tips For Successful Morphing

Successful warps benefit from planning ahead during the shoot. Ideally, the positions of the source and target images match relatively well. If they need adjustment, resizing, or repositioning to help them match better, you can make these adjustments in your node tree prior to adding the Morpher node.

If the source and target subjects are moving, their movements should match one another so that the warping targets you set for both can line up properly. If the motions line up but the timing is off, you can select the offending clip's FileIn node and use the Timing tab parameters to remap its speed so that the motion lines up. For more information, see the "Retiming" section of Chapter 3 of the Shake Reference Guide.

Since morphing warps images the same way the Warper node does, it is essential to isolate the subjects you're morphing prior to adding the Morpher node. This way, the background won't change as the source image morphs into the target, nor will the warp being applied to the subject of each image affect the background incorrectly.

Parameters in the Morpher Node

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. Warp nodes with more source/target shape pairs defined would have more shapeName and connectionName parameters listed.

  • displayImage: A pop-up menu that allows you to choose whether what the Viewer displays:
    • Source Image: Shows the image being used as the Source.
    • Target Image: Shows the image being used as the Target.
    • Morphed Image: Shows the actual morph effect being created. This image is a combination of the source warped and target warped images being dissolved together. This is the end result of the Morpher node.
    • Source Warped Image: Displays the warp effect being applied to the source image.
    • Target Warped Image: Displays the warp effect being applied to the target image.
    • Dissolve Mask: A greyscale image generated by the dissolve settings for each of the shapes. By default, since the dissolve settings for each individual connectionName parameter are linked to the overallDissolve parameter, this displays a solid screen where:
      • Black represents an overallDissolve value of 0, showing only the source image.
      • White represents an overallDissolve value of 1, showing only the target image.
    • Dissolved Image: Displays the dissolve between the source and target images, without any warping being applied. Appears as a simple cross-dissolve.
  • overallDisplacement: Defines the amount of displacement that is applied to all source/target shape pairs simultaneously. A value of 0 applies no displacement,.5 applies displacement halfway between the source and target shapes, and 1 applies the maximum displacement to match the target shape. It is also possible to set this parameter to a value greater than 1, although this results in an overlapping displacement which may not be desirable.
  • overallDissolve: Controls if the color of the morphed image is taken from the Source image or the Target image. 0 represents 100 percent source image, .5 results in a blend between both, and 1 represents 100 percent target image.
  • When creating a warp effect, you may achieve a more realistic or organic effect if you adjust the displacement of each individual source/target shape pair separately, rather than relying on this single control to animate the displacement of every shape pair in the node.
  • addBorderShape: A toggle control that allows you to use the border of the image as a control shape to limit the effect of the warping effect. By default this is turned on, and is the recommend setting for most cases. Turning this control off results in each source/target pair having a considerably more exaggerated effect on the image, and may necessitate the use of additional boundary shapes to control the effect.
  • overSampling: An integer value that represents the numbers of samples per pixel that are taken into account when performing a warp. This parameter is set to 1 by default, which results in faster rendering times. However, extreme warping effects may introduce aliasing artifacts that can be reduced or eliminated by increasing this value, up to a maximum value of 4. Increasing this parameter may cause render times to increase dramatically.
  • Although the slider is limited to a range of 1 to 4, you can enter larger values into this parameter's text field.
    • dodPad: A subparameter of overSampling. This slider lets you pad the DOD around the image affected by the Warper node by 0 to 100 pixels. The Warper node trys to automatically calculate a new DOD for the affected image, but in certain instances the resulting DOD may be too small. In these instances, the dodPad parameter lets you expand an incorrectly calculated DOD to avoid clipping.
  • shape1Name: In this example, the shape1Name parameter represents the source shape. Additional controls in all shape parameters allow you to turn the shape on or off, make the shape itself visible or invisible in the Viewer, Lock the shape to prevent any further changes to it, or delete the shape.
  • shape2Name: In this example, the shape2Name parameter represents the target shape. Each target shape has a corresponding shapeName parameter.
  • connection1Name: Connection parameters represent both connection lines that connect source shapes to target shapes, and boundary shapes that you've defined. Deleting a connection parameter deletes either the corresponding connection line, or turns a boundary shape back into an unassigned shape.
    • connection1Displacement: This subparameter of the connection1Name parameter defines the amount of displacement that is applied to the source/target shape pair defined by the connection1Name parameter. Each source/target shape pair has its own corresponding connectionDisplacement parameter, allowing you to animate each warp independently for a more organic, natural look. By default, each connectionDisplacement parameter is linked to the overallDisplacement parameter, so that they all animate together.
    • connectionDissolve: Each source/target shape pair has a corresponding connectionName parameter. Nested within each connectionName parameter is a pair of connectionDisplacement and connectionDissolve parameters that allow you to independently adjust the displacement and dissolve of each part of the morph. By default, each connectionDissolve parameter is linked to the overallDissolve parameter, so that they all animate together.

A Morpher Node Example

Create a Morpher node in the Node View, and attach two images to the Morpher node. The source image connects to input 1, and the target image connects to input 2.

 

In this example, we're creating the effect of the woman's face turning into that of the man. The image of the woman is the source, connected to the morpher1.In knot of the Morpher node. A composite of the man's face and the woman's head is used as the target, which is connected to morpher1.Target knot.


Note: Images courtesy of "Doppelganger."

If the images need to be manipulated to make them line up, do this first. In this example, a series of transform nodes have been inserted between the FileIn and Morpher nodes to move, scale, and track the target image to align properly with the source image. This is essential to creating a smooth morphing effect.

If it is necessary to isolate the subject of the source and target images by keying or rotoscoping, you may want to insert these nodes prior to the Morpher node also. In this example, the source image will be keyed. The target image has been rotoscoped to isolate just the face, and the isolated face has been composited with the woman's head to create the desired effect.

First, move the Playhead to the first frame of the clip where you want the morph effect to take place, set the Viewer to look at the Source image, and draw all Source shapes necessary to match the features of the subject, just as you would for the Warper. If necessary, animate your shapes to follow the animation.

You can quickly jump to the Source image by pressing F1 .

The more features you identify with source shapes, the more detailed the morphing effect will be. You should remember that warping affects the entire region of the image surrounding each source/target shape pair. While it's important to create shapes for each significant feature of the image, you don't have to go overboard creating shapes for every tiny feature of the subject image, unless it will enhance the effect you're trying to achieve.

When picking features to manipulate, keep in mind that the source shapes you define are pushing and pulling the corresponding image features into the shape of the target. Pick features that have a direct path to similar features in the target image if at all possible to avoid unwanted artifacts in the image.

 

Once you've created all the source shapes you think you need, set the Viewer to display the target Image. You can quickly jump to the Target image by pressing F2 .

To create a set of target shapes to connect to the source shapes you created in step 3, do one of the following:

Tip: It may also help to turn off the Enable/Disable Shape Transform Control in the Viewer Shelf, to avoid accidentally dragging Transform controls that overlap the shape you're trying to adjust.

When readjusting the target shapes you've created, the sheer number of shapes needed to create your morphing effect may make the Viewer a little crowded, making it difficult to adjust individual shapes. You may find it's easier if you hide every shape except the one you want to work on. You can hide all of the target shapes by right-clicking in the Viewer and choosing Hide All Shapes from the shortcut menu. Afterwards, right-click again and choose the first target shape you want to work on to show it again. Continue hiding and showing individual shapes as necessary until you've adjusted them all.

 

If necessary, animate the target shapes you've just created to match any motion in the target image.

The overallDisplacement parameter controls how much warp is applied to push the pixels from the source shapes to the target shapes you've defined, and operates on all source/target shape pairs in the node simultaneously.

 

To animate the morphing effect, keyframe the overallDisplacement parameter. To see the morphing effect in the Viewer as you adjust the overallDisplacement slider, you must choose Morphed Image in the Select Display pop-up menu of the Viewer Shelf. You can also set the Viewer to display the Morphed Image by pressing F3 .

To add a new keyframe, move the playhead to a frame where you want to make an adjustment, click the auto-keyframing control for the overallDisplacement parameter in the Parameters tab, and adjust the overallDisplacement slider.

A value of 0 in both the overallDisplacement and overallDissolve parameters results in an unmorphed source image. A value of .5 produces a morph that's halfway in-between the source and target images, and a value of 1 results in the end of the morph, the final target image.

While you adjust these parameters, 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, instead of viewing the actual warp effect. 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.

As with the Warper, you may adjust the individual displacement of each source/target shape pair using the connectionDisplacement and connectionDissolve parameters nested within each connectionName parameter in the Parameter tab. Keyframing these with separate timings is one of the keys to creating an organic looking Morph effect, and usually creates a more sophisticated-looking effect than if you simply used the overallDisplacement to animate every shape pair at once.

If you want, you can keyframe the overallDissolve parameter separately from the overallDisplacement parameter to create different effects. Adjustments to the overallDissolve parameter control how the source image fades into the target image--this works exactly like a Mix node.

By default, the overallDissolve parameter is linked to the overallDisplacement parameter, so keyframing one will automatically keyframe the other to the same value. Keyframing the overallDissolve parameter will break this link.

Test the resulting effect to see how well it works. If you see problems, toggle the Viewer between the Source Warped image and Target Warped image to see how successfully the warped source and target images are matching. Viewing each image independently makes it easier to spot unwanted artifacts stemming from poorly placed or inadequate numbers of source/target shape pairs.

If you see problems, either adjust the position and shape of the source and target shapes as necessary, or identify additional features to create source/target shape pairs for to increase the amount of control you have over the effect

Morpher Node Syntax

Synopsis

image Morpher(
image In,
image Target,
const char * version,
const char * displayImage,
float overallDisplacement,
float overallDissolve,
float overallWeight,
float tension,
const char * alpha,
int oversampling,
const char * viewerInformation,
int connections,
const char * encodedInformation,
);

Script

image Morpher(
In,
Target,
"version",
"displayImage",
overallDisplacement,
overallDissolve,
overallWeight,
tension,
"alpha",
oversampling,
"viewerInformation",
connections,
encodedInformation,
);

Command Line

This node is not appropriate for command line use.