ORBIT / SPIN EXPRESSION
DaVinci Resolve Fusion Expression: Create an Orbit or Spin Animation
Creating a smooth orbit or spin animation in DaVinci Resolve Fusion doesn't require complicated keyframes. With a simple Fusion Expression, you can control the center position, radius, speed, and timing of an object and make it travel in a perfect circular path.
EXPRESSION 2 — ORBIT / SPIN
Now I'm going to explain our 2nd expression — it's spin, like an orbit — and we're going to write this one together. So let's start. I'm inside my project, on the Transform node, and I want to write a multiline script. So remember what we use at the very start of an expression if we want to write a multiline one? A colon.
Start the Expression
:
Now for the orbit expression, we need five things: center X, center Y, radius, speed, and time. Let me show you how to write it.
After the colon, I'm going to start with local, and the first thing I want is center X. I want it to start from the center of the frame, which is 0.5. So the right way to write it is:
local centerX = 0.5
Same thing for the vertical center — same value, just Y this time:
local centerY = 0.5
Next, I need to tell it how wide the circle should be — that's the radius. I'll go with something small so it's not too big on screen:
local radius = 0.2
Now, how fast should it spin? That's speed. Let's go with 2 for now — we can always come back and nudge this later:
local speed = 2
And the last thing every expression needs — the clock. We call it t, and it's always the same line:
local t = time / 30
That's our whole settings list done — five lines, five dials, nothing animating yet.
Create the Circular Motion
Now for the actual motion. Remember, a circle is just two waves — one for X, one for Y — both reading off the same clock. So I'm going to return a Point, and inside it, for X: centerX + radius * math.cos(speed * t), and for Y: centerY + radius * math.sin(speed * t).
Now we're going to write X and Y together. And the way to do this is: write return Point, and open a bracket — (. Inside, first goes the X value, which is centerX + radius * math.cos(speed * t), and close that bracket. Now we write for Y — put a comma after X, then centerY + radius * math.sin(speed * t), and close the final bracket.
So altogether, it reads:
Complete Orbit Expression
:
local centerX = 0.5
local centerY = 0.5
local radius = 0.2
local speed = 2
local t = time / 30
return Point(centerX + radius * math.cos(speed * t), centerY + radius * math.sin(speed * t))
Watch the expression in action
And that's it. Hit enter, and — there it goes. A perfect little orbit, from five settings and one line of motion.
And that right there — that's the orbit expression in action. Three icons, three rings, one formula, just changed twice.
Customize the Orbit
The five settings give you control over the animation:
-
centerX — controls the horizontal center of the orbit.
-
centerY — controls the vertical center of the orbit.
-
radius — controls how large the circular path is.
-
speed — controls how quickly the object spins.
-
t — provides the time used to drive the animation.
Changing the radius makes the orbit wider or tighter, while changing the speed makes the movement faster or slower.
Final Result
Now look — if any part of what I just wrote lost you, that's completely fine. You don't need to understand every line to use this today. Every expression from this video — the drop and bounce, the orbit, all of it — is up on my website, in the article for this exact video. So even if you didn't follow the code, just head over there, copy the expression, paste it into your own project, and it'll work exactly like you saw here. Understanding it can come later. For now — just go grab it and start creating.