After this lesson
- Build a clear template interface.
- Distinguish a control label from its internal ID.
- Check input boundaries and dependencies.
Before you start
- Composition
- A separate Fusion Composition. 1920×1080, square pixels, 25 fps.
- Parameter
- Transform1 → Size; controller node CTRL
- Range
- Start at comp.RenderStart. Reference frames are local unless stated otherwise.
A good template lets you change creative parameters without editing code. Expose the base, amplitude and period as separate controls, keeping expressions inside the composition.
Create real inputs
Select a controller tool, rename it CTRL and add numeric controls through Edit Controls. Set their internal IDs to Base, Amp and Period. A label and an ID are different: expressions use the ID.
CTRL, Base, Amp and Period are not built-in Fusion names in this example. Create them yourself. Give the period a sensible range and a positive default.
Connect the dependency
Once the inputs exist, the formula reads settings from one location. Additional denominator protection keeps it evaluable when Period is zero.
CTRL.Base + CTRL.Amp * math.sin(2 * math.pi * (time - comp.RenderStart) / math.max(1, CTRL.Period))The template contract
Label the units: period in frames or seconds, amplitude in fractions or pixels. A slider limit does not replace formula validation because values may arrive through a link.
When packaging a Macro, expose only necessary settings. Test two independent title instances: changing one should not change the other unless a shared controller is intentional.
Create three inputs, not just the CTRL name
Add a separate Custom Tool and rename it CTRL. In Edit Controls, create numeric controls with IDs Base, Amp and Period; their visible labels can use any language. Set their starting values to 1, 0.1 and 60. Generate a reference to each through Pick Whip and confirm that its ID matches the formula.
Renaming a tool CTRL does not create Base, Amp or Period inputs. A quick alternative prototype uses the existing Number In controls of Custom Tool, but its formula must then reference their actual identifiers. Do not mix the two approaches in one setup.
Ranges are part of template design
For this scale exercise, set Base to 0.1–2, Amp to 0–0.5 and Period to 1–300. Interface limits help the user; math.max(1, CTRL.Period) remains a second layer inside the formula. If Amp exceeds Base, the minimum becomes negative, which may not be meaningful for scale and needs a deliberate decision.
Expose only relevant settings. Amplitude in percent differs from amplitude as a factor: percent requires division by 100. Do not substitute a technical ID for a helpful label. When saving a macro, check separately which controls are actually available to users in Edit.
Parameters and ranges
| Parameter | What it changes | Example / check |
|---|---|---|
| Base | Average size. | Defaults to 1. |
| Amp | Size deviation. | 0.1 means ±10% of unit scale, not ±10% of an arbitrary Base. |
| Period | Period in frames, minimum 1. | 60 at 25 fps = 2.4 s. |
| CTRL | Controller tool name. | Its internal inputs must be created separately. |
USE IN A COMPOSITION
Build it in Fusion
Transform1 → Size; controller node CTRL
Solid lines are node connections in the Flow. A dashed line is a parameter dependency configured in the Inspector.
Connections by port and parameter4
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 controller changes control data without adding unnecessary image processing.
Assembly steps
- Create Custom Tool and name it CTRL. It serves as a controller; do not connect its image output into the final image branch.
- Open Edit Controls and add three numeric inputs with internal IDs Base, Amp and Period.
- Set values to 1, 0.1 and 60 with sensible ranges. Localize labels if desired, but keep the IDs as written in the formula.
- Create Text+→Transform→MediaOut. Enable Expression on Transform Size.
- Paste the formula and check CTRL references through Pick Whip.
- Set Amp to 0, then 0.1; change Period from 60 to 30. The size range should remain unchanged while the tempo doubles.
CTRL.Base + CTRL.Amp * math.sin(2 * math.pi * (time - comp.RenderStart) / math.max(1, CTRL.Period))Expected result. Adjust the pulse through Inspector without editing the expression.
Checkpoints
| When / what to check | Expected | Why check it |
|---|---|---|
| Base=1, Amp=0 | Constant Size=1 | Checks the base signal. |
| Base=1, Amp=0.1 | 0.9…1.1 | Working range. |
| Period=0 entered manually | No division by zero; period clamped to 1 | Checks the protective contract. |
| Renaming / copying | All followers still read the intended CTRL | Checks portability. |
INTERACTIVE EXAMPLE
Change a parameter. Compare the result.
Set up the CTRL controller
Transform1 → Sizeunder control.CTRL → SIZE
Base, amplitude and period are separate controls. Change them while retaining one formula that references CTRL.
Base=1, Amp=0.1 and Period=60 give a range of 0.9…1.1. At Amp=0, size is constant; at Period=30, the movement is twice as fast.
Formula for the current settings +
CTRL.Base + CTRL.Amp * math.sin(2 * math.pi * (time - comp.RenderStart) / math.max(1, CTRL.Period))In the CTRL node's Inspector: Base = 1, Amp = 0.1, Period = 60. IDs are case-sensitive.
In Fusion, create a Custom Tool named CTRL with numeric IDs Base, Amp and Period. Their values are shown here; the browser does not create a node in Resolve.
Errors and troubleshooting
CTRL.Amp was not found
Create a custom input with that ID, not just the visible label Amp.
Both titles respond to one controller
Check reference scope after duplication and Macro export.
Independent exercise
Which three settings are enough for a user to control cyclical Angle swaying?
Show the solution and explanation
Base angle, amplitude in degrees and period with explicit units. Add phase if needed; do not expose every internal technical input.
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.