Bouncing Ball Tutorial for After Effects

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey everyone its Joel how and this is a bouncing ball tutorial for Adobe After Effects let's get started with a new composition in Adobe After Effects I'm going to keep this small so we can keep it on the screen if you choose a preset you can see you can see 1080p or I'm gonna choose 720 just so that we can keep everything on the screen I typically like to do 30 frames per second and so 1280 by 720 and background color black is fine once we have our composition I should probably name this so bouncing ball comp alright once we create our composition now you'll see we actually have the composition area that we can look at here in the composition window the comp itself is listed in the project as an asset and we have our timeline every composition has its own timeline so this is a basic tutorial so to create our ball I'm going to make a new shape layer so we won't be important graphic we'll just be creating a simple shaped layer here and I'm going to you can see the shape layer is down here in the timeline and here I'm gonna use the ellipse tool and you'll see that this is a set to the tool creates a shape not a mask but a shape and so if I click and drag in the on the in the composition window I can create a ball it should be circular so I'm gonna hold the shift key to lock our aspect ratio so here's our here's our shape layer and one thing that I want to do that's very important for the ball itself is to get this anchor point that's in the middle too to the center of the ball so I'm going to go up and choose the pan behind which is also the Anchor Point tool and click off and then back on so I can see this Anchor Point and now drag that over right to the middle so so this is gonna let us later on if we want to squash the ball or even rotate the ball on and center then it will be it was supposed to drag that off a little bit all right there we go it'll rotate on its center and you know what I can just zoom in here so that we can see this a little bit more it's a little laggy when I drag that for some reason maybe the screen recording software all right so that's our that's our ball and it's centered let me change the name of this layer I'm just gonna hit enter and shape layer Wow now this is a bouncing ball animation so I will add a ground element or we could actually just have it bounce on the very bottom of the screen but let's it's very easy to make a new shape layer and on this shape layer just use the rectangle tool and just draw a rectangle and I'll do this and rename this layer to ground I'll move it below doesn't really matter because these will overlap but in this case if the ball will appear on top of the ground and the last thing I'll do is just lock this layer so that I don't have to I won't I can't select it by accident now so the only layer I can really work with here is the ball so I think I'm pretty good shape at this point so we want to animate the the actual position of the ball and then we can get into some easy and and some principles of animation as we go to do that make sure that you twirl down your transform options here transform properties and you'll see Anchor Point position scale rotation and make sure that it's the the transform properties for the lair because notice that for a shape layer you can also have a set of transforms for a specific shape hmm because you can have multiple shapes on a shape layer so make sure that we're on the actual layer transform here okay um actually one thing I didn't do here it looks like we have a lot of frames in our timeline and I want to keep this animation pretty short so if I go to composition settings and we look at our current duration we're at a fairly long time here actually let me show this trick we have if I control click I can show frames over I can show time and we're looking at almost two minutes of animation here so that was whatever my last composition setting was so let me change that to not to two minutes but just ten seconds of animation for now it will probably be even shorter but now you can see we've got there's one second up to ten seconds and if we go all the way to the end you can also use the N key and the HOME key you can see we're at nine minutes and twenty nine frame are nine seconds and twenty nine frames I like to keep this on frames in a lot of cases just because of the little clear when I'm jumping ahead or back certain number of frames so with our timeline set to ten seconds at 30 frames per second or 300 frames now I can start at frame 0 and start animating we've got a position property that I want to change so the first thing I'll do is select my ball and bring it off the screen so that it's off the screen we're gonna have it start here it's gonna come down and bound so it'll go through a bounce here and then maybe another bounce there and then go off the screen over here so we kind of have a full lifetime of this lifecycle of this ball entering and leaving and doesn't need to come to rest or anything so I'm going to change the position over time to make sure to have that happen in after-effects I need to start to set some keyframes and so I turn on my time very stopwatch icon here and you'll see that turns blue and it creates a keyframe at that current time at time zero frame zero and so now I can jump ahead let's say to frame let's say let's Freight let's say frame 54 for now and this will be a very slow bounce and I'm just gonna click and drag this if you can see it's already created another keyframe so we've got a keyframe at frame 50 and I'll drag this down so it's basically coming in contact with the ground maybe a little overlap because I might squash that ball later and I'll just keep going and I'm gonna frame 100 and I'll drag it up here you can see a motion path is starting to be drawn as we go through this 480 150 whoops grab the handles ctrl Z to undo that and every time I move the ball on the screen I end up creating a new keyframe so I haven't I've moved my current time indicator to enough forward another 50 frames so I'm at frame 200 now and it's here and the bounces are gonna get smaller as we go and 250 try to get those exactly on and this is about here and then the last one it's off the screen there okay and I'm not exactly precise with these especially that one at the end but let's see if I go through and I hit the spacebar we have some basic bouncing motion this is not great but it's a start and we can see after fax you interpolating between our keyframes so we create the keyframes it at the at the extreme points of the animation motion and After Effects kind of fills in between those and so what I would like to do is at this point we need to start to incorporate some of the principles of animation number one I'm gonna just move these around spatially to try to make an even distribution of these keyframes going horizontally because the ball is gonna kind of move in a linear fashion across the screen horizontally even though it's going to be kind of ease accelerating and decelerating up and down due to gravity so you can see here our motion our motion path has dots that show a consistent spacing of the dots along the path that means that this motion is is is pretty much at a uniform speed or velocity as it goes through and so what I'd like to do is let's go to this first keyframe at zero and I'm gonna right click select and right-click on that keyframe and I'll say easy ease out now what just happened is you can see that the dots here are closer together at the beginning and they get further and further apart so this ball starts slow and then accelerates and I think I want to do that for both for all these Peaks what we're trying to emulate is the idea of the ball bouncing off the ground and having some speed up and then slowing because of gravity before it starts to fall again so at frame 100 or at the peak and it frame 200 we're at the peak and I'll write I've selected those two key frames you can shift-click to select multiple key frames again I'll choose keyframe assistant this is actually going off the recording screen so it's keyframe assistant and I'll choose easy ease and so you should see again these are getting closer together at the peak so if I were to hit spacebar and Ram preview this we're actually getting a very pronounced easing and it's not at all what we want in terms of the motion but it actually represents this this this easing this slowing down as we reach a reach a keyframe so it's a it's we're on the right track at this point I think it's important to start to look at our motion path so right now we've got a bounce that that that has kind of a swooping bounce down and I want to change the shape of these so that we have more of an arc at the top and you can see the handles here seems to be a little bit of a graphics issue there but when we have bounces at the bottom we don't want to have this kind of smooth motion if you want to have a sharp pop as the ball as the ball comes up so this would be a smooth motion with the basically we're controlling the the shape of the motion path as it passes through this keyframe and and it's it's tangent it's a smooth shape so we get this floaty effect right now but if I select this and I drag one side and then I hold the alt ctrl and alt keys I can break the break the connection between those two handles and end up with something that's much sharper and so you can see basically I'll do that over here where the balls not here I'll drag this up and just have it generally point towards that keyframe and the same thing here so I'm gonna drag that and that and so she this gives us a much sharper bounce and it's starting to let me see there's some inconsistencies in the path here but let's just let's just do a quick preview and I think this is getting much better so that shape change of the of the motion path really helps particularly in the first bounce I think that looks really good so next up you may want to save this at some point and now's a good time to save if you haven't done that the what I'd like to do next is the the bouncing effect is working is working well in terms of the overall shape the easing that we have where it slows to a stop at the top of at the apex of a bounce is is really limiting the realism here we it in the horizontal direction there shouldn't be any easing in in the sense it shouldn't come to a stop as its heading in this direction so we have to what I'd like to do now is basically separate the horizontal in the vertical motion so let's stop this and back to frame 0 and we have a position and what I'd like to do is if I right-click on the position property in the transform for a given layer there's a separate dimensions or separate dimensions option and when I do that it changes from an from an X and from a from a single position value to an x and y position and this is great because it lets us right now the animations unchanged right now we've got still the same motion it's still coming to a stop but what I want to show now is if we go to the timeline or the graph at the graph I'm sorry the graph editor in the timeline we can see that the x position in the Y position are very different and I'm going to just drag this up so that we have a little more room here our exposition is our horizontal position and you can see that we have in this case it it goes and then stops eases and so there's easing in here and there's little controls that allow us to to basically have the have the ball stop and I want to take those and make this much more linear so if I take those keyframes and we control these I really want ideally this bouncing ball to be a straight line so I can grab these handles actually I'm just gonna alt click and make these all linear with no handles and now you can look at it and say okay that's and I'm just gonna drag these vertically and basically make a straight line as long as it's close we should be all set and to be honest we could actually delete these keyframes in here if we wanted to but if we look at the result now we've got our horizontal motion is actually pretty linear going across so now we just have to fix that vertical motion and again if we head back to our timeline and we take a look x position is fine our Y position is here and we can start to control how we how we fix things now this is a this is this this bounce pattern is basically upside down because because of the way after F extracts vertical position but I'm taking these handles and I'm dragging them out and you'll see the changes on the screen as well so that and I'm holding alt I can click that to make it linear and click it again to create the Bezier handles and that's getting us some more more smooth arc across the top again so we're basically recreating some of the work that had to be done in the previously but this is going to give us a very smooth this is gonna give us our easing in the vertical direction without any easing in the horizontal just out of curiosity I'm just gonna shift-click these keyframes and delete hit the Delete key so that gives us basically a perfectly linear piece okay so now if I look at the bass at the ball it's slow but it looks pretty good now I think there's still some work that could be done if we get out of the graph editor and back to the time line we could look at the different heights and the the timing and spacing of the the highs and lows these are these are spaced out evenly from our beginning so I think I think what we would end up doing is is I would want this bounce to be over here a little bit more so if I start to move this keyframe and I start to move the fees you can see how that's updating the actual motion path and we could hop back if we want to make some adjustments in terms of the smoothness of the curve and I might smooth this out a little bit make that a little bit bigger there we go so I think that's looking pretty good and the graph editor is great for for tweaking that all right so I'm overall I'm pretty happy with the with them with the bouncing ball and the motion and the easing but what we still need to do is I still need to actually it's a little slow and I wanted to show this technique overall I can grab all my keyframes and if I I like the overall I like the overall animation here I don't like the pace so let me take this and I'm going to basically reduce it by hope I selected all the keyframes again I can basically just click and drag a rectangular selection there and I'm gonna if I if I if I just if I just click and drag all these keys they move horizontally so I can change the the timing of the animation here by having it start earlier or later I mean undo that but if I hold the Alt key down and then I drag and I click it's actually gonna change the overall the overall timing of the animation without affecting the start point so I I can basically speed up an animation this way and so that's what we have here if I now I've got something that's a little faster and I could even cut that in half again so if I grab those and we all drag down to 150 this is pretty much the original and now I can I'm just gonna bring the work area down alright so that looks good if you like that you can also trim your comp to the work area so that the composition is only as long as the work area all right things are looking great right now the only thing I think we have left to do is some squash and stretch so when our bouncing ball hits the hits the and this is one of the issues you can when you scale like that sometimes you have your keyframes are not exactly on a given frame it basically does the the math for you so if you sometimes you'll need to just kind of drag those to get those right on a frame again but in this case here our ball is I can bring this back down our ball is on the is on the ground and what I'd like to do is if I go back one frame I'm gonna hit ctrl + left arrow to go back just one frame I'd like the ball to be fully intact here in terms of being round but be kind of squashed as it lands here so this will be a scale option and so I'm going to turn on the stopwatch for scale so we're gonna change scale over time and so I just want to kind of go through and I'm gonna scale is by default 100% so on each so I created two keyframes right here on each side of the bottom of the bounce where it's 100% so now I can go between the two and I'm gonna unclick this link to two if I if this link is selected scale is basically locked in both the X and y direction and so I don't want that I want to unclick that and be able to squash this in the vertical direction and expand in the horizontal direction so that I get between the three frames again I'm gonna use control left arrow I've got a full fully intact spherical ball here it's bouncing at the bottom and then it's back to its spherical shape here and now I can do the same thing over here one thing to save myself some time I'm going to select these keys here ctrl V to copy ctrl C to copy ctrl V to paste and then I'll just drag them so they're centered so that that scale can be in the exact same location and it doesn't look like this is low enough so I'm going to bring that a little bit lower and is this the other bounce and again this is just off in terms of being on a specific frame so I'm gonna put that there and control C control V and I'll just drag those so again that's a hundred percent scale and then our squash and stretched version and then 100 percent scale again as it comes off the as it comes off the off the ground all right so let's fit this and let's see what this looks like so it's only one frame but it gives us just a little bit of bounce we can see that one frame and and we could expand that if we wanted to to make it a little more pronounced so let me zoom in here and we could drag this back and this here so that we can use interpolation so we could be 100% here and then we're starting to squash and stretch and then we fully squash and stretch and that will give you a it doesn't look right here because obviously a ball wouldn't wouldn't wouldn't squash until it actually hits the hits the ground but can certainly make it a more smooth a more visible effect and it happens very quickly so in those few frames we're not really visually processing that one thing I will add in here is the idea of motion blur so for a given layer we can turn on motion blur using this checkbox right here and to see it in the composition we just turn on this enable motion blur and you'll see that After Effects is looking at the speed and can enable motion blur so that should help visually we'll see a little more blur and a little more of an effect there so that's not a bad effect we'll expand that out a little bit so that we get a little more bounce and for a slower animation we could first lower animation we could spend more time and get a little more creative with that with the bouncing at the ground level but for right now I think I'm pretty happy with that so that's it we've got a bouncing ball and we can render this out as video or put a background in or go in and start to make the ground more interesting or add shadows or cracks or other things but this is this is a good starting point for bouncing ball animation thanks for watching
Info
Channel: JoelHowe.com
Views: 35,577
Rating: undefined out of 5
Keywords: After Effects, Animation, Novice
Id: oGBS4yZHSgw
Channel Id: undefined
Length: 29min 30sec (1770 seconds)
Published: Thu Jan 18 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.