Get 30+ hr of DaVinci Resolve courses & 200+ pre-made assets

As little as $15/month for all courses and pre-made assets

When building out animations especially complex animations it’s great to avoid making hundreds of keyframes when possible and that’s where Fusion Expressions come in. In fusion we’re going to be focused on building the Fusion expressions in a coding language called LUA. Think of this lua code as a way to tell each of the node inputs what to do for each frame very similar to keyframes.

Inputting expressions

Right clicking on any node input will give you a drop down in this list you will see the option for expressions.

Inside this expressions box you can use lua, math equations, or point to other Fusion input values of a similar type.

add fusion expressions

Getting values from another nodes.

For most values you’re going to first have the notes name followed by a period and the inputs name. When working with multi-value inputs such as X Y inputs this changes slightly.

For an example let’s use a rectangle mask. The name of this rectangle mask node is going to be Rectangle1.

If we wanted to use the width input for an expression we would write out


But if we wanted to use the Y value from the rectangle mask we would need to write out the expression slightly differently since this input has two values.

rectangle mask node in fusion

Fusion expressions math library

Absolute value of xabs(x)
Arc cosine of x in radiansacos(x)
Arc sine of x in radiansasin(x)
Arc tangent of x in radiansatan(x)
Arc tangent of a/b (in radians), but uses the signs of both parameters to find the quadrant of the result. (It also handles correctly the case of b being zero.)atan2(a, b)
Smallest integer(whole number) larger than or equal to xceil(x)
Cosine of x assumed to be in radianscos(x)
Hyperbolic cosine of xcosh(x)
Angle x (given in radians) in degreesdeg(x)
The value e power xexp(x)
Largest integer smaller than or equal to xfloor(x)
Remainder of the division of x by y that rounds the quotient towards zero.fmod (a, b)
m and e such that x = m2e, e is an integer and the absolute value of m is in the range [0.5, 1) (or zero when x is zero)frexp(x)
a2b – b should be an integerldexp (a, b)
The natural logarithm of xlog(x)
The base-10 logarithm of xlog10(x)
The maximum value among its argumentsmax(a, b)
The minimum value among its argumentsmin(a, b)
The minimum value among its argumentsmin(a, b)
Value of pipi
Value of the base(a) to the exponent(b) powerpow(a, b)
The angle x (given in degrees) in radiansrad (x)
The sine of x assumed to be in radianssin(x)
The hyperbolic sine of xsinh(x)
The square root of xsqrt(x)
The tangent of x assumed to be in radianstan(x)
The hyperbolic tangent of xtanh(x)

Fusion Expressions Shorthand

Fusion composition start and end


Explanation return the starting frame number or end frame number

Current frame number


Explanation time in fusion is counted in frame number

if-then else

iif(Merge1.Blend == 0, 0, 1)

Explanation if Merge1 Blend value equals 0 then return a 0 else return a 1

Point is for two values for a XY location

Point(value1, value2)

Explanation Create a location on screen with X(value1) and Y(value2)


Justin Robinson

Justin Robinson is a DaVinci Resolve & Fusion instructor who is known for simplifying concepts and techniques for anyone looking to learn any aspect of the video post-production workflow. Justin is the founder of JayAreTV, a training and premade asset website offering affordable and accessible video post-production education. You can follow Justin on Twitter at @JayAreTV YouTube at JayAreTV or Facebook at MrJayAreTV

Get 30+ hr of DaVinci Resolve courses & 200+ pre-made assets

As little as $15/month for all courses and pre-made assets

Similar Posts

Leave a Reply

Your email address will not be published.