Eyeon:Manual/Paint and Rotoscoping

From VFXPedia

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


Paint is an extremely flexible, stroke-based system for making changes directly to a series of images. Use the paint tool for wire and rig removal, image cloning, or to rapidly create custom masks and mattes.

Fusion's paint can even be used to create new images and artistic elements from scratch.

Each paint tool is made up of a series of brush strokes. These strokes are vector shapes created directly on a view. The type of brush used, the size of the stroke and the affect of the stroke on the image are all user-controllable. A wide range of apply modes and brush types are available.

Brush strokes can be made into editable polylines for fine control. They can be animated to change shape, length and size over time. The opacity and size of a stroke can be affected by velocity and pressure (when used with a supported tablet).

Unlimited undo and redo of paint provides the ability to experiment before committing changes to an image sequence. Paint strokes can be re-ordered, deleted and modified with virtually infinite flexibility.

Contents


Adding the Paint Tool

Paint is added to the flow like any other tool in Fusion. Select the Paint Tool from the Tools>Paint menu at the top of the screen. Alternately, drag the Paint icon (Pnt) from either the toolbar or bins onto the flow or display views.

The controls for the paint tool will be automatically displayed in the Tools tab on the right side of the interface. Fusion will be immediately ready to start painting.

A paint mask can also be added to any tool by selecting the tool to be masked, viewing it in a display view and selecting Paint Mask from the display view's context menu. In this case, the paint controls will appear in the masks tab. See Mask Painting later in this chapter.


The Paint Toolbar

Select Mode
Press the Select Mode button to set the paint tool to select existing strokes for modification. Selected strokes will be affected by changes to the controls displayed in the tools tab.
Stroke Mode
Press the Stroke Mode button to set the selected paint tool, permitting the addition of paint strokes to the image using the chosen brush and apply mode.
Clone Stroke
Clicking the Clone Stroke button has a similar effect to stroke mode, only the stroke is automatically set to the clone apply mode. This is essentially a shortcut to image cloning.
Polyline Mode
Click the Polyline Mode button to create polyline strokes and select Click Append Mode. Strokes will be applied using the selected brush and apply mode.
See the Polylines chapter for details.
Circle Shape
Click the Circle Shape button to create circular shapes that affect the image using the chosen apply mode.
Rectangle Shape
Click the Rectangle Shape button to create rectangular shapes that affect the image using the chosen apply mode.
Copy Polyline
Copy Polyline is used to copy one portion of an image to another. Think of this as a copy/paste for images in which the copy source, destination and shape of the copied region can be animated over time.
Copy Ellipse
Copy Ellipse is like copy polyline, except that the shape is an ellipse.
Copy Rectangle
Copy Rectangle is like copy polyline, except that the shape is a rectangle.
Fill
The Fill mode implements a bucket style fill, where clicking on a region of the image fills that area with the color selected in the paint controls. Pixels of the same color or a similar color are considered to be part of the region, according to the range and softness settings.
Paint Group
Selecting the Paint Group button causes all selected paint strokes to be collected into a single group, which can then be moved, scaled and rotated together.



Paint Controls

See Paint Tool Reference for comprehensive documentation of all Paint tool controls.

Strokes

Creating Paint Strokes

Brush Strokes

When the paint tool is first added to the flow, the brush type is set to a medium sized soft, circular brush with a white color apply mode. To add a paint stroke to the image, simply place the mouse or pen over the image, click-hold the left mouse button and start drawing.

Release the mouse button to end the creation of the stroke. To draw another stroke, simply click again and continue. A new stroke will be added to the image with the same settings as the last applied stroke. When the painting is complete, choose the Select button in the paint toolbar to avoid accidentally adding new strokes.

While in brush or polyline modes, the controls displayed in the tool tab affect the next stroke created, not the strokes that are already created. To adjust the settings of an existing stroke, switch to Select mode using the paint toolbar and select the stroke. See Selecting Strokes and Modifying Strokes later in this chapter for details. Alternately, select the Paint tool, click the Modifiers Tab and adjust the modifier controls for that stroke.

Polyline Strokes

