Eyeon:Manual/Effects Masks

From VFXPedia

Jump to: navigation, search

Effects Mask Introduction

Under normal circumstances, a tool applies its effect to every pixel in an image. Masks are single channel images that restrict an effect to specific regions of an image only.

Any number of Effect Masks of any time can be combined together on a single tool. Two masks can combine together to create a more complex shape or one mask can subtract from another to cut holes into the mask channel.

Masks can be created using primitive shapes, such as circles and rectangles, complex polyline shapes, or by extracting channels in another image. Multiple masks of various types can be combined to produce complex and powerful results.

Contents


Mask Types

Effect Masks

Effect Masks are applied post-effect; the tool's result is calculated over the entire image first and then the mask is used to filter the result. Complex mask shapes are created and animated using a combination of primitive shape masks or more complex polyline shapes.

Effect masks are by far the most common type of mask applied to tools in Fusion. Although just about every tool in Fusion supports masking, there are a few where effect masks make little to no sense, notably savers, time tools, and resize, scale and crop tools.

Garbage Mattes

Garbage Mattes are a special type of effect mask that is unique to the keying tools (difference keyer, ultra keyer, chroma keyer, matte and luma keyer). Garbage matting is used to isolate portions of the image and to explicitly discard or include the area defined by the mask. This is accomplished by setting the alpha channel within the region of the mask to either black or white.

Use garbage mattes to remove rigging from blue and green screen shots and to isolate a section from an image not suited to chroma or color keying.

The option of creating a garbage matte is only available from the context menu when one of the keying tools is selected. The various garbage mask types and shapes are identical to effect masks described in this chapter.

Any number of garbage mattes can be applied on a single tool, however, they must all perform the same function. For example, if a garbage matte is added to an ultra keyer to exclude a rigging element from the key by setting the alpha channel to black, all other garbage mattes added to that ultra keyer must also be set to make the alpha transparent.

To choose whether garbage mattes applied to a keying tool will set the alpha channel to opaque or transparent, locate the garbage matte's drop-down menu in the tool's controls and select Make Transparent or Make Solid from the menu.

To mix garbage mattes set to different modes, use a separate matte tool immediately after the keyer in the flow.

Pre-Masking (DVE, Glow And Highlight Tools)

An additional type of masking, known as Pre-Masking, is available to the DVE, glow and highlight tools. Unlike effect masks, a pre-mask is applied to the tool before the effect. This usually causes the tool to render more quickly and to produce a more realistic result.

In the case of the highlight and the glow tools, a pre-mask restricts the effect to certain areas of the image but allows the result of that effect to extend beyond the limits of the mask.

The advantage to pre-masking is that the behavior of glows and highlights in the real world can be more closely mimicked. For example, if an actor is filmed in front of a bright light, the light will cause a glow in the camera lens. Because the glow happens in the lens, the luminance of the actor will be affected even though the source of the glow is only from the light.

In the case of the DVE tool, a pre-mask is used to apply a transformation to a selected portion of the image, without affecting portions of the image outside of the mask. This is useful for applying transformations to only a region of the image.


Mask Tools

Masks are like other creator tools in the flow, with the exception that they create a single channel image rather than a full RGBA image.

The following mask tools are described in greater detail in the tools reference.

Common Mask Features and Controls

Most mask tools share several controls in common. These are documented in the Tool Reference Mask category. See Common Mask Controls

Bitmap Masks

Bitmap Masks use the image from another tool to create the mask channel. The Bitmap Mask allows images from the flow to act as masks for tools and effects. Bitmap masks can be based on values from any of the color, alpha, hue, saturation, luminance and the auxiliary coverage channels of the image. The mask can also be created from the object or material ID channels contained in certain 3D rendered image formats.

A bitmap mask is not required to generate a single channel mask from an multi channel image - it is possible to connect an image directly to the Mask input of any tool. Using the Bitmap mask tool provides more detailed control over the resulting mask. This makes it possible to soften the mask, invert it, or clip the ranges used.

