Edit Function: Settings
When you press “Edit function” you will see a curve editor. The canvas shows a grid with a horizontal (X) and a vertical (Y) axis. Understanding the relation between these axes is important, because it is the key to the entire retiming process. The
- horizontal (X) axis represents the retimed time in frames (default unit)
- vertical (Y) axis represents the original time in seconds.
Please also note that
- it is often easier to work with retimed seconds instead of frames. You can toggle between both units with Alt + T (seconds) and Alt + F (frames)
- the adjusted → “FPS output” is considered
- we recommend setting Retiming Parameters > Time factor to 1.0.
No matter which method you are using, you should always check the result of your operations from time to time with the built-in preview methods (see → “Retiming: Basics”). Once you are satisfied, make your → “Input/Output Settings”, and press “Retime”.
Expressions
When you take a look at the input field at the bottom of the window you will see an entry “t”. This entry is a so-called → expression where “t” represents the current time. When you enter ‘f’ you can switch to frames, and you will see a stepped curve.
Expressions can be very complex, and it is possible to combine mathematic functions (sine, cosine, square root, etc.), and perform calculations (addition, multiplication, etc). Under “Insert” you will find drop-down lists with the entire range of elements. Expressions are a fast and convenient method, but it can be difficult to create specific behaviour by combining functions like sine or cosine. In situations like that you should consider → drawing curves.
Another effect you can see with predefined functions is that the curve is increasing or decreasing, as shown in the sine curve below:
For a retimed simulation, a decreasing curve means that the animation will be played backwards. With the sine function the effect is that the simulation is oscillating back and forth. This also applies to hand-drawn curves with a similar shape.
Working with Seconds
Press Alt + T to change the unit of the horizontal axis to seconds.
When the expression is t you will see that 1.0 second on the X axes corresponds with 1.0 second on the Y axes – input time equals output time.
- In order to accelerate the retimed simulation use factors greater than 1.0, e.g.
t*2
. - When you take a look at the canvas you will see that 1.0 second on the X axes (retimed) corresponds with 2.0 seconds on the Y axes (original). The simulation will be 2 times faster.
- If you want to create slow-motion effects you can work with factors smaller than 1.0.
- What is the factor for a simulation slowed down 3 times? If you think it is
1/3
then you are right. The expression in this case ist*(1/3)
or justt/3
.
Now it is necessary to calculate the end frame of the retimed simulation, because this value has to be entered in “Last” field of the → “Retiming Parameters” tab:
- Let's say the length of the original simulation is 148 frames.
- The number of retimed frames is calculated this way:
148 / (1/3) = 148 * 3 = 444
. - Close the editor and go to Retiming Parameters > Frame range.
- Deactivate “Use scene range”.
- Last = 444
Working with Frames
Press Alt + F to change the unit of the horizontal axis to frames.
Substitute t through f. The curve becomes very steep and one frame represents one second – the retimed simulation will be 25 times faster than the original simulation. In order to get the same relation as with t (25 frames = 1.0 second) everything has to be slowed down:
“FPS output” is 25 frames per second.
In order to achieve this representation the expression has to be
f*(1/25)
, orf/25
.If you want to halve the simulation's speed enter
(f*(1/25))/2
, or justf/50
.
What does this finally mean for the retimed simulation? An example:
- The original simulation length is 6.0 s.
- Halving simulation speed means that we will double playback time from 6.0 s to 12.0 s.
- The number of retimed frames is
12.0 s * FPS output
:12.0 s * 25 f/s = 300 f
- So, the X (horizontal) coordinate's value must be 300, the Y (vertical) coordinate's value 6.0.
- When you check the values in the editor you will see that the calculation is correct.
If you want to get the output frame at an arbitrary position on the curve you just have to use the following formulas:
Output frame [f] = Input time [s] * FPS output [f/s]
Output time [s] = Output frame [f] / FPS output [f/s]
When you work with frames you will always see a stepped curve. The reason is that frames are integers, and a value like 16.74 frames is not valid. Please consider this and perform a rounding up of the result. In order to get a smooth and continuous curve, it is also possible to use
t*fps
(fps will be substituted through the scene's “FPS output” value)
Evaluate function as frames instead of seconds
This option only affects the timeline under Retiming Parameters > Timing example: you can switch between frames and seconds.