The Paint tool also provides a Polyline Stroke mode. This provides the ability to create and manipulate a stroke in the same way that a path or mask might be created. To add a polyline stroke to the flow, select the Polyline Button from the Paint toolbar and click in the view to add the first point. Continue clicking to add additional points to the polyline.

Notice that the usual polyline toolbar buttons will appear in the display toolbar. Polyline strokes are created in click append mode by default, but they can also be created in draw append mode.

For more information on polyline creation and manipulation, consult the chapter dedicated to Polylines in this manual.

Selecting A Stroke

To adjust any parameter of a brush stroke after it has been added to the flow, it is necessary to first select the stroke. The Select toolbar button will stop paint stroke creation and allow any stroke to be selected by left-clicking on the stroke. Once the stroke is selected, a thin green line will outline the stroke's shape.

The paint tool's controls will display the settings for the selected stroke. Any changes made to these controls will affect the stroke directly.

Each stroke also has its own set of controls in the modifier tab. Locate the stroke's controls in the Modifiers and click on the stroke's control header to select that stroke.

Modifying Strokes

Once the stroke is selected, change the stroke's settings by adjusting the paint tool controls. Any control can be changed, including the brush size, color, type, and duration. Most of these controls can be animated over time.

To modify the shape of Vector stroke, first convert the stroke into an editable polyline. Select the stroke to be modified and click the Make Editable button in the controls tab of the paint tool. The stroke will change into a standard Fusion polyline.

Due to the resolution of paint strokes, there may be too many points for efficient editing of the converted polyline stroke. Use the polyline Reduce Points feature to decrease the number of points to a more manageable amount.

Vector Paint Stroke Modifier Tab

Each time a stroke is added in a paint tool, a new modifier appears in the Modifier Tab for that tool. These Paint Stroke Modifiers contain all of the controls as in the paint tool controls. Use these modifiers to adjust a paint stroke regardless of whether the stroke is currently selected.

To learn the name of a paint stroke (so that it can be found in the modifiers tab), hold the mouse over the stroke and a popup tooltip will appear with the stroke's name. Rename a stroke by right-clicking on the stroke's control header and selecting Rename from the context menu.

Deleting Strokes

To delete a stroke from the paint tool, locate the stroke's modifier in the paint tool's modifier tab, and right-click on the tool header. Select Delete from the context menu.

Reordering Strokes

Strokes are applied to the target image one after another, with each succeeding stroke drawn over the previous ones. Occasionally, the stroke order may need to be changed. The order of the strokes can be viewed and changed in the modifiers tab of the paint tool. The stroke displayed at the top is the first stroke applied to the image.

To change the order in which the strokes are applied to the image, switch to the Modifiers tab and place the mouse pointer over the header for the desired stroke. Left-click and drag the stroke modifier until it is in the new position in the modifier stroke list.

Paint Groups

Often, a group of paint strokes and objects that are considered together will form a single object or element in the scene, such as a series of shapes and polyline strokes that collectively form a logo or 25-30 brush strokes that are used to remove a wire from a scene.

To adjust or move all of these strokes, it can be tedious to locate each stroke and move them one by one. The solution is to select all of the strokes that compose that object and collapse them into a Paint Group.

To create a group, enter Select mode and select all of the strokes that are to be part of that group using box selections and Ctrl-clicking to add and remove members.

Once all of the required strokes are selected, click the Paint Group button in the paint toolbar. The strokes will be added into a group and their individual controls will be replaced with a set of common controls.

The common controls provide a single center, size and angle control for all of the strokes. The individual stroke controls in the modifier tab are hidden to help keep the strokes organized, athough they can be exposed again by clicking on the Show SubGroups Controls checkbox.

Initially, the center of the group is set to the average center of all strokes in the group. Manually reposition the center of the group relative to the strokes by Ctrl-dragging the center control to its new location. Click on the Reset Center button to return the center to the average position again.

When the group is no longer needed, click on the Un-Group button to return the strokes to individual control again. Any transformations applied to the group directly are lost so the strokes return to their original positions when the group was created.


Animating Strokes

There are a variety of ways to Animate Paint Strokes. The color, spacing, size and even the brush type or apply mode can all be animated over time. With Vector strokes it is also possible to animate the shape and have the stroke appear like it is being written onto the image.

Animating The Shape Of The Stroke

