RotoShape

This is a newer, faster, more flexible, and more able rotoscoping tool to replace QuickShape, which turned out to be not so quick.

RotoShape can create multiple spline-based shapes which can then be fed in as an alpha channel for an element, or can be used to mask a layer or an effect. For techniques on applying masks, see Overview - Masks.

Currently, the black holes will not punch a hole in RotoShape's alpha mask. This should be fixed for the maintenance release. Therefore, if using this as a mask, either use the one of the RGB channels as the mask, or reorder the luminance into the alpha when using it with Inside or Outside. This can be done with Reorder - rgbl or a LumaKey at default settings.

RotoShape has the following advantages over QuickShape:

 

Build vs Edit mode

There are two modes in RotoShape: and mode.

When you are in Build mode, the shape will not draw (and will therefore not affect later nodes). When you click on a blank spot, it will append a new knot there. The tangent will always be trying to close itself with the first knot, so there will therefore be some curvature around these end points. You can edit previously-placed knots and tangents.

 

To close the shape, toggle over to Edit mode.

When you are in Edit mode, the shape will close itself up and will fill each shape. If you click on a blank spot and drag, you are now selecting points. Either drag to select a new group of points, Shift+drag to add to your group of active points, or Ctrl+drag to remove from your active group of points.

 

Inserting and Modifying Points and tangents

To insert a new point, hold down Shift and click on a segment area. A new knot will appear. To remove a knot, select it and hit the Delete key, or hit the Delete Knot button .

You can modify a tangent in two ways. If you select it, you can toggle if it is splined or linear by toggling its state. You can also break a tangent by Ctrl+dragging on the end of the tangent:

Hold Ctrl and drag on the end... ...to break a tangent.

Once it is broken, you can let go of Ctrl. Now when you drag, the two tangents are locked relative to each other:

To break them again, just hold down Ctrl.

To realign the tangents, hold down Shift and click on the tangent end.

 

Creating and Modifying Shapes

You can create additional shapes by hitting the Add New Shape button . This will slide you into automatically into Build mode and you can add another shape.

You can modify the shape in several ways. You can grab the transform tool. The small knobs going up and to the left are the Y and X scale parameters, respectively. The diagonal knot will scale both X and Y. The longer knob to the right will rotate it, and grabbing in the middle will move the tool.

To move the transform tool without modifying the shape, hold down Ctrl.

If you hold down the right mouse button on a knot, you can get further controls. The first one is the Bounding Box Toggle, which gives you a box that can be transformed to both move and scale the shape:

The right mouse menu on a knot gives you several controls, including the ability to delete the shape.

 

Knot Modes

There are four different knot modes:

Icon Name Hot Key Notes
Group Mode F1 Will move both the main shape point and the edge point associated with it.
Main Mode F2 Will only allow you to move main shape points. Edge points will not be modified.
Edge Mode F3 Will only move edges. You can therefore move the edge away from the shape.
Any Mode F4 Allows you to pick either type of knot.

 

Therefore, to create a soft edge, toggle over to Edge Mode and drag a knot out:

To reset the softedge, go to Edge Mode, and hold down the right mouse over the edge knot and select Reset Softedge:

Be careful with the soft edges. If you make a shape where the lines overlap each other, you may get rendering artifacts. To clean up minor artifacts, apply a slight blur with the Blur node.

 

Right Mouse Controls

Clicking with the right mouse on a knot or transform control will give you several additional functions.

When doing the right mouse on a knot, you can specify a shape to be black, which can then be used to punch a hole in other shapes. You can use the Move functions on the right mouse menu to switch its order. In the future, we will make some no-doubt swell list-widge for this, but for now the controls are all in the Viewer.

If you hit the right mouse button over the transform control, you can set up a skeleton relationship between your shapes. Select Add Child and click on the transform control of the shape you want to be a child of the current shape. To remove the link, select Remove Parent.