Direct connection of an image to the mask input is useful when the image already contains the exact mask desired. When direct connection is used, the common controls for that tool will display a drop down menu which can be used to select the channel which will generate the mask.

A Bitmap mask tool must be used if the mask is going to be combined with other mask tools.

See Bitmap Mask in the tool reference.


B-Spline Masks

B-Spline Masks are user-created shapes made with polylines that are drawn using the B-spline method of calculating smoothness. They behave identically to Polyline shapes when linear, but when smoothed, the key points influence the shape through tension and weight. This generally produces smoother shapes while requiring less control points.

B-splines are often used to rotoscope organic shapes, like people and animals.

The smoothness of a b-spline is determined by the tension of the control points. To adjust the tension of a b-spline's control points, select the point, hold down the W key and click-drag the mouse pointer to the left and right to increase or decrease the tension of the curve through that point.

See B-Spline Mask in the tool reference.


Ellipse, Rectangle and Triangle Masks

These are primitive shape masks.

See Rectangle, Ellipse, and Triangle in the Tool Reference.


Mask Paint

Mask Paint allows a mask to be painted using Fusion's built-in vector paint tools.

See Mask Paint in the Tool Reference.


Polygon Mask

Polygon masks are user-created shapes made with polylines that are drawn using the Bezier method of calculating smoothness. This is the most common type of polyline and the basic workhorse of rotoscoping.

See Polygon in the Tool Reference.


Wand Mask

A Wand Masks provides a crosshair that can be positioned in the image. The color of the pixel under the crosshair is used to create a mask, where every pixel of a similar color is also included in the mask. This type of mask is ideal for secondary color correction.

See Wand in the Tool Reference.


Ranges Mask

Similar to Bitmap Mask, the Range Mask allows images from the flow to act as masks for tools and effects. Instead of creating a simple luminance-based mask from a given channel, Range allows spline-based selection of low, mid and high ranges, akin to Color Corrector.

See Ranges in the Tool Reference.


Polygon and BSpline Animation

When a Polygon Mask is added to a tool in the flow, it is automatically animated using a Polygon Change Spline spline.

Polygon Change Spline

To morph the shape of a mask over time, simply change the current frame to a new time and make the required changes to the mask. A new point will be added to the Polygon Change Spline. This one keyframe controls the position of all of the points that comprise the mask for that frame. Fusion will automatically morph the shape and position of the mask between the two keyframes. Additional points can be added to the mask at any point to refine the shape as areas of the image become more detailed.

The polygon change spline controls the timing of the mask's animation. To adjust the overall timing of the mask animation, edit the polygon change spline using the spline editor.

Removing Animation From A Polyline Mask

If it is preferred that the polygon mask remain static, open the mask's controls and right-click where it says Right Click Here For Shape Animation and select Remove Bezier Spline from the context menu. To animate the polygon mask again, select Animate from the context menu of this label.

Adding And Removing Points From An Animated Mask

When Adding points to an animated mask, the new point exists at all keyframes and Fusion will do its best to fit the new point into the shape at all keyframes. It is recommended to check the composite at each keyframe to ensure that the result is as desired. Deleting a point removes that point from all keyframes in the animated mask.


Published Points

Although the polychange spline offers rapid animation of the entire shape, it does not allow a specific point's animation to be controlled explicitly. A complex mask requires more precise timing for key points on the polyline. It is possible to isolate individual points on a polyline by publishing them.

Publishing a point on a polyline removes that point from the polychange animation spline. Once removed, this point can be connected to paths, modifiers, expressions, and trackers.

Publishing A Point

To publish a selected point or points, click on the Publish Points button in the polyline toolbar. Alternately, select Publish Points from the polyline context menu. A new coordinate control will be added to the polyline mask controls for each published point, named Point 0000, Point 0001, and so on.

The onscreen control indicates published points on the polyline by drawing the point as a much larger point. Once a published point is created, it can be connected to a tracker, path, expression or modifier by right-clicking on this control and selecting the desired option from the point's context menu.

Publish Point To Path

