A slightly more complex experimentation this time. I wanted to try and have the ball move in a semi-realistic fashion down a steep slope, rolling along the bottom of the curve and up the other side. Almost like a skate ramp - the ball would of course lose momentum as it begins the steep climb, so it probably wouldn't quite make it to the top before it rolls back down again.
Maybe viewing the video will make more sense...!
Looking a little shoddy thus far, but I think I can tweak it to fix it up a little. I cheated a little on animating the ball itself, but seeing as this is mostly an fcurve exercise I think I can get away with it! I drew the path using the bezier knot tool as described in one of my earlier posts. I tried to keep the angle of the slopes relatively consistent so that it would have an equal distance to travel on both sides. I then just set the curve I'd drawn as the ball's motion path by selecting the ball and using Create > Path > Set Path. The ball then locked itself to the first bezier knot point and the animation is automatically set to follow the path using a splined interpolation - a relatively lifeless speed and not at all realistic.
Opening the animation editor reveals that the ball's speed and motion is controlled by fcurves! (I didn't screenshot it, sorry!) So I set to work tweaking and messing around with it.
The curves for this one are a little convulted, but I'll do my best to try and explain them...
The first thing I did was activate the animation ghosting for the ball so I could get a clearer picture of how my timing was without needing to play it back every time. This allowed me to much more accurately tweak my curves as I was able to see immediately after adjusting them how it would effect the animation.
Originally, the ball was a little too 'sharp' on the curve at the bottom. It followed the shape almost exactly so I needed to round it out a little bit so it didn't jump too sharply on the corner. I simply added a couple of keyframes either side of the lowest position at the bottom of the path and dropped the Y position a little, so that it remained on the bottom of the curve a little longer.
Starting from the first keyframe, I wanted it to slowly accelerate out of the highest point and pick up speed as it dropped down the slope, hence the sudden spike in the curve. I wanted it to keep a continuous speed as it turned the corner and uses the energy gathered from the sharp drop to propel itself up the other side. Gravity would be pulling down on the ball all the while, causing it to gradually drop in speed as it nears the top of the slope, eventually pulling it back down and causing it to roll back up the other side.
There's a very wide curve on the top keyframe that keeps the ball at its current level before gradually beginning its descent which rapidly escalates into a steep drop, increasing the speed of the ball.
I think that I've sort of got the effect I was going for - it's getting there, at least. I think that the ball probably hangs in the air too long at either side of the curve, so I need to reduce the width of that curve so that it drops a little sooner. This might also allow me more time to adjust the acceleration so that the increase in speed is a little more gradual. I think that it gets too fast too soon as it falls from the right side. Conversely, I think it's too slow in picking up speed on the initial drop from the left side - simply shifting the width of the curve so that it's a little more equal on both sides should rectify that.
I also think that it stops too suddenly as it returns to the starting position, almost as if it's hitting an invisible ceiling. I'd like to add a little overshoot to that, so that it flies up a little further before dropping back down. Tweaking the curve so that it extends slightly below the final keyframe should give me that result.
Hopefully that all makes sense...!