You are here: User Guide > Nuke > Temporal Operations > Offsetting and Slipping Clips

Offsetting and Slipping Clips

Offsetting Clips

Offsetting a clip refers to moving the clip backwards or forwards in time. In Nuke, you can offset clips using the TimeOffset and TimeClip nodes.

Unlike TimeClip, the TimeOffset node can also be used with 3D nodes, for example, if you want to offset camera times.

To Offset a Clip Using the TimeOffset Node

1.   Click Time > TimeOffset to insert a TimeOffset node into your script. (Place it downstream from the element to which you want to offset.)
2.   Attach a Viewer to this node, so you can see the effect of your changes.
3.   In the TimeOffset properties panel, check reverse input if you want to invert the clip (make the last frame the first, and so on).
4.   In the time offset (frames) field, type the number of frames by which you want to offset the clip. Enter a negative value to subtract frames from the head of the clip. Enter a positive value to add frames to the head of the clip.
5.   Adjust the script length for the new output range. Select Edit > Project Settings, and enter frame range values that match the output range you specified.

NOTE:  It’s not mandatory that you adjust the script’s frame range after slipping the clip. If you don’t, the Viewer fills the empty frames at the tail of the clip by holding on the last frame.

TIP:  If you are using 3D nodes, such as cards, spheres, or cubes, together with a TimeOffset node, you can view the object in just a specified frame range by setting the frame range control for the object, and attaching a Viewer node to the TimeOffset node. Be sure to set the timeline range to Input to view the offset.

TIP:  Using TimeOffset, you can also offset clips directly in the Dope Sheet. See To Reposition Clips Using TimeOffset Nodes.

Slipping Clips

Slipping a clip refers to changing the content of the clip that is seen, but not the position or duration. In Nuke, you can slip clips using the TimeClip node.

Just like TimeOffset, the TimeClip node also lets you move clips forwards or backwards in time and reverse the order of frames in a clip. In addition to this basic functionality, you can 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. Using TimeClip, you can also slip the clip directly in the DopeSheet, which can be handy if you prefer editing clips on a timeline.

To Slip a Clip Using the TimeClip Node

1.   Click Time > TimeClip to insert a TimeClip node into your script. Place it downstream from the element that you want to adjust.
2.   Attach a Viewer to the TimeClip node to see the effect of your changes.
3.   In the Fade In and Fade Out fields of the TimeClip properties panel, type the number of frames, if any, you want to fade to or from black.
4.   Set the new frame range for your clip by entering the first and last frame numbers.
5.   In the before dropdown menu, set how Nuke should treat the frames before the first frame in the range (examples refer to a 20-frame sequence with a first frame 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.

6.   In the after dropdown menu, set how Nuke should treat the frames after the last frame (examples refer to a 20 frame sequence with a last frame 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.

7.   Use the frame dropdown to set 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.

8.   To reverse the clip within the specified frame range, check reverse.
9.   While the original range fields don't actually affect the output of the node, they help make things clear in the Dope Sheet. Open the Dope Sheet and enter some values here and observe how they affect the TimeClip lines.
10.   If necessary, adjust the script length for the new output range. Select Edit > Project Settings, and enter frame range values that match the output range you specified.

TIP:  Using TimeClip, you can also offset, trim, and slip clips directly in the Dope Sheet. See To Reposition, Trim, and Slip Clips Using Read and TimeClip Nodes.