Just like TimeOffset, the TimeClip node lets you move the clip forwards or backwards in time and reverse the order of frames in the clip. In addition to this basic functionality, you can slip a clip, set the frame range for the clip, set what happens to frames outside of this frame range, fade the clip to or from black, and set expressions to adjust the node’s behavior.
TIP: Using TimeClip, you can also offset, trim, and slip clips directly in the Dope Sheet.
Connection Type |
Connection Name |
Function |
Input |
unnamed |
The image sequence to slip. |
Control (UI) |
Knob (Scripting) |
Default Value |
Function |
TimeClip Tab |
|||
Fade In |
fadeIn |
5 |
The number of frames to fade from black. |
Fade Out |
fadeOut |
5 |
The number of frames to fade to black. |
frame range |
first |
Dependent on Project Settings |
The first frame of the range. You can also adjust this by going to the Dope Sheet tab and dragging the head of the clip to a new location. |
before |
hold |
Sets the behavior of frames before the first frame (examples refer to a 20-frame sequence with a first value of 5): • hold - the first frame in the sequence is held until the first frame is reached. Example: 1, 1, 1, 1, 1, 2, 3, 4, etc. • loop - substitutes an equal number of frames, effectively creating a clip loop. Example: 17, 18, 19, 20, 1, 2, 3, 4, etc. • bounce - substitutes a reversed equal number of frames, creating a clip bounce. Example: 5, 4, 3, 2, 1, 2, 3, 4, etc. • black - frames are black until the first frame is reached. |
|
last |
Dependent on Project Settings |
The last frame of range. You can also adjust this by going to the Dope Sheet tab and dragging the tail of the clip to a new location. |
|
after |
hold |
Sets the behavior of frames after the last frame (examples refer to a 20 frame sequence with a last value of 5): • hold - the last frame in the sequence is held until the end of the sequence is reached. Example: 16, 17, 18, 19, 20, 20, 20, 20, etc. • loop - substitutes an equal number of frames, effectively creating a clip loop. Example: 16, 17, 18, 19, 20, 1, 2, 3, 4, etc. • bounce - substitutes a reversed equal number of frames, creating a clip bounce. Example: 16, 17, 18, 19, 20, 19, 18, 17, etc. • black - frames are black from last until the end of the sequence is reached. |
|
frame |
frame_mode |
expression |
Sets the frame mode: • expression - Lets you enter an expression in the field on the right. The expression changes the relation between the current frame and the frame read in. For example, if your clip begins from image.0500.rgb and you want to place this first frame at frame 1 rather than frame 500, you can use the expression frame+499. This way, 499 frames are added to the current frame to get the number of the frame that’s read in. At frame 1, image.0500.rgb is read in; at frame 2, image.0501.rgb is read in; and so on. Another example of an expression is frame*2. This expression multiplies the current frame by two to get the number of the frame that’s read in. This way, only every other frame in the clip is used. At frame 1, image.0002.rgb is read in; at frame 2, image.0004.rgb is read in; at frame 3, image.0006.rgb is read in; and so on. • start at - Lets you enter a start frame number in the field on the right. This specifies the frame where the first frame in the sequence is read in. In other words, all frames are offset so that the clip starts at the specified frame. For example, if your sequence begins from image.0500.rgb and you enter 1 in the field, image0500.rgb is read in at frame 1. Similarly, if you enter 100 in the field, image0500.rgb is read in at frame 100. • offset - Lets you enter a constant offset in the field on the right. This constant value is added to the current frame to get the number of the frame that’s read in. For example, if your clip begins from image.0500.rgb and you want to place this first frame at frame 1 rather than frame 500, you can use 499 as the constant offset. This way, 499 is added to the current frame to get the frame that’s read in. At frame 1, image.0500.rgb is read in; at frame 2, image.0501 is read in, and so on. You can also use negative values as the constant offset. For example, if you use the value -10, Nuke subtracts ten from the current frame to get the frame that’s read in. At frame 20, image.0010.rgb is read in; at frame 21, image.0011.rgb is read in; and so on. |
frame |
none |
||
original range |
origfirst |
Dependent on Project Settings |
The original first frame of the sequence. |
origlast |
Dependent on Project Settings |
The original last frame of the sequence. |
|
reverse |
reverse |
disabled |
Reverse the clip within the specified frame range. |
Editing Curves and Keyframes - Step Up to Nuke Tutorial 6 from The Foundry on Vimeo.
I have created some basic animation to move this rock across the screen. It would be great to alter the animation to improve it. Now, there are several ways to do that inside Nuke. One is to go to a pre-existing keyframe, say frame 15, and update the properties. For example, maybe the scale is too large, so I will reduce that by just typing in a new number - .25 - and do that anywhere as a keyframe. So, I can go to frame 40 and then adjust the scale again, say .1. You can also alter the rotation. For example, maybe 500 for the rotation. Let’s play it back now.
Right now the rock is moving a bit slow, and it’s a little hard to see with the transform handle and the motion path there, but what I can do is click inside the Viewer and press the O key once and then twice to hide those overlays. So, what we do with the rock now that it’s too slow; a great way to alter the speed is to go into the Dope Sheet and scale the keyframes so they are closer together. Now, before we do that, it might be worth applying another node. We are only using frames 15-40 for the animation. Let’s say I want to throw out the rest of the image sequence and not use it. You can do that in the Dope Sheet at the same time with the TimeClip node. The TimeClip node is new for Version 7. Let’s do that. I am going to select the Read1 node, right-mouse-button-click, and choose Time > TimeClip.
Now you can change the values for TimeClip in the properties panel, or you can do it right in the Dope Sheet. You can get to the Dope Sheet, right here, by clicking this tab. The Dope Sheet will show you whatever node is open, for example, TimeClip1 and Transform7. It will also show you whatever is keyframed in terms of the properties, like, rotate, scale, and translate, and also their associated channels, like x and y for translate. If something is animated, you will see a keyframe tick mark on the timeline. For example, here is the y keyframe for translate. You can move these tick marks to different frames. Now, in this case, I want to scale the keyframes to move them closer together. To do that, I can click+drag a marquee box around the keyframes and then click+drag the right of the transform box that appears. If I pull these closer together, the animation will become faster; if I do the opposite, the animation will become slower. Let’s make them closer together. To leave the transform box, just click off of it.
Now, the TimeClip works a little bit differently. You will see the TimeClip shows brackets for the time with a line in between. It shows you what range of the input is being used, in this case, frame 0 to frame 90 of the image sequence. You can click+drag these brackets inwards to alter that. For example, I can click+drag these, so then I am only using frame 15 to frame 29. There is a time slider here that I can move to take a look, so now all my animation and my background is occurring between frame 15 and frame 29. You can also make this all start on frame 0 by moving everything to the left. To do that, click+drag a marquee box around the keyframes and around the brackets. If I let go again, we have a transform box and I can click+drag that to the left. Now I have forced everything to start at frame 0. Whenever I make an alteration in here, the TimeClip properties automatically update. In fact, I can see up here that the frame range has been set from frame 15-29, and it is offset by 15 and that allows it to start at frame 0. This is a pretty basic application of the TimeClip node. A more advanced way to use it, which takes advantage of its power, is to have it offset completed upstream animation. We will come back to that at the end of this video.
So, now the rock moves much more quickly, but I don’t want to use anything after frame 14 in this case. It just goes black due to the TimeClip, and also there is no more animation on the rock. To fix that, what I can do is go to the Project Settings, Edit > Project Settings, and make the timeline last 14 frames. There we go.
So, what else can we do here? One thing that might be nice is to get an arch in the motion of the rock. So, let me go back to the Node Graph and make sure my Transform node is open, turn back on my overlay by pressing the O key in the Viewer, and moving the transform handle on some middle frame, like frame 8. As I move it, I will see the prior position for the rock, and the current position, but when I let go, it updates with the current position. When I do that, a new keyframe is laid down at frame 8. Now, the last way to alter information is through the Curve Editor. There is a Curve Editor tab right here. You can also get to the Curve Editor up here, in the properties panel. It’s a little bit better. If I right-mouse-button-click on the animation menu button, I can choose Curve editor. Whatever property I clicked on, like translate, will be loaded in the Curve Editor automatically and, in fact, here are the x and y curves for translate.
Now, this Curve Editor works like many other Curve Editors in other programs. On the left, will be a list of nodes, properties, and channels that have animation. If you click on a channel or a property and don’t see any curve, what you can do is click inside the Curve Editor and press the F key to frame it. So, there is the w curve for scale. I am going to go back to translate, and frame those. You can also use your camera shortcuts to move around, like scroll or zoom. Now each curve will have 2 or more keyframes. Here are 3. You can click on them to select them, you can move them up and down to change the value, or move them left to right to change where they are occurring on the timeline, in terms of the frame number. If a keyframe is selected, you can click+drag the tangent handle. It alters the shape of the curve. You can also right-mouse-button-click and choose a different tangent Interpolation, for example, Linear. Linear breaks the tangent handle, so you can move each side separately, or you can go back to the default, which is Smooth. You can delete a keyframe by clicking it and pressing the Delete key. You can make a new keyframe by Ctrl+Alt+clicking on the curve, or Cmd+Option clicking. So, there are quite a few things you can do right here in the Curve Editor in terms of shaping the curves. So, let’s say the animation is good enough for now. Let’s go back to the TimeClip node and talk about the more advanced function.
Now, it will take a minute to set up, so I am going to fast forward. I am back with the updated scene. The Transform node is being output to 3 different locations. The first goes to the Merge node that we previously used, the other outputs are going to 2 new TimeClips. Those are also connected to the Merge node through the A2 and the A3. What’s happening here is these new TimeClips are offsetting the completed animation that was created through the Transform7 node. So, what you can see is not just the first rock, but 2 other rocks that are offset in time by several frames. TimeClip2 has its frame property set to start at and there is a 3 entered here. This means that iteration of the rock lags behind 3 frames. TimeClip3 also has frames at the start at and it is offset by 6 frames. What’s great about this is you can always go back to the original animation. Whatever is upstream, you can change. So, I can go back to Transform7, and go to the Curve Editor and say display the y curve. Change that and all the TimeClip variations pick up that new animation.
One last thing we can do here is activate motion blur. In fact, the Transform node carries the motionblur option. It is set to 0, which is off by default. If you raise this up to 1 or higher, motion blur will be activated. In that case, there are several uses for the TimeClip node and how to fine-tune your animation inside of Nuke.
“Tears of Steel” footage courtesy (CC) Blender Foundation - mango.blender.org