QuickShape

Function
The QuickShape function is an image generator to be used for animated garbage mattes. It is ideal for plugging into the Mask input to a node, or to be used in conjunction with functions like Inside, Outside or KeyMix.

Since they create images like any other, you can modify them with standard tools like Blur or DilateErode.

In 2.2, you can now turn on the motion blur for animated QuickShapes. Unfortunately, the Shape isn't using Shake's normal high quality motion blur. It is instead drawing several versions of the entire shape and rendering them, so you will get temporal aliasing when you have extreme motion.

 

Creating QuickShapes

Naturally, you create a QuickShape node. You are immediately able to enter in points with the mouse, provided the Display On-screen controls is turned on for that Viewer:

 

You start in Build Mode, which means every time you click on a blank spot, you append a new knot between the last knot and the first knot. You click in the points, or, if you keep the mouse down, you can drag the new point around. You can also go back and change any key or tangent, or insert a knot by clicking on a segment.

 

 

Once you are finished with the rough shape, click over to Edit mode. This means that when you click on a blank spot, you don't append a new point; instead, you can drag-select several points to move them as group. This will also fill in the shape.

 

Modifying QuickShapes

You can select multiple points when in Edit mode by drag-selecting. Points can then be modified as a group


 

These buttons will change the selected points from Linear to Smooth. Select the points and toggle the button to the setting you want. In this example, the two right knots have been made Linear

 

You can turn the shape fill on and off by clicking on the Fill button on the Viewer. If you are in Build mode, the shape is always un-filled ( I believe 'empty' is the right word in English...-self-editing Author). The filling of the Shape is not just a display feature - it effects the composite.

 


These lock or unlock the tangents of adjacent knots when moving any knot. In the first example, the tangents are unlocked. Therefore, when I move the middle blue point down, Shake tries to keep the tangents of the adjacent knots smooth, and therefore moves them.

If you instead have Lock Tangents on, then the adjacent tangents stay locked in place. This provides accuracy for adjacent segments, but creates a more irregular shape.



No big mystery - this either displays or hides tangents on the Shape.

 

 
This turns on and off the display of the Transform tool for the QuickShape.  

This button will delete all selected knots.

 

 

 

You can break any tangent by Ctrl+clicking on the tangent. The difference between this and Linear knots is that you keep the tangents with this technique.

 

To re-connect the tangents, Shift+click on the broken tangent.
You can modify the entire Shape with the Transform tool, giving you pan, rotation and scaling tools for the shape. Since this is a transformation, the points will rotate properly in an angular fashion when interpolating in an animation, rather than just sliding linearly to the next position. The controls appear at the same resolution of the QuickShape node, so if you are dealing with 2k plates, you might want to enter in a larger resolution for the QuickShape. Similarly, if you find the transform tool annoying, enter a resolution of 10x10. Neither of these techniques will change rendering speed due to the Infinite Workspace.

 

Animating QuickShapes


 

You can easily animate the QuickShape by turning on AutoKey and moving your points. To enter a new key, move to a new time, and change your position. In this example, I animate the Shape to make it smaller on the second keyframe. As you drag the time slider, the shape will interpolate between the two keys.

 


This button will delete a Keyframe if there is one at the current frame.

 

 

Here, I've inserted a knot and moved it towards the center at the first keyframe. If you go to the second keyframe's position, the shape is still round because Shake has maintained the smooth quality of the segment. If you instead turn on the Propagate buttons when you modify a knot, the second key's knot position will be modified as well. For example, I go back to key 1, turn on Propagate Forward, and insert a new knot, dragging it outwards. Now jump to the second key, and you will it has positioned the new knot in a relatively similar fashion in the second keyframe.

If you have several keys, Propagate Forward or Backwards can slow down your interactivity.

 




  A fast way of scrubbing through your animation is to toggle over to Release or Manual Update mode on the top bar, and then move the time slider. The shapes will draw in real time, but will not be rasterized.

 

Examples of Using QuickShapes

You can use a QuickShape in a variety of ways in your tree. The shape is procedurally drawn and then rasterized at every frame, so it can be modified like any other image.

In this example, I start with a picture of some old guy... ...and then create a QuickShape...

 

 

...and then use the Inside command to reveal the first image only inside of the Shape. You can edit the Shape in context if you are looking at Inside1, and have loaded the QuickShape1 parameters.



In this second example, I apply a Brightness operator to the image, and apply a Blur operator to the Shape. After plugging the output of the Blur into the Mask input of Brightness1, the image is only brightened in the Shape area.

 

In this third example, I create instead two smaller QuickShapes to isolate the eyes. Combining the two shapes together with Max gives me two separate masks for the Brightness1 node.

 

 

In this fourth example, I want to do some rotoscoping, but I don't want to attach the QuickShape to the FileIn node, called traffic . I push this button so it is down . I can now draw my QuickShape, even though the two nodes aren't connected.

In this final example, I have an image of the beach with a color correction, and a picture of the sky. I have used a QuickShape to roto out the sky. I can mix between the beach and the sky images through the QuickShape with the KeyMix node:

 

 

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.

 

Synopsis

image QuickShape( 
  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 = QuickShape( 
  width, 
  height, 
  bytes, 
  xPan,
  yPan,
  angle,
  aspectRatio,
  xScale,
  yScale,
  xCenter,
  yCenter,
  motionBlur,
  shutterTiming,
  shutterOffset,
  [cv data]
  ); 

Command Line

Uhm, this isn't really a command-line thing.

See Also
Rand, Grad, Ramp, Black, Checker, ColorWheel, RGrad