After this lesson
- Distinguish the two expression mechanisms.
- Set up the modifier’s named numeric inputs.
- Check before transferring Console syntax.
Before you start
- Composition
- A separate Fusion Composition. 1920×1080, square pixels, 25 fps.
- Parameter
- Transform1 → Angle → Expression Modifier → Number Out
- Range
- Start at comp.RenderStart. Reference frames are local unless stated otherwise.
Expression on an input creates a Simple Expression. Modify With → Expression creates a modifier with its own numeric/positional inputs and outputs. Check before moving code between the two modes.
Why use a separate modifier?
Expression Modifier exposes source values in its own controls and uses mathematical expressions for its outputs. This helps when a clear group of inputs drives several dependent results.
The modifier’s expressions belong to its own mathematical system. Do not assume Lua strings, node methods or composition objects transfer from Simple Expressions merely because the name matches.
Start with two numbers
Connect the modifier to a numeric input. Set its first two numeric controls to 2 and 3, then enter n1*n2 in the corresponding numeric output. The result should be 6. Check control names and locations against the manual for your version.
n1 * n2Choose the simplest method
One reference and a multiplier are usually clearer as Simple Expression. A modifier helps with a group of explicit inputs. Complex per-pixel processing needs Custom Tool, which is a different task.
Before transferring trigonometry, check the units and available functions for that mode. This section’s Simple Expression examples use radians with math.sin.
Matching names do not mean matching environments
Simple Expression is a short expression directly on a node input. Expression Modifier is a separate source with its own numeric and other inputs, a Modifiers tab and output fields. It has local names such as n1 and n2. CTRL.Amp from Simple Expression does not automatically become local n1; assign the input first.
Start with an operation whose meaning is independent of syntax details: n1*n2. Once input wiring and result reading are clear, use that modifier’s manual for more complex formulas. Console Lua/Python scripts, Simple Expression and Expression Modifier are not one universal execution field.
When a separate panel helps
A modifier helps keep several input quantities together with clear labels. Connect sources to Number In one at a time and check each contribution. A separate panel may be excessive for Size*0.75 but makes multi-input setups clearer.
Do not initially test a result of 6 on Size: the object becomes enormous and may seem broken. Test 2×3 on Angle or a separate numeric control, then use 1.2 and 0.75 for Size. Choose a test for the consumer’s range as well as the formula.
Parameters and ranges
| Parameter | What it changes | Example / check |
|---|---|---|
| Number In 1 / n1 | First local numeric input. | 2 in the diagnostic test. |
| Number In 2 / n2 | Second local numeric input. | 3. |
| Number Out | The numeric-result expression. | n1*n2 → 6. |
| Node input | Consumer of the result. | Angle is convenient for testing instead of an enormous Size. |
USE IN A COMPOSITION
Build it in Fusion
Transform1 → Angle → Expression Modifier → Number Out
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
- Create a clean Transform. Use Angle for the first test.
- Right-click Angle → Modify With → Expression.
- Open Modifiers. Set Number In 1=2 and Number In 2=3.
- Enter n1*n2 in Number Out. Verify Angle=6°.
- Change only the second input to 4: the result should become 8°.
- For Size, create a separate modifier with 1.2 and 0.75 rather than copying the diagnostic scale of 6.
n1 * n2Expected result. Angle receives 6°, then 8°. The modifier’s local inputs visibly control one numeric output.
Checkpoints
| When / what to check | Expected | Why check it |
|---|---|---|
| n1=2, n2=3 | 6 | Checks the internal formula. |
| n1=1.2, n2=0.75 | 0.9 | A useful scale factor. |
| Only n2 changes | The result is proportional to n2 | No hidden connection to another input. |
INTERACTIVE EXAMPLE
Change a parameter. Compare the result.
Expression: two inputs, one result
Transform1 → AngleNumber Out calculates n1 × n2. Change one input and check the angle in degrees.
Initial n1 = 2 and n2 = 3 give 6°. Set n2 = 4 to get 8°.
A demonstration of the arithmetic output. Time offsets, expressions on inputs and pixel processing are not reproduced here.
Errors and troubleshooting
n1 is unknown in a normal Expression
n1 belongs to the modifier context, not every Fusion field.
A Lua example is rejected
Check which of the two mechanisms you are using.
Independent exercise
A parameter only needs Transform1.Size*0.5. Is Expression Modifier required?
Show the solution and explanation
No. A Simple Expression directly on the driven input is usually easier; a separate modifier helps when its own inputs and structure are useful.
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.