After this lesson
- Enable Expression on a numeric parameter.
- Identify the base, amplitude, period and local time in a formula.
- Distinguish a calculation error from incorrect image wiring.
Before you start
- Composition
- A separate Fusion Composition. 1920×1080, square pixels, 25 fps.
- Parameter
- Transform1 → Size
- Range
- Start at comp.RenderStart. Reference frames are local unless stated otherwise.
An expression calculates an input value for each requested time. Instead of repeating dozens of keys, you define a relationship: for example, scale follows a sine wave. Expressions do not replace every kind of animation; precise poses and hand-directed timing are often easier to keep as keyframes.
Enabling an expression and choosing its output type
Select the node, locate the input in Inspector, right-click the parameter label and choose Expression. An expression field appears beneath the parameter. Enter a constant number first to separate input setup from formula errors.
A numeric Size input expects a number, Center expects a point, and Styled Text expects text. The same formula will not necessarily work in every field. Evaluating arithmetic once in a normal numeric field and assigning a persistent Expression are different operations.
Understanding the formula
1 is the base scale. 0.1 is the amplitude, giving a range of 0.9–1.1. 60 is the period in frames. Subtracting comp.RenderStart anchors the phase to the beginning of the current composition range.
math.sin takes an angle in radians; 2 * math.pi is one full turn. At 25 fps, a 60-frame cycle lasts 2.4 seconds. Changing the frame rate changes that duration.
1 + 0.1 * math.sin(2 * math.pi * (time - comp.RenderStart) / 60)Verify instead of guessing
Move to local frames 0, 15, 30, 45 and 60 relative to RenderStart. Expected Size values are 1, 1.1, 1, 0.9 and 1. Check both Inspector and the final MediaOut, not just an intermediate node.
Save a copy of the composition before replacing an animated input. Removing an expression is not a universal way to recover the previous curve: preserve the keys or the original tool separately.
Two independent flows in one composition
In the Flow graph, Text+ sends an image to Transform, and Transform sends it to MediaOut. This is the pixel flow. The expression on Size does not carry an image: for each requested frame, it returns one number that Transform uses as scale. Enabling Expression without adding a new node is normal.
Before entering a formula, set Size manually to 0.8 and 1.2. If the image does not change, the graph or Viewer already has a problem. Check which tool is displayed and make sure Transform follows Text+ rather than sitting on another branch. This quick check separates the mathematics from graph wiring.
What controls Size now?
After an expression is assigned, Size is no longer an independent manual value. Dragging the original numeric field does not adjust the base scale in the formula: change the constant 1 or expose it as a control. Likewise, previous Size keyframes should not be assumed to add themselves to the expression result.
To combine authored animation with a procedural effect, use two consecutive Transform nodes: the first holds the keys, and the second adds a small pulse. Changing one source then preserves the other. However, their scales multiply: Size 1.2 followed by Size 1.1 produces an overall scale of 1.32, not 1.3.
Parameters and ranges
| Parameter | What it changes | Example / check |
|---|---|---|
| 1 | The average scale around which the animation moves. | With amplitude 0.1, the limits are 0.9 and 1.1. |
| 0.1 | Amplitude, not the full peak-to-peak range. | The difference between maximum and minimum is 0.2. |
| 60 | The number of frame intervals in a complete cycle. | At 25 fps, a cycle lasts 2.4 s. |
| time − comp.RenderStart | Local time relative to the beginning of the range. | When the composition starts at 1001, local zero is frame 1001. |
USE IN A COMPOSITION
Build it in Fusion
Transform1 → Size
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.
The expression calculates the input value. Transform still performs the pixel processing.
Assembly steps
- Create a Fusion Composition at least 61 frames long and open Fusion. Note the starting frame of its range.
- Add Text+ with the text FUSION and place a Transform between Text+ and MediaOut. Name it Transform1.
- Display Transform1 in the Viewer. Manually test Size=0.8 and Size=1.2, then return it to 1.
- Right-click the Size label → Expression. Paste the formula into the new field and confirm.
- Visit local frames 0, 15, 30, 45 and 60. Compare Size with the table below.
- Change only 60 to 30: the cycle should become twice as fast while its limits remain 0.9…1.1.
1 + 0.1 * math.sin(2 * math.pi * (time - comp.RenderStart) / 60)Expected result. The text grows and shrinks smoothly without changing position.
Checkpoints
| When / what to check | Expected | Why check it |
|---|---|---|
| 0 | 1.0 | sin(0)=0. |
| 15 | 1.1 | The first quarter of the cycle. |
| 30 | 1.0 | The middle of the cycle. |
| 45 | 0.9 | Minimum. |
| 60 | 1.0 | Return to the starting point. |
INTERACTIVE EXAMPLE
Change a parameter. Compare the result.
Pulse
Transform1 → SizeMotion
in the details.
Size varies around a base value. Amplitude sets the maximum deviation; period determines the speed.
Set amplitude to 0: the size stops changing. Halve the period: cycles occur twice as often.
1 + 0.1 * math.sin(2 * math.pi * (time - comp.RenderStart) / 60)Paste 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
Nothing changes
Make sure the formula is in the Expression field and the Viewer displays the Transform output.
Scale unexpectedly becomes negative
Keep amplitude below the base value unless negative scale is intentional.
Independent exercise
Produce a range of 0.8–1.2 with a period of 90 frames.
Show the solution and explanation
Use base 1, amplitude 0.2 and period denominator 90. Check the minimum and maximum, not just the first 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.