Once a link has been established, modifying a shape will affect its children:

 

Right Mouse menu on Transform Tool:

Item Something
Bounding Box Toggle Toggles on and off the Bounding Box control for a shape
Move to Back Moves the shape to be behind all other shapes.
Move Back Moves the shape back one position in shape order.
Move Forward Moves the shape forward one position in shape order.
Move to Front Moves the shape in front of all other shapes.
Re-Center Re-centers the transform tool to be the center of the shape - Ctrl+drag can modify it without moving the shape.
Add Child Click on the transform tool of a second shape to make it a child of the current shape.
Remove Parent Removes the current shape from the skeleton hierarchy.

 

Right Mouse menu on Knot:

Item Something
Bounding Box Toggle Toggles on and off the Bounding Box control for a shape
Move to Back Moves the shape to be behind all other shapes.
Move Back Moves the shape back one position in shape order.
Move Forward Moves the shape forward one position in shape order.
Move to Front Moves the shape in front of all other shapes.
Select All Selects all points on the shape
White Renders the shape with a white interior.
Black Renders the shape with a black interior and can therefore be made to punch holes in other shapes it is in front of.
Reset Softedge Re-positions the edge knot on top of the main knot.
Delete Shape Deletes the current shape.

 

Viewer Buttons:

Item Something
Build/Edit toggle. Toggles you between the two modes. RotoShape will only render when in Edit mode.
This can quickly toggle on and off the rendering of the shape.
These control the tangent visibility. When in Pick mode, only the active knot will display a tangent. None will hide all tangents, and All will display all tangents.
Spline/Linear toggle. New knots will be created either as splines or as linear points. Selecting knots and toggling this will specify them as a certain type of knot.
A really annoying on-screen control to pan the entire collection of shapes. It is off by default.
Delete current knot(s)
Determines what knots can be grabbed. Group mode means both the main shape and the edge knot are grabbed. Main mode means only the main shape knots are grabbed. Edge mode will only select edge knots, and Any mode will allow you to pick either main or edge knots.
Add New Shape. Clicking this will put you into Build mode where you can add a new shape.
If the main on-screen transform tool is turned on , this will toggle the visibility of the animation path. Doesn't have a purpose if this tool is turned off.

 

Function

Parameters
Type
Defaults
Function
width
int
GetDefaultWidth() width of the image
height
int
GetDefaultHeight() height of the image
bytes
int
1 bit depth, 1, 2, or 4 bytes/channel
x/yPan
float
0, 0 A global pan applied to the entire shape.
angle
float
0 A global rotation applied to the entire shape - points will be properly interpolated according to the rotation.
x/yScale
float
1, 1 A global scale applied to the entire shape.
x/yCenter
float
width/2, height/2 The center of transformation for the angle and x/yScale parameters
motionBlur
float
0 This is the quality setting for the motionBlur. A quality of 0 turns off the blur. Unlike the normal blur, you can boost this past 1.
shutterTiming
float
1 The duration of the blur exposure. Default is .5, or half a frame.
shutterOffset
float
0 The starting frame relative to the current frame. Default value is 0, meaning the beginning of the current frame.
shapeKeys
float
N/A This is not to be modified by the user. It is just a placeholder

 

Synopsis

image RotoShape( 
  int width, 
  int height, 
  int bytes,
  float xPan,
  float yPan,
  float angle,
  float aspectRatio,
  float xScale,
  float yScale,
  float xCenter,
  float yCenter,
  float motionBlur,
  float shutterTiming,
  float shutterOffset,
  [cv data]

);


Script

image = RotoShape( 
  width, 
  height, 
  bytes, 
  xPan,
  yPan,
  angle,
  aspectRatio,
  xScale,
  yScale,
  xCenter,
  yCenter,
  motionBlur,
  shutterTiming,
  shutterOffset,
  [cv data]
  ); 
);


Command Line

not really command-line compatible

See Also
QuickShape