Select Roto Brush in the toolbar ( Alt/Option + W ).
Separate a foreground object from a background using Roto Brush and create mattes using Refine Matte.
Separating a foreground object from a background is a crucial step in many visual effects and compositing workflows. When you’ve created a matte that isolates an object, you can replace the background, selectively apply effects to the foreground, and much more.
Use Roto Brush to draw strokes on representative areas of the foreground and background elements. After Effects uses that information to create a segmentation boundary between the foreground and background elements.
After creating the segmentation boundary, use Refine Matte properties to improve the matte.
The Refine Matte effect is also available separately for the improvement of mattes created using features other than the Roto Brush tool.
Powered by Adobe Sensei
Traditional rotoscoping uses animated masks to isolate an element in a video clip, which can be tedious and time-consuming. Roto Brush 2 uses artificial intelligence to track your subject’s movement so you can cut down on frame by frame refinement.
If you are familiar with the Roto Brush 1, selecting objects with Roto Brush 2's propagation engine is largely the same:
Select Roto Brush in the toolbar ( Alt/Option + W ).
Double click an existing layer in the Composition panel.
This opens up the layer in the Layer panel.
Select a frame to start from.
Avoid frames where the object is hidden by other objects in the scene. For example - for a person walking in and out of frame, choose a frame where they are completely in the scene.
Paint a green foreground stroke on the subject, object, or region you are attempting to roto.
By default, there is a green cross over the mouse cursor. It is a best practice to set the appropriate brush size before making your first stroke. The brush size is visible in green before you start with your first stroke. To change the size, select Windows > Brushes, and adjust the diameter of the brush. You can also hold Ctrl(Win) or Cmd(macOS) and drag left and right to change the size of the brush.
Refine the selection.
Paint extra strokes, or paint background strokes by holding Alt/Option to remove portions of the selection. Draw strokes around the edges that you want to remove.
The magenta line that surrounds the object starts to get refined.
In case you cut a little extra, release Alt/Option and drag over the area to add to the selection. The indication is that the cursor is green during addition. When you are drawing a background stroke, the Roto Brush tool’s pointer is a red circle with a minus sign in the middle.
Once the base frame is set, start the propagation.
You can start propagation by:
This might be more ideal for footage which requires more correction strokes.
The main difference between pressing spacebar and the moving the CTI is that space bar propagates, and then displays the results per frame. Moving the CTI waits for frames to propagate, then displays results.
As Roto Brush propagates the matte from frame to frame, the selection may start to include unwanted regions or "lose" portions of the original selection. To correct this, paint a background stroke (holding Alt/Option) on the first frame where the unwanted change occurs to remove unwanted regions, or paint a new foreground stroke to include anything that was missed. As with the base frame, avoid painting across the edge of the selection as much as possible.
You can resize the Roto Brush tool’s tip to make finer strokes. Broad strokes are best for initial work, but fine strokes are useful for details. (See Roto Brush strokes, spans, and base frames.)
Freeze the propagation.
After propagating the matte through all the video frames, freeze the propagation using the Freeze button at the bottom of the Layer panel.
After freezing, you can continue to make adjustments to the matte without re-propagating. If you need to add or remove from a selection after freezing, you can unfreeze the propagation with the same button.
Note that you should only freeze once you are satisfied with the Roto Brush matte. What Freezing does is that it locks the matte in place so that Roto Brush does not have to re-propagate the edges.
If After Effects has already calculated Roto Brush segmentation information for a frame when you click the Freeze button, then this information is cached. If the segmentation has not been calculated for a frame within a Roto Brush span, then After Effects must calculate the segmentation before freezing.
Frames with frozen (cached and locked) segmentation information are represented by blue bars in the Roto Brush 1 span view in the Layer panel (and purple bars in the Roto Brush 2 span view).
If you click Stop in the Freezing Roto Brush dialog box, After Effects stops adding frames to the cache, but Roto Brush segmentation is still locked with the segmentation information cached up until the point that you clicked Stop.
To unfreeze Roto Brush segmentation, click the Freeze button again.
When Roto Brush segmentation is frozen, you can place the pointer over the Freeze button to see a tooltip that tells you when the cached information was created.
When Roto Brush segmentation is frozen, the pointer for the Roto Brush tool has a slash through it.
The information that is cached and locked is the result of Roto Brush strokes and the properties in the Propagation property group of the Roto Brush effect. Making changes to any of these items (for example, by drawing new Roto Brush strokes or modifying properties in the Propagation property group) has no influence on the result of the Roto Brush effect until you unfreeze segmentation. The properties in the Matte property group are not frozen.
Frozen Roto Brush segmentation information is cached and locked while the application is running, and the cached information is saved with the project.
Use the toggles at the bottom of the Layer panel to view the matte results, or open the Composition panel to view the result in-context with other layers.
You can choose these view modes from the Show Channel menu in the Layer panel, by clicking the buttons in the Layer panel, or by using keyboard shortcuts. You can use the controls at the bottom of the Layer panel to change the color and opacity of the overlays used in Alpha Boundary and Alpha Overlay mode.
Shows alpha channel of layer (Alt+4 or Option+4).
Shows source layer with foreground and background unchanged, with segmentation boundary overlaid as colored outline (Alt+5 or Option+5).
note: Alpha Boundary view mode is turned off when the View menu in the Layer panel is changed to anything other than Roto Brush.
Shows source layer with foreground unchanged and background overlaid with a solid color (Alt+6 or Option+6).
When you first draw a Roto Brush stroke, the frame on which you are drawing becomes a base frame. The segmentation information (the information about what is defined as foreground and what is defined as background) defaults to the entire duration of the layer, or to the duration of any empty durations if multiple spans are present. The range of frames thus influenced by this base frame is its Roto Brush span. Little arrows in the span bar in the Layer panel show the direction in which the information is being propagated. If you draw a corrective stroke anywhere where the arrows point to the right, the information from that stroke is propagated forward; if you draw a corrective stroke anywhere where the arrows point to the left, information from that stroke is propagated backward. If you draw a stroke anywhere outside of a Roto Brush span, then you create a new base frame and span.
You can work your way forward a frame at a time from a base frame, making corrective strokes, and you don't have to worry about your strokes changing results on frames that you've already worked on. You can do the same thing going backward from a base frame.
The influence of each corrective stroke propagates forward or backward to affect all frames in that direction within the span, regardless of when the stroke is made. For example, if the base frame is at frame 10, you make a corrective stroke at frame 20, and then you make a corrective stroke at frame 15, then frame 20 will be affected by both of these corrective strokes—just as if you had made the corrective strokes in the other order.
Each time that you make a stroke within a span, the span grows, unless it can't because the span in which you're drawing is adjacent to another span.
To manually change a span duration, drag either end of a span.
To delete a span, right-click (Windows) or Control-click (Mac OS) a span and choose Remove Span.
To delete all spans, delete the instance of the Roto Brush effect.
In Roto Brush 2, there is a propagation banner at the bottom of the Layer panel which gives a status of the current propagating frame and the total number of frames. For example, "Roto Brush propagating frame 40 of 131".
The Roto Brush tool is similar in many ways to the paint tools, though it also has several important differences.
When the Roto Brush tool is selected, controls in the Paint panel are disabled. Roto Brush strokes have a duration of one frame, though their influence propagates forward or backward within a span.
You can change the brush size (Diameter) for the Roto Brush tool in the same way that you change it for the paint tools. You can use the Diameter control in the Brushes panel or Ctrl-drag (Windows) or Command-drag (Mac OS) in the Layer panel. Other controls in the Brushes panel do affect the Roto Brush tool, with the exception of Hardness.
You can copy Roto Brush Path properties, and paste them into masks, shapes, and instances of the Paint effect, just like you can with other kinds of paths. If you copy an individual stroke, the Roto Brush span information is not copied; however, if you copy the entire Roto Brush effect instance, it includes the Roto Brush span (and base frame) information.
You can use expressions on the Roto Brush effect's Path property in the same manner as the Paint effect's Path property.
When drawing a stroke with the Roto Brush tool, a new stroke is created even if another stroke is selected. This differs from the stroke replacement functionality for the paint tools.
Roto Brush strokes are in a Strokes property group within the Roto Brush property group in the Timeline panel.
Many keyboard shortcuts that work with paint strokes and paint tools also work with Roto Brush strokes and the Roto Brush tool. See Paint tools (keyboard shortcuts).
The Roto Brush effect properties in the Propagation property group affect segmentation between foreground and background and how that segmentation information is used for contiguous frames in a span. Other properties of the Roto Brush effect affect the matte that is generated based on the initial segmentation. The Refine Matte effect includes all of the properties of the Roto Brush effect outside of the Propagation property group (except for Invert Foreground/Background).
When the View menu in the Layer panel is set to Roto Brush, a Freeze button appears in the lower-right corner of the Layer panel. Click this button to cache and lock segmentation for all Roto Brush spans for the layer within the composition work area. This preserves the matte and saves it with the project, preventing the Roto Brush effect from recalculating the segmentation when you open the project again or make changes.