Page 1 of 1

How to Spin Image

PostPosted: Tue Jan 05, 2021 9:31 pm
by purplemagic
How do you spin an image clip at a fixed rate regardless of its duration?

Say you want to rotate an image clip at 360 degrees per second.

One obvious solution is to set the duration of the image clip to one second, create a keyframe at the end with a Rotation Angle of 360, and copy-and-paste the clip for the duration you want. But it is cumbersome and more importantly, not reusable.

Any suggestion?

Re: How to Spin Image

PostPosted: Wed Jan 06, 2021 9:26 am
by G0bble
I am looking for the same as I want to spin-up and out an image to its Google Earth Location from high up ... without setting-up 360 keyframes ... :roll:

Re: How to Spin Image

PostPosted: Wed Jan 06, 2021 10:16 am
by panos_mts
You can do it in fusion by using expressions.

1. Go to the fusion page and add a transform node.
2. Go to the inspector, right click on the angle parameter -> Expression
3. Paste the following expression: (time*360)/comp:GetPrefs().Comp.FrameFormat.Rate

This will rotate the image 360 degrees per second, if you want to spin in the opposite direction, add 0- at the beggining of the expression

Re: How to Spin Image

PostPosted: Wed Jan 06, 2021 2:34 pm
by wfolta
The expression approach is great, and probably would be my first choice. But I recently learned another way to do this, which might be more general in one sense but less powerful in another...

1. Go into Fusion and add a Transform node, as with the expression solution.

2. Go to the start of the clip and click on the diamond next to Angle to set a keyframe at 0 degrees rotation. (The diamond turns red, indicating a keyframe.)

3. Move to one second and click on the diamond (it turns red) and then type in 360 for the angle.

4. Open the Spline window by clicking on Spline in the upper right of Resolve.

5. In the Spline window check the Transform1 Angle box to display that spline. To see the whole curve, click the expand icon (top right of the Spline window area, that has the two arrows).

6. Right click on the window and you'll see a huge list of possibilities, but about 2/3 of the way down the list is "Set Loop >", which displays a submenu when you're over it, where you can choose "Loop".

The animation you've done up to this point is now looped indefinitely.

As I mentioned, in one sense this is less powerful -- and took more steps -- than the expression. On the other hand, you can do this with any key framing you do for any attribute. Just an alternative way to do it, if that fits the problem and your thinking.

Re: How to Spin Image

PostPosted: Wed Jan 06, 2021 3:19 pm
by Jim Simon
purplemagic wrote:How do you spin an image clip at a fixed rate regardless of its duration?

Math. ;)

Re: How to Spin Image

PostPosted: Wed Jan 06, 2021 3:27 pm
by Howard Roll
If fewer than 2777 rotations are required, the Fusion effect DVE can be used to enter a rotation value between 0 and 1000000 from the Edit page.

Good Luck

Re: How to Spin Image

PostPosted: Wed Jan 06, 2021 4:20 pm
by G0bble
panos_mts wrote:You can do it in fusion by using expressions.

Thanks I managed that.

wfolta wrote:..I recently learned another way to do this...

You lost me at step 4 as I had to start searching for what is a spline window and how to locate it.... will try that when I look it up later.

Now a 2nd challenge - when the 16:9 video is vertical like 9:16 I see ugly black bars on the sides. I want to zoom in enough to cover those and also blur the image to create the illusion of speed.

But I guess this is all the subject of a lengthy tutorial... hmm

Re: How to Spin Image

PostPosted: Wed Jan 06, 2021 4:26 pm
by wfolta
When you're in Resolve, on the Fusion page (selected at the bottom of the screen) on the top right of the screen there will be tabs to choose Spline, Keyframes, Metadata, Inspector. That's where you click to display a Splines area/window.

The zoom wouldn't be automated. You'd just move forward in time until the black bars appear and then zoom to hide them and you'd have to live with being zoomed in that much at the beginning. Or you'd set manual keyframes in the first few frames to zoom up once. (I can't imagine it would be a good idea to animate continuous zooming in and out along with the spinning.)

Re: How to Spin Image

PostPosted: Wed Jan 06, 2021 4:29 pm
by G0bble
wfolta wrote:When you're in Resolve, on the Fusion page (selected at the bottom of the screen) on the top right of the screen there will be tabs to choose Spline, Keyframes, Metadata, Inspector. That's where you click to display a Splines area/window.

The zoom wouldn't be automated. You'd just move forward in time until the black bars appear and then zoom to hide them and you'd have to live with being zoomed in that much at the beginning. Or you'd set manual keyframes in the first few frames to zoom up once. (I can't imagine it would be a good idea to animate continuous zooming in and out along with the spinning.)


Thanks. I just did that even as you posted. The Zoom is taken care of. I'll give the rest a shot later. Is it possible to slow down the rotation like only 45 degree per second?

Re: How to Spin Image

PostPosted: Wed Jan 06, 2021 5:15 pm
by wfolta
With the expression approach, just change the "360" to "45".

Since you're explicitly doing math in the expression approach, updating it is simple. (Well, it's simple because panos_mts was wise enough to use "comp:GetPrefs().Comp.FrameFormat.Rate" instead of hard-coding "24" or "30" or whatever for the frame rate.)

With the keyframe-loop approach you'll need to manually do some math and you might not be able to get an answer that's exactly what you want and also seamless. That is, you now want 45 degrees per second. That happens to work out evenly: 45 degrees per second works out to 360 degrees over 8 seconds. So move your final keyframe to 8 seconds.

But if you wanted 42 degrees per second, you'd end up with 8.57 seconds. Then you have to factor in your FPS manually. If you were using 24 FPS the .57 seconds is 13.71 frames. Oops, you'll have to round that down to 13 frames or up to 14 frames, for a total of 8:13 or 8:14.

So this is beginning to feel more burdensome to me than the expression. In other cases, and depending on what you are animating, the keyframe-loop approach might be more intuitive and easier. But in this case, the expression is much simpler to adjust. (And to reuse if you have a 24 FPS timeline now, but a 30 FPS timeline later, and then a 60 FPS timeline for another project. Save the text for the expression in a sticky note on your machine and it's a resource every time you need it.)

Re: How to Spin Image

PostPosted: Thu Jan 07, 2021 1:52 am
by purplemagic
Thank you all for your answers.

Re: How to Spin Image

PostPosted: Fri Jan 08, 2021 11:59 am
by G0bble
Howard Roll wrote:If fewer than 2777 rotations are required, the Fusion effect DVE can be used to enter a rotation value between 0 and 1000000 from the Edit page.

Good Luck


I started looking for this but I cant find the Fusion FX DVE anywhere in effects library...

Re: How to Spin Image

PostPosted: Fri Jan 08, 2021 3:18 pm
by wfolta
G0bble wrote:
Howard Roll wrote:If fewer than 2777 rotations are required, the Fusion effect DVE can be used to enter a rotation value between 0 and 1000000 from the Edit page.

Good Luck


I started looking for this but I cant find the Fusion FX DVE anywhere in effects library...


I can see it from edit, under Fusion FX. I think it's Studio-only, and I'm running version 17.

Re: How to Spin Image

PostPosted: Sat Feb 13, 2021 12:41 pm
by atmosfar
On the subject of loops, is there an efficient way to loop a short animation over a long period? I have a logo overlay that animates every 10 seconds over the course of an hour, and it takes forever for DR/Fusion to render it. It seems like there is no caching done of loops so it renders every frame fresh ...