View Full Version : A rolling ball...any thoughts?
jackpheah
01-03-2007, 05:58 PM
Greetings one and all. A seemingly simple animation has left me in a bit of a quandary. How does one go about making a ball roll along a motion path, so that the rotation of the ball is equal to the distance traveled? (to ensure that the ball really does look like it's rolling, not scooting along the path)
I understand that an expression or driven key would need to be made relating the circumference of the ball x 3.14 to the length of the motion path...but I'm not sure how to go about it. Any thoughts?
DjVoyager
01-03-2007, 10:38 PM
Couple of ways to achieve this. I would do it in the following quick way;
Create the ball, and apply it to a motion path. Select the ball and open its channel box. Right click and break connections for all the rotations, because you will only need the translations for the ball to move on the path. Ignore any errors or warnings. Go ahead and keyframe the rotations again, according to whichever way you want the ball to roll.
Hope that helps.
jackpheah
01-03-2007, 10:55 PM
Thanks for the input! Any thoughts on how to accurately measure the exact length of the motion path (curve) so as to divide that length by the circumference of the ball, to get an accurate rotation count?
laxman
01-04-2007, 12:49 PM
this chat should get you pointed in the right direction:
http://www.digitaltutors.com/chit_chat/showthread.php?t=2338&highlight=car+tire
jackpheah
01-05-2007, 12:06 AM
I tried the expression in that tutorial, the only issue I see is that the ball starts to roll backwards as soon as passes into the negative quadrants of the grid (which doesn't make much sense since the negative values should be made positive when squared in the equation). I'm not sure what to make of that.
laxman
01-05-2007, 05:04 PM
like it says, just keep the entire animation in the positive quadrant. You can easily group the entire scene and move it, it won't affect anything. Otherwise you could come up with something else for the expression. That is a general expression that helps with animating cars based on their position. One thing you can do it measure or estimate the distance of the curve it is attached to, then animate the rotation so that if the curve is 100m, then 100m of the ball touches the ground. So find the circumference of the ball, lets say it is 1m. That means the ball will have to rotate 100 times completely to travel 100m. That translates to 360degrees * 100, or 360 000 degrees. So then you just keyframe the rotation to be 0 and the start and 360 000 at the end.