After this lesson
- Convert frames to seconds without an implicit fps value.
- Distinguish absolute and local frames.
- Count inclusive ranges correctly.
Before you start
- Composition
- A separate Fusion Composition. 1920×1080, square pixels, 25 fps.
- Parameter
- Transform1 → Angle
- Range
- Start at comp.RenderStart. Reference frames are local unless stated otherwise.
Most unusual-looking expressions are behaving correctly but using a different time system. Distinguish the absolute composition frame, local time, seconds and normalized progress.
Four different quantities
time is the requested time in frame units. time - comp.RenderStart is the offset from the render range start. Divide that offset by the frame rate to get seconds, or by the interval length to get relative progress.
RenderStart is a composition range boundary, not a universal promise of the first visible frame after every trim or nesting operation. Check the start on the actual Fusion Clip or title in Edit. These recipes specify fps explicitly: a variable named fps does not appear automatically.
One turn per second
For a 25 fps composition, the following formula produces 360 degrees in 25 frames. At 50 fps, replace 25 with 50 to preserve the speed in seconds.
360 * (time - comp.RenderStart) / 25Inclusive boundaries
The range 0…99 contains 100 frames, but 99 frame intervals separate its first and last samples. For progress reaching 1 exactly on the last frame, use RenderEnd - RenderStart. Add 1 when counting frames.
A one-frame composition has an interval length of zero: protect the denominator. Motion blur may request intermediate times, so avoid rounding time unnecessarily.
math.min(1, math.max(0, (time - comp.RenderStart) / math.max(1, comp.RenderEnd - comp.RenderStart)))Independence from evaluation order
Do not build animation by accumulating a value from the previous frame. Fusion may evaluate frames out of order, go backwards and use a cache. A sound procedural formula determines its result only from its inputs and time.
Lock seconds or frames?
360*t/25 produces one turn over 25 frame intervals. At 25 fps that is one second; at 50 fps it is half a second. The expression cannot discover the frame rate from the number 25. When transferring it, update the divisor or expose an FPS control matching the composition.
Decide the creative requirement first: should the title appear over 12 frames or 0.48 seconds? For the former, keep 12 when changing fps. For the latter, recalculate the frame duration. For long clocks and stopwatches, do not round 23.976 or 29.97 to 24 or 30; the discrepancy accumulates.
Why end minus start is not the frame count
0…100 contains 101 displayed frames and 100 intervals between them. To make progress exactly 0 on the first frame and 1 on the last, divide by 100. To calculate the duration of 101 frames at 25 fps, use 101/25=4.04 seconds. These are different questions, and each formula is correct for its purpose.
A one-frame range has zero intervals. math.max(1, end−start) prevents division by zero, but progress remains 0. This is deliberate behavior, not a way to display the final state automatically. Choose the state of a one-frame title separately.
| Range | Frames | Intervals |
|---|---|---|
| 0…100 | 101 | 100 |
| 1001…1101 | 101 | 100 |
| 20…20 | 1 | 0 |
Parameters and ranges
| Parameter | What it changes | Example / check |
|---|---|---|
| time | The requested evaluation time. | Not a real-time playback counter. |
| comp.RenderStart | Start of the render range. | Use it as local zero. |
| comp.RenderEnd | The final frame of the range. | Subtract the start for normalization. |
| fps | The frame rate specified in the formula. | At 25 fps, one turn takes 25 intervals. |
USE IN A COMPOSITION
Build it in Fusion
Transform1 → Angle
Solid lines are node connections in the Flow. A dashed line is a parameter dependency configured in the Inspector.
Connections by port and parameter3
Color is determined by the destination input. Dashed connections are configured in the Inspector; they do not add an RGBA wire to the Flow.
Assembly steps
- Use an asymmetric shape or word.
- Set the composition frame rate to 25 fps.
- Add the formula to Angle.
- Compare the start with the frame 25 frames later.
360 * (time - comp.RenderStart) / 25Expected result. One second produces a complete turn; the numeric angle continues increasing.
Checkpoints
| When / what to check | Expected | Why check it |
|---|---|---|
| 0 | Angle=0° | Starting orientation. |
| 6.25 | Angle=90° | A mathematical quarter-cycle; it may fall between whole frames. |
| 25 | Angle=360° | The orientation matches 0°, but the numeric value differs. |
| Start 1001, frame 1026 | Angle=360° | Moving the start does not move the phase. |
INTERACTIVE EXAMPLE
Change a parameter. Compare the result.
Rotation
Transform1 → AngleA linearly increasing angle. The graph shows complete revolutions; the Viewer shows the object's orientation.
Choose the start, middle and end of the range. Compare the number beneath the preview with its position on the graph.
360 * (time - comp.RenderStart) / 25Paste this into the specified parameter's Expression field. It is not Console code.
The formula runs in the browser; the preview shows its result on a teaching object. Fusion's image processing is not reproduced here.
Errors and troubleshooting
Speed changed after changing fps
A period in frames and a duration in seconds are different settings.
The animation does not start at zero
Check RenderStart, clip boundaries and the actual range instead of subtracting a guessed timeline frame number.
Independent exercise
How many frames are in 1001…1100, and what denominator produces progress from 0 to 1?
Show the solution and explanation
100 frames; the distance between the endpoints is 99. Divide by 99 to reach one on the last frame.
Continue learning
Official sources
An original educational walkthrough. The browser model explains the principle but does not run Fusion. Control placement depends on the version; save the original composition before replacing a parameter's control source.