When a point ID is published, any animation already applied to that point is destroyed. To keep the animation, Fusion also offers the Publish Point To Path option. To publish the selected points and convert their existing animation to a path, right-click on the polyline and select Publish Points To Path from the polyline's context menu. Alternately, click the associated button in the polyline toolbar.

Follow Published Points

It is often necessary to have points in a polyline mask that are between two published points follow the motion of the published points and still maintain their relative offset and shape. For this reason, key points in a polyline mask can be set to Follow Published Points using the polyline's context menu.

When a key point of an effect mask is set to follow points, the point will be drawn as a diamond shape rather than a small box.

When this mode is enabled, the new following points will maintain their position relative to the motion of any published points in the mask, attempting to maintain the shape of that segment of the mask. Unlike published points, the position of the following points can still be animated to allow for morphing of that segment's shape over time.


Double Polylines

The softness control available in all mask tools provides a mechanism for softening the entire mask equally. Softening part of the curve while keeping other portions of the curve sharp is often required when rotoscoping in a frame with a lot of motion blur.

This form of softness is called Non-Uniform Softness, which is accomplished in Fusion by converting the shape from a single polyline to a double polyline. The double polyline is composed of two shapes, an inner and an outer curve. The inner curve is the original shape from the single polyline, whereas the outer curve is used to determine the curve's softness. The further the outer curve gets from the inner curve, the softer that segment of the shape becomes.

Converting A Single Polyline To A Double Polyline

To convert a mask into a double polyline, right-click in the view and select Make Double Polyline from the mask's context menu. The shape will be converted into an inner and an outer polyline spline. Both polylines start with exactly the same shape as the original single polyline. This keeps the mask sharp to start with, and allows any animation that may have already been applied to the shape to remain.

The control points on the outer curve are automatically parented to their matching points on the inner curve. This means that any changes made to the inner curve will also be made to the outer curve. The relationship is one way. Adjustments to the outer curve can be made without affecting the inner curve.

The relationship between the points on the inner and outer curves is indicated by a dashed line drawn between the points.

Adding Softness To A Segment

The shape of the outer curve is drawn using a dashed line instead of a solid line to help distinguish it from the inner curve. To select the outer curve, use the tab key to cycle between controls until the dashed outline is visible, or select the outer polyline using the context menu's Controls>Select menu.

Once the outer polyline is selected, click-drag any of the points away from the inner polyline to add some softness to the mask.

The further the outer curve segment is from the inner curve, the softer the mask is going to be in that area.

Adding Additional Points To The Curves

It is not necessary for every point on the inner curve to have a match on the outer curve, or vice versa. Add additional control points to refine the shape of either curve. There is no need for a point on either curve to be parented to any other.

Each polyline has its own polychange spline and stores its animation separately. If a point is adjusted on the inner curve that is parented to a point on the outer curve, a keyframe will be set on both polychange splines. Adjusting a parented point on the outer curve only sets a keyframe for the outer curve's polychange spline. If a point that is not parented is adjusted, it will only set a keyframe on the relevant polychange spline.

Locking/Unlocking Point Pairs

Additional points that are added to the inner and outer curves may need to be parented together. To parent the selected points, right-click in the view and choose Lock Point Pairs from the context menu for either spline. This will cause the selected point on the outer curve to become parented to the selected point on the inner curve.

Any animation already applied to either point is preserved when the points become parented.

To unlock a point so it is no longer parented, select the point, right-click in the view and deselect Lock Point Pairs from the context menu.


Converting Spline Types

Just because a shape using a b-spline or polyline mask has been created does not mean that the mask type has to be used. Convert from b-spline to Bezier, or Bezier to b-spline, as needed. Right-click in the display view and select Convert Bezier Spline To B-Spline or Convert B-Spline To Bezier from the spline's context menu. Only the appropriate option will be displayed.

When converting from one type to another, the shape is preserved. The new polyline generally has twice as many control points as the original curve to ensure the minimum change to the shape.

Although animation is preserved, the conversaion process will not yield perfect results every time. It is a good idea to review the animation post-conversion