By default, the shape of a brush or polyline stroke cannot be animated over time. To animate the stroke's shape, select the stroke and then the Make Editable button.

Right-click on the Right-Click For Polyline Menu. Select Animate from the context menu. A polyline change spline will be added to the spline editor and the first keyframe will be created at the current time.

Animate the stroke like a mask or path, by changing to a new frame and adjusting the shape of the stroke polyline. Each change will create a new keyframe on the polyline change spline. The shape of the polyline will morph from one keyframe shape to the next.


Cloning

Cloning is a process where a portion of one image (source) is copied to another (target). The source image for this apply mode can be the taken from the same image as the target, from another tool in the flow or even from a file off disk.

Cloning is most often used to either remove an unwanted element from a scene, such as wiring, rigging and ex-spouses, or to copy and clone elements in the source for the appearance of greater numbers, such as crowds and vehicles.

To enable cloning, select it from the Apply Mode menu in the paint tool's control tab. Any of Fusion's paint brush types can also be used in conjunction with the rub through mode, although brush and polyline strokes are most common.

Setting The Source Image

By default, the cloning apply mode will use the image input of the paint tool as its source. To clone from another image, type the tool's name in the Source Tool control. Alternately, drag the tool from the flow into the control, or right-click on the Source Control label and select Connect To: Toolname.

An image with a different size from the target image can be used as the source. Unlike bitmap masks, Fusion will not rescale the source image to match the size of the target.

Source Offset

Fusion provides the ability to define an offset position for the source image. There are two ways to set a Source Offset. Use either the mouse pointer or the overlay mode crosshair.

Changing Offset With The Mouse

To use the mouse to set an offset, place the mouse over the portion of the source image to be used as a source when painting begins. Hold the Alt key and click once with the left mouse button. A small X will be placed in that position. Now place the mouse pointer over the same place and draw a stroke. The X that marks the offset position will start to move along with the pointer as it draws.

This method is most useful when the same image is the source as well as the target.

Changing Offset With Overlay

Selecting the Enable Overlay checkbox in the tool controls will cause a transparent overlay of the source image to be displayed on the target image.

A crosshair control will appear in the display view to control the exact position of the offset. This provides a simultaneous view of both the source and target image while painting.

This mode is most useful when the source image and the targets are drawn from different images.

Changing The Source Offset While Painting

The offset used by the rub-through apply mode is stored with each stroke, making it possible to change the position of the offset from stroke to stroke. Simply set the new offset using the overlay crosshairs or by Alt-clicking (depending on the mode) and continue painting.

Offsetting The Clone Source In Time

A commonly-used technique in cloning for the removal of unwanted transient elements like dirt and scratches is to clone from the same image as a source, offset in time instead of space.

To offset the clone source in time, adjust the Time Offset slider under the Apply mode section of the Paint controls. Negative values offset the source backward in time, whereas positive values offset the source forward in time.

A blank clone source cannot be used for the input when performing a time offset. The source must be set to another tool. If the clone is from the same image, set the source input to the tool that is feeding into the paint tool.

Copy Polylines, Ellipses And Rectangles

As a quick way to clone large portions of the image, Copy Polyline can be both simple to use and extremely powerful at the same time. The Copy Rectangle and Copy Ellipse modes work in a similar fashion so this documentation focuses on the copy polyline mode.

Clicking on the copy polyline button in the toolbar initially behaves exactly like a regular polyline stroke. Click in the large display view to add the points for the polyline, clicking on the last-created point to close the shape.

Once the shape is complete, click anywhere else in the image except on the polyline. The shape that was just added will be automatically selected. Now click-drag the center control to set the position of the copy.

The source and destination shapes are always identical. Adjusting one immediately adjusts the other to keep them synchronized. The size and angle of the copy can easily be modified, such as flipping the sample horizontally or vertically for rapid mirroring.

It is often useful to see the source and the destination polylines simultaneously. To do so, enable the Show Source checkbox in the controls. You will now be able to see and modify the source and destination samples at the same time.

The apply mode of the copy polyline is Stamp so the alpha channel of the source will be ignored. To take the alpha channel of the image into account when making a copy, change the Apply mode from Stamp to Merge.

