TimeX
Function
This applies a rule to change timing on the input clip. By default, the value is time, which means that at the current frame, it uses the current frame, or no change. However, by modifying the formula, you can get interesting effects.
Like Lookup and ColorX, you can duplicate most other Time functions with TimeX. These other functions are, generally, just macros with TimeX in them. The other functions were made becomes sometimes TimeX is counter-intuitive. Here are some examples mimicing the other functions.
TimeX expression |
time-10
|
101-time
|
time%10+1
|
time>10?10:time
|
Explanation | This shifts the clip 10 frames forward. While processing frame 50, it will read input frame 40. | This assumes frame 100 is the last frame. At frame 1, 100 used. | Loops every 10 frames. This takes the remainder of time/10, and adds 1 (otherwise frame 10 = 0). | Freezes the clip at frame 10. Any frame before that is processed normally. |
other functions |
Do nothing
|
Pick 1 frame
|
double the rate
|
Speed the clip up and down.
|
TimeX equivalent |
time
|
100
|
time*2
|
"CSpline(0,
1@1, 30@25, 40@50, 90@75, 100@100 )" |
Explanation | At every frame, the node returns 100, so only input frame 100 is used. | At frame 10, frame 20 is used. | This arbitrary curve returns different frame values. You can use any spline type, with as many keyframes as you want. |
Another more complex example would be to animate 360 3D frames with an animated light. The light is from the right at frame 0, from the top at frame 90, from the left at frame 180, etc. You then position a fake light source in the composite. By figuring out the angle of the light to the 3D element (using trigonometry), you can pick one of the 360 input frames to fake the lighting change
|
Parameters
|
Type
|
Default
|
Function
|
newTime |
float
|
time
|
These set the first and last frames to be taken as the clip length |
newInPoint |
int
|
inPoint
|
These apparently do nothing at the moment... |
newOutPoint |
int
|
outPoint
|
Synopsis
image TimeX(image, float time );
Script
image = TimeX( image, time );
Command Line
shake -timex time
See Also
FileIn