COUNTING NUMBER EXPRESSION
DaVinci Resolve Fusion Expression: How to Create a Counting Number
Creating an animated counting number in DaVinci Resolve Fusion doesn't have to mean manually keyframing every number. With a simple Fusion Expression, you can make a number automatically count from a starting value to your desired ending value over a specific amount of time.
EXPRESSION 3 — COUNTING NUMBER
Let's say you wanna show a counting number — here's an expression for you.
Copy the Expression
:
local startVal = 0
local endVal = 2000
local duration = 5
local t = math.min(time / 30 / duration, 1)
local current = math.floor(startVal + (endVal - startVal) * t)
return "$".. current
Colon to start our multiline script. And all the locals are just your parameters — like a keyframe, but as a number. Put any value you want — let's say you want it to count up to 2000, type 2000 for endVal. For duration, that's how many seconds it takes to count up — let's say 5 seconds.
Paste it in, hit play, and there it is — counting from zero, straight up to your number, in exactly the time you set.
How to Customize It
The expression gives you a few simple values to control the animation:
-
startVal — the number where the counter begins.
-
endVal — the number where the counter finishes.
-
duration — how many seconds the counting animation takes.
For example, if you want the counter to finish at 5,000, simply change the endVal value to 5000. If you want the animation to take 10 seconds, change duration to 10.
This makes the expression useful for animated statistics, numbers, views, followers, prices, scores, and other motion-graphics elements in DaVinci Resolve Fusion.
Final Result
With this Fusion Expression, you can create a smooth counting-number animation without manually creating a keyframe for every number. Set your starting value, ending value, and duration, paste the expression into Fusion, and let DaVinci Resolve handle the counting automatically.
It’s a simple but useful technique for adding dynamic number animations to your DaVinci Resolve projects.