Skip to content
VIDEOMONTAZHERDAVINCI RESOLVE · VIDEO · AI

FUSION · Expressions

Sine waves: amplitude, period and phase

Control pulses, swaying and periodic motion deliberately instead of guessing random numbers.

Fusion / DaVinci Resolve 20–21

After this lesson

  • Adjust the range and tempo independently.
  • Offset the phase of several objects.
  • Check the join in a periodic animation.

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.

A simple pulse can be separated into base, amplitude, period and phase. These let you design the movement rather than tune a formula by eye.

Base and amplitude define the range

For a range from L to H, the base is (L+H)/2 and amplitude is (H-L)/2. Sine returns −1 to 1. Multiplying by amplitude and adding the base moves that output into the desired range.

For example, 0.7…1.3 uses base 1 and amplitude 0.3. Blend 0.2…0.8 uses base 0.5 and amplitude 0.3. Check the range before copying a scale expression to opacity.

Period and phase

A denominator P means one cycle per P frames. Increasing P slows the animation. Shift phase through time inside the sine: time - start - delay. A positive delay makes a follower repeat the phase later.

SIMPLE EXPRESSION · FUSION
1 + 0.3 * math.sin(2 * math.pi * (time - comp.RenderStart) / 80)

Starting at the maximum and making seamless loops

Sine starts at the middle of its range and rises; cosine starts at the maximum. Choose the start for the task instead of adding arbitrary keys on top of the formula.

For a seamless loop, export an exact whole number of periods. Including both the first sample and its identical final sample adds a duplicate frame and can cause a subtle pause.

Phase shifts and time shifts

Phase is the position inside a cycle. Adding π/2 to the argument of sin starts at the maximum. Subtracting a delay d from local time shifts the cycle right by d frames. For four objects with period 80, use delays 0, 20, 40 and 60 to distribute the motion across quarters.

Do not confuse phase with the base. Adding 0.2 outside sin raises the entire range without moving the peak time. Multiplying the whole sum by 2 changes both amplitude and base. Keep the parameters separate so a speed adjustment does not change size.

Preparing a cycle for repetition

A period of 80 makes local times 0 and 80 equal. A looping sequence typically uses frames 0…79 to avoid repeating a state at the join. Exporting 0…80 includes both endpoints and adds an extra hold when concatenated.

Matching values is only the first check. A smooth loop must also match the rate of change. A sine wave does so across whole periods; an arbitrary segment of keyed animation may not. Watch the join repeatedly, especially when the wave controls the position of a large, high-contrast object rather than Size.

Parameters and ranges

ParameterWhat it changesExample / check
Base 1Average value.With amplitude 0.3, the limits are 0.7…1.3.
Amplitude 0.3Maximum deviation from the base.The full peak-to-peak range is 0.6.
Period 80Repeats every 80 intervals.3.2 s at 25 fps.
PhaseOffset within a period.Replacing sin with cos starts at the maximum.

USE IN A COMPOSITION

Build it in Fusion

Transform1 → Size

FUSION / FLOWNodes and parameter control
100%
ImageControl in the InspectorScroll or drag the graph. Choose “Fit” to see all of it.
Solid lines are node connections in the Flow. A dashed line is a parameter dependency configured in the Inspector. A solid arrow's color matches its destination input. Modifiers are shown separately from the Flow.control.Value → Transform1.SizeText1.Output → Transform1.InputTransform1.Output → MediaOut1.InputBase + Amp × sin · Expression · InspectorEXPRESSIONBase + Amp × sinSimple ExpressionText1 · Image node · FlowT+Text1Text+Transform1 · Image node · FlowƒTransform1TransformSizeSize · an Inspector parameter, not an image portMediaOut1 · Image node · Flow↗MediaOut1MediaOut
Parameter · InspectorImage
Select a node or a colored arrow

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

  1. Set up a basic title composition.
  2. Enter the expression in Size.
  3. Check local frames 0, 20, 40, 60 and 80.
  4. Replace sin with cos to start at the maximum.
SIMPLE EXPRESSION · FUSION
1 + 0.3 * math.sin(2 * math.pi * (time - comp.RenderStart) / 80)

Expected result. Reference values: 1, 1.3, 1, 0.7 and 1.

Checkpoints

When / what to checkExpectedWhy check it
01.0Starts at the average value.
201.3Maximum.
401.0Crosses the average while descending.
600.7Minimum.
801.0End of the period.

INTERACTIVE EXAMPLE

Change a parameter. Compare the result.

INTERACTIVE EXAMPLE

Pulse

CONTROLLED INPUTTransform1 → Size
VIEWER · FORMULA EVALUATIONPREVIEW
VIDEOMONTAZHER / FUSION

Motion
in the details.

TEACHING VIEWER0040 f
0 f← → one frame at a time25 fps
VALUE GRAPH
Value
0.6311.370 f80 f160 f
Select a point on the graph to go to that frame. Values are checked throughout the range.

Size varies around a base value. Amplitude sets the maximum deviation; period determines the speed.

VALUE AT THIS FRAME 401
CHECK THE DEPENDENCY

Set amplitude to 0: the size stops changing. Halve the period: cycles occur twice as often.

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 motion is too fast

Increase the period first rather than reducing amplitude: they control different properties.

The clip pauses slightly at the join

Check the exported sample count and whether the final period sample is duplicated.

Independent exercise

Find the base and amplitude for Blend from 0.15 to 0.65.

Show the solution and explanation

Base 0.4, amplitude 0.25. For period 100: 0.4 + 0.25 * math.sin(2 * math.pi * (time-comp.RenderStart) / 100).

Continue learning

Official sources

Blackmagic Design · Fusion Reference ManualThe chapter “Using Modifiers, Expressions, and Custom Controls”. Page numbers depend on the PDF edition.
Blackmagic Design · Modifiers referenceThe Modifiers section. Available commands depend on the input type and Fusion version.

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.