Copy link to clipboard
Copied
I have a photo of a car with the wheels separated, and I want to find an expression or something that will help make the wheels look like they are rotating at the right speed. Any suggestions?
I have used AE for a while but expressions are still pretty foreign to me.
Thanks for any help!
Copy link to clipboard
Copied
Simple geometry should do the trick. First calculate the circumference of your circle. C = 2πR. Then you take the circumference and divide that into 360 parts to create the first part of a ratio between movement in x and the circumference. Why 360? Because there are 360º in a circle. Now movement in X is multiplied by the ratio.
Here's an example that work well when the wheel moves in a straight line along the x axis:
r = width/2;
c = 2*Math.PI*r;
R = 360/c * position[0];\
Give this a try. I hope you can understand the math. It's not much more than 7th grade math.
Copy link to clipboard
Copied
It's been a long time since I was in 7th grade, and frankly I am not that bright. Can you help just a little more?
Do I put this into an expression? My wheels are 140 pixels high by 140 pixels, if that helps.
r = width/2;
c = 2*Math.PI*r;
R = 360/c * position[0];\
Copy link to clipboard
Copied
Add that expression to the rotation property.
Copy link to clipboard
Copied
I found a great tutorial on this:
http://www.cgarena.com/forum/viewtopic.php?p=66547
You simply add an expression to the rotation of the wheel. Then connect the rotation of the wheel to the x position of the car. It worked great.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now