FUSION — EXPRESSIONS AND MODIFIERS Learning cookbook · videomontazher.com Save a copy before changing inputs. Check node names, fps and image dimensions. Examples have not been verified by native rendering in Resolve in the preparation environment. Your first expression: animate a parameter Main formula input: Transform1 → Size 1 + 0.1 * math.sin(2 * math.pi * (time - comp.RenderStart) / 60) Additional example: Understanding the formula 1 + 0.1 * math.sin(2 * math.pi * (time - comp.RenderStart) / 60) See the article for the correct place to use this formula. Expected result: The text grows and shrinks smoothly without changing position. Article: https://videomontazher.com/en/fusion/expressions/first-expression Syntax and types: Lua without confusion Main formula input: Merge1 → Blend math.min(1, math.max(0, (time - comp.RenderStart) / 30)) Additional example: Clamping a range math.min(1, math.max(0, (time - comp.RenderStart) / 30)) The laboratory supports only its listed numeric subset. It does not execute Lua scripts, strings or node references. Expected result: Blend reads 0, 0.5, 1 and 1: the title stays visible after appearing. Article: https://videomontazher.com/en/fusion/expressions/syntax Time, frames, fps and composition boundaries Main formula input: Transform1 → Angle 360 * (time - comp.RenderStart) / 25 Additional example: One turn per second 360 * (time - comp.RenderStart) / 25 See the article for the correct place to use this formula. Additional example: Inclusive boundaries math.min(1, math.max(0, (time - comp.RenderStart) / math.max(1, comp.RenderEnd - comp.RenderStart))) See the article for the correct place to use this formula. Expected result: One second produces a complete turn; the numeric angle continues increasing. Article: https://videomontazher.com/en/fusion/expressions/time Parameter links and Pick Whip Main formula input: Transform2 → Size Transform1.Size * 0.75 Additional example: Driver and driven input Transform1.Size * 0.75 See the article for the correct place to use this formula. Expected result: When the master Size is 1.2, the follower receives 0.9; the two elements retain independent positioning. Article: https://videomontazher.com/en/fusion/expressions/references Coordinates, Point and circular motion Main formula input: Transform1 → Center; 1920×1080 composition Point(0.5 + 160/1920 * math.cos(2 * math.pi * (time - comp.RenderStart) / 90), 0.5 + 160/1080 * math.sin(2 * math.pi * (time - comp.RenderStart) / 90)) Additional example: An orbit and independent rotation Point(0.5 + 160/1920 * math.cos(2 * math.pi * (time - comp.RenderStart) / 90), 0.5 + 160/1080 * math.sin(2 * math.pi * (time - comp.RenderStart) / 90)) See the article for the correct place to use this formula. Expected result: The object center follows a circle with a 160-pixel radius and a 90-frame period. Article: https://videomontazher.com/en/fusion/expressions/coordinates Sine waves: amplitude, period and phase Main formula input: Transform1 → Size 1 + 0.3 * math.sin(2 * math.pi * (time - comp.RenderStart) / 80) Additional example: Period and phase 1 + 0.3 * math.sin(2 * math.pi * (time - comp.RenderStart) / 80) See the article for the correct place to use this formula. Expected result: Reference values: 1, 1.3, 1, 0.7 and 1. Article: https://videomontazher.com/en/fusion/expressions/oscillation Conditions, ranges and timed switching Main formula input: Merge1 → Blend math.min(1, math.max(0, (time - comp.RenderStart - 30) / 20)) Additional example: Delay and gradual rise math.min(1, math.max(0, (time - comp.RenderStart - 30) / 20)) See the article for the correct place to use this formula. Expected result: Values: 0, 0, 0.5, 1, 1. The first visible increase occurs after the ramp starts. Article: https://videomontazher.com/en/fusion/expressions/conditions Easing: linear ramps and smoothstep Main formula input: Merge1 → Blend (math.min(1, math.max(0, (time-comp.RenderStart)/40)))^2 * (3 - 2 * math.min(1, math.max(0, (time-comp.RenderStart)/40))) Additional example: A complete 40-frame formula (math.min(1, math.max(0, (time-comp.RenderStart)/40)))^2 * (3 - 2 * math.min(1, math.max(0, (time-comp.RenderStart)/40))) See the article for the correct place to use this formula. Expected result: The transition starts and ends more gently than a linear ramp; the value holds before and after it. Article: https://videomontazher.com/en/fusion/expressions/easing Loops, ping-pong and stepped animation Main formula input: Merge1 → Blend 1 - math.abs(((time - comp.RenderStart) % 120) / 60 - 1) Additional example: There and back 1 - math.abs(((time - comp.RenderStart) % 120) / 60 - 1) See the article for the correct place to use this formula. Additional example: How many frames should repeat? math.floor((time - comp.RenderStart) / 10) % 4 See the article for the correct place to use this formula. Expected result: Values are 0, 0.5, 1, 0.5 and 0. The turning points are sharper than a sine wave. Article: https://videomontazher.com/en/fusion/expressions/loops Delay: read a value at another frame Main formula input: Transform2 → Angle Transform1:GetValue("Angle", time - 12) Additional example: GetValue with an explicit time Transform1:GetValue("Angle", time - 12) See the article for the correct place to use this formula. Additional example: What happens before the first key? Transform1:GetValue("Angle", math.max(comp.RenderStart, time - 12)) See the article for the correct place to use this formula. Expected result: The follower repeats the shape of the keyed animation twelve frames later. Article: https://videomontazher.com/en/fusion/expressions/delays Text, counters and formatting Main formula input: Text1 → Styled Text Text(string.format("%03d", math.floor(math.max(0, time - comp.RenderStart)))) Additional example: Frame and second counters Text(string.format("%03d", math.floor(math.max(0, time - comp.RenderStart)))) See the article for the correct place to use this formula. Expected result: The counter shows 000, 009 and 100. Values beyond 999 are not truncated because the format specifies a minimum width. Article: https://videomontazher.com/en/fusion/expressions/text-and-counters Custom controls and a controller node Main formula input: Transform1 → Size; controller node CTRL CTRL.Base + CTRL.Amp * math.sin(2 * math.pi * (time - comp.RenderStart) / math.max(1, CTRL.Period)) Additional example: Connect the dependency CTRL.Base + CTRL.Amp * math.sin(2 * math.pi * (time - comp.RenderStart) / math.max(1, CTRL.Period)) See the article for the correct place to use this formula. Expected result: Adjust the pulse through Inspector without editing the expression. Article: https://videomontazher.com/en/fusion/expressions/custom-controls Title duration and adaptive animation Main formula input: Merge1 → Blend or a separate Progress control math.min(1, math.max(0, (time-comp.RenderStart) / math.max(1, comp.RenderEnd-comp.RenderStart))) Additional example: Progress across the entire composition math.min(1, math.max(0, (time-comp.RenderStart) / math.max(1, comp.RenderEnd-comp.RenderStart))) See the article for the correct place to use this formula. Expected result: Progress reaches one on the final frame of each range. Article: https://videomontazher.com/en/fusion/expressions/retiming Debugging and robust expressions Main formula input: Transform1 → Size 1 + 0.1 * math.sin(2 * math.pi * (time-comp.RenderStart)/60) Expected result: The problem is narrowed to a specific input, reference or mathematical operation. Article: https://videomontazher.com/en/fusion/expressions/debugging Expression Modifier and Simple Expression Main formula input: Transform1 → Angle → Expression Modifier → Number Out n1 * n2 Additional example: Start with two numbers n1 * n2 See the article for the correct place to use this formula. Expected result: Angle receives 6°, then 8°. The modifier’s local inputs visibly control one numeric output. Article: https://videomontazher.com/en/fusion/modifiers/expression A breathing title without keyframes Main formula input: Transform1 → Size 1 + 0.05 * math.sin(2 * math.pi * (time-comp.RenderStart) / 75) Expected result: The title pulses smoothly around a scale of 1 while the background stays still. Article: https://videomontazher.com/en/fusion/recipes/breathing-title An object on a circular orbit Main formula input: Transform1 → Center Point(0.5 + 160/1920 * math.cos(2*math.pi*(time-comp.RenderStart)/90), 0.5 + 160/1080 * math.sin(2*math.pi*(time-comp.RenderStart)/90)) Expected result: A circle with a 160-pixel radius around the frame center; one complete orbit every 90 frames. Article: https://videomontazher.com/en/fusion/recipes/orbit A progress bar with a fixed left edge Main formula input: Rectangle1 → Width, then Center 0.6 * math.min(1, math.max(0, (time-comp.RenderStart)/100)) Additional example: Width 0.6 * math.min(1, math.max(0, (time-comp.RenderStart)/100)) See the article for the correct place to use this formula. Additional example: Compensating the center Point(0.2 + Rectangle1.Width/2, 0.5) See the article for the correct place to use this formula. Additional example: This requires two dependencies, not just one Point(0.2 + Rectangle1.Width/2, 0.5) Enter the second formula in Center on the same mask. Its name must be Rectangle1; Pick Whip can generate the reference after a rename. Expected result: The bar fills from left to right without moving its left edge. Article: https://videomontazher.com/en/fusion/recipes/progress-bar A ten-second countdown Main formula input: Text1 → Styled Text; 25 fps Text(string.format("%02d", math.max(0, 10 - math.floor(math.max(0, time-comp.RenderStart)/25)))) Expected result: The counter decreases once per second and never goes below zero. Article: https://videomontazher.com/en/fusion/recipes/countdown A cascade of three objects Main formula input: Transform2/Transform3 → Angle Transform1:GetValue("Angle", math.max(comp.RenderStart, time - 8)) Additional example: Source and dependencies Transform1:GetValue("Angle", time - 8) See the article for the correct place to use this formula. Additional example: Always reference the leading tool Transform1:GetValue("Angle", math.max(comp.RenderStart, time - 16)) The formula for Transform3's Angle. Transform2 uses an 8-frame delay. Expected result: Three objects repeat one animation with successive delays. Article: https://videomontazher.com/en/fusion/recipes/delayed-copies Organic motion over a base animation Main formula input: TransformDetail → Angle 1 * (0.7 * math.sin(2 * math.pi * (time-comp.RenderStart)/100) + 0.3 * math.sin(2 * math.pi * (time-comp.RenderStart)*2.37/100)) Additional example: A mathematical teaching model 0.7 * math.sin((time-comp.RenderStart)*0.13) + 0.3 * math.sin((time-comp.RenderStart)*0.31) See the article for the correct place to use this formula. Expected result: A small irregular wobble; the formula gives the same result at the same time. Article: https://videomontazher.com/en/fusion/recipes/organic-motion