To help blend the copy back into the scene, apply softness to the edge of the copy. Reducing the opacity a small amount may also help to blend the copy with the background.

Wire Removal

The Wire Removal apply mode is specifically designed to rapidly remove small wires, posts, scratches and dust from an image. Wire removal works by sampling the pixels on the outside of the stroke and pulling or pinching them in toward the center of the stroke.

Wire removal is most effectively applied using brush and polyline strokes, which are not limited to straight lines. Any shape can be drawn with either of these brushes.

Blend Type

Two methods of removal are provided; Edge-Blend and Cross-Fade. Each method is similar in that it samples the edges of the image along the length of the stroke and pulls in surrounding pixels. The technique used is slightly different, as one may provide better results when the other fails.

Angle

The Angle slider in the controls determines the vector from which the samples are taken relative to the spline edge. A value of 90 degrees here causes the samples to be drawn from pixels that are immediately perpendicular to the heading of the stroke. A value of 0 degrees would sample pixels along the line and is not very useful. Adjust the angle to match patterns in the surroundings that are not horizontal.

Distance

The Distance slider determines how far away from the edge of the stroke to sample the image for clean pixels. Larger distances are good for removing wider objects in the scene.

Bias

The Bias slider controls the weight of the samples from each side of the stroke. A bias of 0.5 samples evenly from both sides of the image. A lower bias favors the sample from the left side and a higher value favors the right hand sample (assuming a vertical stroke).

Noise

Since sampling processes tend to destroy grain in the region removed by the stroke, two controls are available to help introduce noise into the image. Use the Noise slider to increase the strength of noise. Use the Noise Threshold slider to limit the noise effect to high luminance areas with plenty of detail.

High Quality Interactive Saver Mode

The saver tool offers the ability to save a final, rendered version of the paint strokes while working. To enable the Save Mode, add a saver tool to the flow, set a filename, path and file type. Select High Quality Interactive from the Save Frames menu.

Whenever the High Quality checkbox is selected while working, Fusion will save each frame to disk as it is processed interactively. When used correctly, this feature can completely eliminate the need to perform a final render for simple and even some complex painting tasks.

Warning
The high quality interactive mode is perfect for rotoscoping but it can cause tremendous confusion when used in conjunction with a flow that contains animated controls or expressions. If the splines that define the animations are modified in such a way that frames already saved interactively by the saver are changed, the frames already on the disk will not automatically be re-rendered. Either step through each frame again or perform a final render to make certain that the result is correct.
For example, imagine a loader that contains a 10 frame sequence, followed by a blur tool. The blur tool strength control is animated from 0 to 10 over the 10 frames. This is followed by a paint tool and a saver set to High Quality Interactive. If a wire is then painted out in the sequence by rotoscoping, each frame would be saved as you stepped through and the render would be complete by the time frame 10 was finished. If, at frame 10, the blur strength needs to be stronger and the value of the keyframe is changed to 20, frames 1 through 9 as stored on the disk will no longer be correct.

Mask Painting

In addition to using the paint tool for manipulating images, the paint engine can also be used to create effect masks for virtually any tool in Fusion, and to create garbage mattes for any keyer.

The Mask Paint tool is almost identical to the normal paint tool, although it will generate a single channel image only and must be connected to the mask input of a tool.

See the Effects Masks chapter for more information.

Creating Custom Brushes

The exact brush shape may not be available from the provided brush shapes. It is simple to Create New Brush Shapes using nothing more complex than a background tool and an effect mask.

To create a brush, add a Background tool to the flow of any size (smaller images will render faster). Set the Background Color mode to Solid and change the color to white if it is not already. Select and display the background tool.

Create a polyline effect mask on the background tool in the shape required. Make the mask as large as the background image will allow.

Now, add a Paint tool to the flow after the image to be painted and set the Brush Shape to Image Brush. Set the source of the image brush to the background tool and set the Apply Mode to color. Set the size of the brush and start painting.

Any changes to the color controls in the apply tab will tint the brush to the selected color. The new brush shape can be used with any apply mode.

Save the settings of the background tool to use this brush again in the future. Right-click on the Background tool and select Setting>Save As from the context menu. Add the saved settings file to the bins for easy access to the custom brush the next time it is needed.