As you add keyframes to a property, you create a curve. The curve represents the value of the property over time. You can see this curve in the Curve Editor panel, where each value (the Y axis) is plotted as it changes over time (the X axis). You can add keyframes, delete keyframes, and even adjust the interpolation between key-frames without ever looking at this curve. However, as the animation grows more com-plex, you may find it easier to edit the animation by manipulating this curve directly.
In most nodes in Nuke, right-clicking/Ctrl-clicking the Animation menu gives you an option called Curve Editor, as seen in FigUrE 6.18, but this functionality has been removed from the RotoPaint node. In RotoPaint, because all properties are linked to a stroke or a shape, all curves are associated with a stroke or a shape as well. Simply selecting a shape or stroke and switching to the Curve Editor panel shows their asso-ciated properties.
FIGURE 6 .18 There is usually a Curve Editor option, but that is not the case with rotoPaint.
1 . Click the Curve Editor tab in the Node Graph pane to switch to it (FigUrE 6.19).
FIGURE 6 .19 The Curve Editor as you first see it.
In the Curve Editor shown in Figure 6.19, the window on the left shows the list of properties (I call it the Properties List window), whereas the window on the right shows the actual curves for the properties as they are being selected. I call that the Graph window.
At the moment, all you see is the name of the node with a little plus sign at its left.
Clicking that plus sign reveals more.
2 . Click the plus sign to the left of the RotoPaint2 text (FigUrE 6.20).
FIGURE 6 .20 More is revealed in the Curve Editor’s Properties List window.
You can now see that a few sub-elements have opened in the Properties List window. The first one we’ll talk about is called Bezier1. If you have more than one shape or stroke drawn, and you select them in the Stroke/Shape List window in the Properties panel, they will display here instead of Bezier1. Under Bezier1, you have the name of the property that has animation in it—Feather, and under that you have W and H, for Width and Height. True, you only operated the Feather property with one slider, but these are actually two properties grouped together, one for Width and another for Height.
Here, I will show you how to load these curves into the Graph window on the right and what to do with them there.
3 . Select both the W and H Feather properties by clicking the first and then Shift-clicking the second. Click the Graph window on the right to select that window.
4 . Press Ctrl/Cmd-A to select all keyframes and then press F to fit the curves to the window (FigUrE 6.21).
FIGURE 6 .21 Two identical curves in the Curve Editor.
The Curve Editor now shows two curves and all the keyframes for both curves are selected. You have selected two curves that are exactly alike, which is why it appears that you are seeing only one curve.
5 . Click an empty space in the Curve Editor to deselect the keyframes.
one thing you can do in the Curve Editor is change the interpolation of a keyframe.
You can switch between a smooth keyframe and a horizontal one, for example.
6 . Select the middle keyframe on the curve and press the H key to make the point a horizontal one (FigUrE 6.22).
TABLE 6.4 lists some hot keys for different types of interpolation on curves.
TaBLE 6 .4 Curve interpolation
hot Key Function Description
H Horizontal Makes the tangents horizontal, making animation slow down to a stop at the keyframe.
L Linear Produces sharp velocity changes at keyframes and straight lines between them.
Z Smooth Smooths out the interpolation between the keyframes.
K Constant Forces a constant value after each selected point.
X Break Adjusts the two tangents of a selected point independent of each other.
FIGURE 6 .22 Making a point on a curve horizontal.
You can move around in the Curve Editor in the same way that you move around in other parts of the application. You use Alt/option-click-drag to pan around. Use + and – to zoom in or out, or use the scroll wheel to do the same. You can also use Alt/
option-middle-button-drag to zoom in a non-uniform way. Pressing the F key will frame the current curve to the size of the window.
You can create more points on the curve by Ctrl-Alt/Cmd-option-clicking just as you do when drawing shapes in the RotoPaint node.
7 . Select the middle keyframe by clicking it (marqueeing won’t do).
Three numbers display: an X, a Y, and a ø. The X and Y are obvious, but the ø is the angle of the tangents. At the moment it’s set to 0 because you told this key-frame to be horizontal.
8 . Double-click X to activate its field and increase or decrease by 1, then press Enter/Return (FigUrE 6.23).
This makes editing locations of points on a curve very easy. Sometimes it is easier to edit the location of points numerically, and it’s nice to have this available.
FIGURE 6 .23 Numeri-cally changing the loca-tion of points.
Many other functions are available in the Curve Editor, but I won’t cover them all now.
Here’s one last function that enables you to edit the whole curve using simple math.
9 . Drag to select the whole curve (or Ctrl/Cmd-A to select them all).
10 . Right-click (Ctrl-click) and then choose Edit/Move (FigUrE 6.24).
FIGURE 6 .24 You can access more features through the contextual menu.
11 . In the Move Animation Keys dialog box that opens, enter x+5 in the X field to move your curve 5 frames forward (FigUrE 6.25).
12 .Click oK.
Watch your curve move five frames forward. What happened here is you asked to move all X values by the current X value plus five. So the whole curve moved five frames forward.
Let’s try another function.
13 . Select your curve again, right-click (Ctrl-click), and choose Edit/Move again.
14 . This time enter x/2 in the X field and press Return/Enter.
Watch your curve shrink. This is because you asked all X values to be half their current value. Because X is time, your animation will now be twice as fast.
These examples and the other features in the contextual menu enable you to manipulate your curve in many ways.
15 . If you want to save this project, do so. otherwise, press Ctrl/Cmd-W to close this project and create another one. If Nuke quits altogether for some reason, just start it again.
This concludes the introduction to both the Curve Editor and the RotoPaint node.
That’s enough playtime! Let’s move on to practical uses.
pAiNTiNg iN pRAcTice
I would like you to start practicing with a simple and common example: Painting to remove things you don’t want in the image. Let’s load some footage to practice on.
1 . Bring in KnifeCU.####.png from the chapter06 folder with a Read node.
2 . Click the newly imported Read node, and then press Alt/option-F to view it in Framecycler or simply view it in the Viewer and click Play (FigUrE 6.26).
FIGURE 6 .26 The wire holding the knife in place is visible and needs to be removed.
FIGURE 6 .25 Manipulating the curve function.
In this shot, a wire holding the knife in place needs to be painted out and the little white hairs that display here and there on the negative need to be removed as well.