Jump to: Board index » General » Fusion

## Rotating every frame a certain degree (Expression)

Learn about 3D compositing, animation, broadcast design and VFX workflows.
• Author
• Message

Sanse.

• Posts: 6
• Joined: Sun Feb 28, 2021 3:19 pm
• Real Name: Sanse Azo
Hi it's me again,

Was wondering if I could rotate something via expression for example with a degree of 22,5 every frame so that it has the degree of 45 at the second frame.

I looked at the expression cheat sheet but couldn't figure something out

I guess you could somehow use "Keyframe stretcher" for that too in some way.

Can someone help?

Sander de Regt

• Posts: 2268
• Joined: Thu Nov 13, 2014 10:09 pm
Yes. Just create a simple expression on an angle control and enter

Code: Select all
`time*22.5`

And that's it.
Sander de Regt

The Netherlands

Sanse.

• Posts: 6
• Joined: Sun Feb 28, 2021 3:19 pm
• Real Name: Sanse Azo
Mh I tried that but it just speed up the whole thing instead of looking choppy/stop motion like.

David Ward

• Posts: 12
• Joined: Fri Oct 09, 2020 7:45 am
• Real Name: David Ward
Bit unclear as to what you are trying to achieve. If you want a picture to rotate 22.5 degrees every frame it is going to perform a complete revolution in 16 frames and will look quite fast. What effect are you trying to achieve? Do you want it to snap to a degree of rotation and stop for a stop motion effect?

Sanse.

• Posts: 6
• Joined: Sun Feb 28, 2021 3:19 pm
• Real Name: Sanse Azo
Oh I see now, it has of course to stay on that degree for a while so it wouldn't be on every frame.
What I try to achieve is a choppy stop motion look instead of a smooth/fast rotation.
I'll try to figure something out next time I work on it, thanks for the help.

Bryan Ray

• Posts: 1931
• Joined: Mon Nov 28, 2016 5:32 am
• Location: Los Angeles, CA, USA
Try this:

math.floor(time/[interval])*22.5

where [interval] is the number of frames you want to wait between rotations.

math.floor() is a function that rounds down to the nearest integer, so math.floor(2.6) = 2. By dividing time by your interval, it will only tick upward when the numerator is a multiple of the interval.
Bryan Ray
http://www.bryanray.name
http://www.musevfx.com