After this lesson
- Keep the left edge of a growing bar fixed.
- Link two parameters on one mask without creating a cycle.
- Check the start and end of the fill.
Before you start
- Composition
- A separate Fusion Composition. 1920×1080, square pixels, 25 fps.
- Parameter
- Rectangle1 → Width, then Center
- Range
- Start at comp.RenderStart. Reference frames are local unless stated otherwise.
Rectangle defines its width relative to its center. Changing only Width makes the bar grow in both directions. To keep the left edge fixed, Center must move by half the current width.
Graph
The fill and track use two separate mask branches. Connect Rectangle1 to BackgroundFill's blue Effect Mask input; connect the static RectangleTrack to BackgroundTrack's blue Effect Mask input. BackgroundTrack's output goes to MergeTrack's yellow Background input, and BackgroundFill goes to its green Foreground input.
Composite the resulting bar over the main Background1 using Merge1: connect Background1 to the yellow input and MergeTrack to the green input. Connect Merge1 to MediaOut1. The target bar spans X=0.2 to X=0.8, giving a maximum width of 0.6. Both masks have Height=0.04; the top and bottom edges are not animated.
Width
For Width, enter a clamped ramp multiplied by 0.6. The value reaches its maximum after 100 frames and stays there.
0.6 * math.min(1, math.max(0, (time-comp.RenderStart)/100))Compensating the center
Use the expression below for Center. The left edge is centerX-width/2, which is always 0.2. Do not link Width back to Center: that would create a cycle.
Point(0.2 + Rectangle1.Width/2, 0.5)Checkpoints
Local frame 0: Width=0, so the fill is invisible. Frame 50: Width=0.3 and Center.X=0.35. Frame 100: Width=0.6 and Center.X=0.5. In all three cases, the left edge stays at 0.2.
This requires two dependencies, not just one
A rectangle mask expands around its Center. A Width formula alone makes the bar grow in both directions. For rightward growth only, set Center.X = L + Width/2, where L is the fixed left edge. Center.X−Width/2 then always equals L, regardless of progress.
Use L=0.2 and a maximum width of 0.6: the complete bar spans X=0.2 to X=0.8. Halfway through the duration, Width=0.3 and Center.X=0.35. Do not link Width back to Center: that would create a circular dependency. The dependency graph runs in one direction: time → Width → Center.
Point(0.2 + Rectangle1.Width/2, 0.5)The track, rounded corners and 100%
For a stationary track, create a separate RectangleTrack with Width=0.6, Height=0.04 and Center=(0.5,0.5). Connect it to the blue Effect Mask input of a darker BackgroundTrack. Use MergeTrack to place the track under BackgroundFill: the yellow Background input receives the track, and the green Foreground input receives the fill. Do not use the same animated mask for both Background nodes, or both parts will grow.
At zero width, the mask result may be practically invisible, as intended. Soft Edge, Border Width and pronounced rounding affect the apparent edge, so first check the geometry without them. If you need a percentage counter, derive it from the same clamped progress rather than independent time with a different denominator. After 100 frames, the width holds instead of continuing to grow.
Parameters and ranges
| Parameter | What it changes | Example / check |
|---|---|---|
| L=0.2 | The fixed left edge. | Center.X − Width/2 = 0.2. |
| 0.6 | Maximum normalized width. | 1152 pixels in Full HD. |
| 100 | Fill duration in frame intervals. | Frame 100 is the first exact 100% state. |
| Height=0.04 | Mask height. | Approximately 43 pixels at 1080p. |
| RectangleTrack | The stationary track mask beneath the fill. | Width=0.6; Height=0.04; Center=(0.5,0.5); no animation. |
USE IN A COMPOSITION
Build it: from an empty composition to verification
Rectangle1 → Width, then Center
Solid lines are node connections in the Flow. A dashed line is a parameter dependency configured in the Inspector.
Connections by port and parameter8
Color is determined by the destination input. Dashed connections are configured in the Inspector; they do not add an RGBA wire to the Flow.
One driving value controls both the width and the compensating offset.
Assembly steps
- Create a 1920×1080 Fusion Composition with square pixels at 25 fps. Leave at least 151 frames for checking: local range 0…150.
- Add BackgroundFill and Rectangle1, keeping these names. Connect Rectangle1's output to BackgroundFill's blue Effect Mask input. Choose the fill color on BackgroundFill and set Alpha=1.
- On Rectangle1, set Height=0.04, Soft Edge=0 and Corner Radius=0, and enable Solid. Start with Width=0.6 and Center=(0.5,0.5) so you can check the bar's shape in the Viewer before animating it.
- Enable Expression on Width and paste the formula beneath the assembly steps. Then enable Expression on Center and enter the formula from “Compensating the center”: Point(0.2 + Rectangle1.Width/2, 0.5). The reference must point to this same Rectangle1.
- Create separate RectangleTrack and BackgroundTrack nodes. Set the track mask to Width=0.6, Height=0.04, Center=(0.5,0.5), Soft Edge=0 and Corner Radius=0, with Solid enabled. Connect it to BackgroundTrack's blue Effect Mask input, choose a darker color, and set Alpha=1. This mask must have no keyframes or expressions.
- Add MergeTrack: connect BackgroundTrack to the yellow Background input and BackgroundFill to the green Foreground input. The fill now sits over the stationary track.
- Add the main Background1 and final Merge1. Connect Background1 to Merge1's yellow Background input and MergeTrack's output to its green Foreground input. Connect Merge1 to MediaOut1 and display the result in the Viewer.
- Check local frames 0, 50, 100 and 150. At zero, only the track is visible; at 50, the bar is half full; from 100 onward, the fill reaches the end. At every frame, Rectangle1's Center.X−Width/2 must equal 0.2.
- Add rounding and smoothing only after checking the geometry. Check the edge again: styling must not conceal a change in its actual position.
0.6 * math.min(1, math.max(0, (time-comp.RenderStart)/100))Expected result. The bar fills from left to right without moving its left edge.
Checkpoints
| When / what to check | Expected | Why check it |
|---|---|---|
| 0 | Width=0; Center.X=0.2 | There is no fill, but the stationary track remains visible. |
| 50 | Width=0.3; Center.X=0.35 | Half full. |
| 100 | Width=0.6; Center.X=0.5 | Full length. |
| 150 | The same values as at frame 100 | The upper clamp is active. |
INTERACTIVE EXAMPLE
Change a parameter. Compare the result.
Progress bar
Rectangle1 → Width + CenterEvery frame
in its place.
Width grows while Center compensates for half the change. The left edge stays at x = 0.2.
Move past the transition end. The value should hold rather than keep increasing.
0.6 * math.min(1, math.max(0, (time - comp.RenderStart) / 100))Maximum width is 0.6 of the image width.
Point(0.2 + Rectangle1.Width/2, 0.5)Your mask must be named Rectangle1. The left edge stays at 0.2.
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
The bar grows from the center
The compensating Center formula has not been added.
The dependency is circular
Width depends only on time; Center reads Width, but not the other way around.
The track grows with the fill
Check BackgroundTrack's blue connection: it needs a separate, static RectangleTrack. The animated Rectangle1 must control only BackgroundFill.
Independent exercise
The left edge is 0.1 and the maximum width is 0.8. How should the formulas change?
Show the solution and explanation
Use a multiplier of 0.8 for Width and a base of 0.1 for Center: Point(0.1 + Rectangle1.Width/2, 0.5).
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.