 Alright guys in this video tutorial series what we're going to do is a ball bounce animation in Maya Featuring a bit of squash and stretch. So to give you an idea of what we're going to be building Here's one I prepared earlier. So if I just hit play you can see that the ball starts up in the air And then it's moving across it hits the wall bounces back losing momentum all the time And it's got a bit of squashy and stretchiness to it to add a bit of exaggeration to it amazing So now that you know what we're doing you're going to need to know what we need. So I'm using ultimate ball rig Ball rig which sounds like a Piece of torture equipment, but it's not it's actually a really good rig available from CGI meet-up I will put a link to this rig in the description below So you'll need that before moving on to the next video Well done for making it this far. I have high hopes for you So let's get into putting this animation together. So as you can see I have downloaded the ultimate ball rig And I'm going to get that open. Hopefully this won't take too long. Oh It's trying okay Let's have a look at this rig them so as you can see it is A ball, but it's got a few controls on it And if I move these around you can see this one here controls squashy and stretchiness We've also got One of those on the bottom if you want to have the reverse effect We have this controller in the middle that kind of controls position of the ball and then right at the bottom You've got the root controller which contains all the sort of extra controls So what we're going to do is we're going to start by using this extra control to change the type of ball And by default you'll get this stripy ball Which is actually really good, but one of the quirks to this rig is that you can either do an animation with the ball rolling or spinning Or you can do an animation with the ball Squashing and stretching, but it can't handle both. It's not set up properly for that So as we're doing squash and stretch for this exercise We need to make it so that this line is not here otherwise it'll kind of shatter the illusion So make sure that you've got this controller selected We're then going to scroll down in the channel box and where it says ball type We're going to change it from basic to simple if you are interested. There are lots of other fancy little balls in here But today we just want simple Okay, the next thing we're going to do before we get this bad boy bouncing is we're going to change this Um Situation down here. It's starting to frame zero at the moment. I can't handle that that stresses me right out I start my animations at frame one. It's just a matter of pride. So We need to sort that out first thing I do them is I select the number in this box. Yeah Type one I press enter and then I just move my play head over to frame one I can now see frames one to 100 and I feel much calmer already Brilliant, okay next thing we're going to do it's already set up properly on mine But I don't know whether or not it's set up properly on yours We need to go into the animation preferences, which is this Chap down here in the bottom corner that looks like he's running away from a gear that's going to kick his ass And once you've clicked on that, it's this playback little chappy here And it's the playback speed. It should say real time mindset to real time 24 frames per second Yours might be real time 25 or 30 frames per second But as long as it's real time if it's set on play every frame It's going to go way too fast and it's going to go mental so we don't want that so make sure it's on real time and then press save Okay, we're now completely set up to do this animation. So let's get into it right What I want to do first of all is change my view but before I do that I'm going to select the controller that Handles the placement of the ball And that's because I can't see it as well to select it in the side view, which I'm going to move to now So here's the side view I'm just going to zoom out so that I can see the ball Give myself plenty of space Okay Let's move it over here a bit So first thing I'm going to do is set position one of the ball, which is going to be up in the air And just because it's kind of easier for My maths I'm going to move it up by about ten units. So I'm watching the translate Y Number change here. I'm just going for about ten units And once I'm happy with that on the keyboard, I'm going to press S and that sets Position one and now everything's going to happen from here So the next step once I'm happy with that is I'm going to move to frame 10 and I'm then going to put the ball back in the ground position Now here I get to tell you about one of the good bits about this rig because the way it's set up to treat the the bottom of the grid as the floor Anytime we put zero back in the translate Y box of the channel box It just goes back down to the floor So we'll know that it hits the floor perfectly every time as long as we put a zero in that box So what I'm going to do now is press S again if I just scrub between these two key frames You can see the balls coming down, which is exactly what I want it to do Now as the ball bounces it loses Mentum so the energy that it's got some of it dissipates into sound and Heat and all the types of energy so it's not going to bounce up to the same height And it's also not going to take as long to get to that height So it's taken in this case nine frames to come down So what I'm going to do now is I'm going to take six frames So I'm going to go to frame 16 to go back up and I'm going to go up about six units That'll do and I'm gonna press S again Now one important thing to get a ball about looking convincing is that a ball should always take exactly the same amount of time To come down as it took to go up. So it's taken six frames to go up So now we're going to take six frames to come back down. So I'm going to move to frame 22 That is having six on it Yes, okay, and then I'm going to Put zero in that box back on the ground Press S and then I've now got the ball coming down going up coming back down So far so good Now I need to take some more frames off it and some more high off it So this time I'm going to go four frames along. So that's going to take me to frame 26 And I'm going to go about four units up Maybe just below four units And then I'm going to set that and then four frames later, which will be frame 30 back to zero Press S and set that keyframe Okay, so we're just taking more height and more time off it each time Okay, so now I'm going to go three frames one two three And I'm going to go up to about two and a half this time SS and then I'm going to move another three frames on take me to 36 I'm going to go to Zero press S and Then I'm going to go another two frames on take me to 38 and I'm going to move up to about Maybe one point four ish and set that Frame 40. I'm going to go back down to zero and set that and then I'm going to start moving in One frame at a time just to get the little bounces at the end so frame 41 I'm going to go up to about Just below one and then the one after that back to zero and I'm just setting each one of these as I go so the one after that I'm going to go up to 0.5 and I'm going to set that And the one after that back on zero And set that and I'm going to do maybe two more of these little bounces So I'm going to go to not point to this time Back to zero and set and then a really really tiggy one just at the end Maybe just below not point one and then back down to the ground on the final one and press S So that's taking me up to frame 48 Okay, so if we look at what? Effect that's achieved. I'll just play that on a loop if I press play now That's what we have so far not very convincing And that's because there's some more work needed on this in the next step We're going to play with a graph editor So in the last step we got as far as this motion that we've got here Which is just making the ball bounce up and down, but it's not convincing at all It kind of looks like a yo-yo, which is not what we're going for so we're going to sort that out So making sure you've got the right controller selected Which is the one that we set the keyframes on so it's that little chappy there You'll know if it's the right one because you'll get all the red ticks on your timeline And once you've got that we're going to go into um windows animation editors and graph editor And you'll be greeted with something that looks like this I'm going to press a on my keyboard just to make this kind of fill the screen Um, and this is the animation that we've got Now what we need to do Is make this line look more like a bouncing ball As soon as this line looks like a bouncing ball The ball we've animated will look like a bouncing ball So what we've got here is we can see that at the top of each of these curves It's kind of doing what we want in that it's rounding But the problem is it's rounding at the bottom as well, which is not how movement works So we need to sort that out. First of all, we're going to do the bottom So what I'm going to do is I'm just going to click and drag To get a selection and I just want all those keys along the bottom and you can see I've got them now They've gone yellow And what I'm going to do is I'm going to change the tangent Which is the type of curve that's used to interpolate between each of the keyframes At the moment it's just on whichever is default But I'm going to use this one, which is linear, which means straight line So if I click on this All the ones at the bottom go straight, which is exactly what we're looking for Because that's how a ball works. It hits the ground and then it comes straight back up So straight away the ball will look better if you want to test it It will already look better But we're going to further improve on this to make it look even more better So I'm going to start on this first point here And what you can do with these points is you can change them So if I was to, so I've clicked on this one, if I now click on this Side of it and with my middle mouse button click and drag You can see that I can have an impact on How these curves are working. The problem is that they're stuck together So if I put a bit of a slope on this first curve It's having kind of an adverse effect on the other side of it, which I don't want So the first thing you should do is select your keyframe And then this little chappy up here is called break tangents And that means that one side of the curve will be separate to the other side And when you move on you won't cock up the other So I'm going to break the tangents on that I'm going to click this side of my curve and I'm just going to Change it so that now the ball hangs in the air for a bit longer It's quite a cartoony exaggerated ball bounce, but that's what we're going for And then I'm going to do that on the other side So I select that one and I'm just going to Bend this out just to get the ball to hang in the air for a little bit longer And now I'm going to repeat this along all of the points at the bottom until I get a nice curve Okay, so there we go. You might have noticed that I didn't bother doing the two at the end That's because the curves aren't really big enough to need that doing But you can see these arches on On each of the bounces are now much nicer The only other thing I'm going to do is I'm going to try and keep the drop-off rate a little bit more consistent So here they're not very consistent. They kind of be all over the place So I'm going to select This one here and I'm going to hold shift on my keyboard And then I'm going to middle mouse click. I'm just going to pull that point down a bit Uh, and that's just going to necessitate A little bit more messing around with the curves because now they don't quite work in the way I want them to So I'll just change that Uh, I'm going to bring this one down a touch as well And then I think I'm happy Okay, so now at this stage, we're just going to test that out So if we play that you can see that the ball is much more convincing It looks like it weighs something it hangs in the air It pops straight back up from the ground making it look like it's got a bit of boundlessness to it So that is exactly perfect spot on what we want for this point of the animation So so far if you've been sticking with the exercise We've got the ball dropping out of the sky and it's got a nice Curve to each of the keyframes so that it's hanging in the air and it's pinging back up But what we're going to do now is add a bit more cartooniness to it with some squash and stretch So in order to do that, we just need to get hold of a different manipulator wrong view So We're going to do the squash and stretch with this manipulator. So this is called control top So I'm going into my perspective view just to get it selected And then I'm going to go straight back into my side view because this is where all the magic is going to happen Okay So the first thing I want to do is on frame one I just want to set this keyframe as it is. It's a perfectly round ball at frame one. There you go. That's round And that's how I want it to stay. So I'm going to press s on my keyboard to keep that state And now what I want to do is stretch it out that's stretching Um on the keyframe just before it hits the floor. So that should be frame nine which it is And what I'm going to do is I'm probably going to stretch the ball by about 0.4 I'll do it And that's just before it hits the ground and then I'm going to press s So you can see that as the ball nears the ground as it's picking up speed It gets a bit more stretched, which is kind of a very cartoony convention Uh and then frame 10 the following frame when it hits the ground We're just going to squash it down a little bit and I'm going to squash it by about the same amount that I just Stretched it so that the energy that was there is now being kind of spread out So I'm going to set that And now what I'm going to do I'm going to work a little bit out of sequence here just because I find it easier I'm now going to go to the top of the next bounce, which is frame 16. I believe And I'm just going to set the shape of the ball back to normal by putting a zero in the translate y controller and then I'm going to set that And now I'm just going to work backwards You can see that that was all kinds of wrong. So in the frame after um It was squashed I am just going to stretch it out but not by as much as it was previously So I'm going to go to about 0.2. I think And I'm going to set that So now what this looks like is it goes into the bounce and we've got a bit of a stretch It then pings the ground and squashes and then comes back up With a bit more of a stretch just to sort of show the speed that it's going back up with Now what we do is we repeat this process Two or three more times Until we've got all the squashes and stretches how we want them taking a bit off each time So the next one then It needs to be just before it hits the ground again, which is frame 21 And I did about 0.4 last time So I'm going to do about 0.2 this time I'm going to set that there And then frame 22 and it hits the ground minus 0.2 ish And then the frame after that I'm going to do about 0.1 Just below perhaps And then at the top of the next bounce, which is frame 26 Set it back to normal So I'm going to put a couple more of these squash stretches in and then we'll have a look at the result Okay, so now that I've put all those in let's have a look at what it looks like Lovely so you can see earlier in the animation the squash and the stretch are quite exaggerated And then they're toned down as the animation goes on as the energy kind of dissipates from the ball All right guys, let's get this ball bounce animation finished So if you've been sticking with this exercise so far what we've got is a ball that Starts in the air bounces down has a few bounces. It's got a squash and stretch. It's got a nice weighty look to it So far so good But to add a little bit more realism We're going to try and move this from one side of the screen to the other have a little bounce and then roll to a nice stop So we're going to put that all in place Right now What I'm going to do is I'm going to select this controller here Which is the one that's controlling the position of the ball And what I want to do is add another layer of animation to it Now there are different ways I could go about this, but my personal favorite which I found quite neat Is to put it into a group and then animate the group And what that means is that I'm putting animation onto something clean So it's kind of like an an empty vessel that I can put keyframes into So I'm going to select this controller. I'm going to hit ctrl and g on my keyboard And I'm just going to call this movement Just so that I can find it in my outline if I ever need to And what that will allow me to do you can see there are no keyframes on here now But I can move the ball side to side Kind of on a fresh timeline, which is How I prefer to work so Let's get this animation set up. So I'm going to go back into my side view And I want the ball to start currently where it is. So one frame one. I'm going to press s And then a little bit later. Let's just expand the timeline a little bit. Let's go to about frame 30 I want it to be in the air actually About frame 33 I'm going to move the ball I've got about 12 units to the right And I'm going to set that keyframe And then I'm going to bounce it back. So I'm going to go I think in this case to about frame 60 So well after it stopped bouncing so it gives it time to roll I'm going to move it back not all of the way to about there. So now I'm about four units away from where I started Okay, so that's the base of the movement. Let's have a look how that is looking Okay, not bad But it's picking up and losing speed at the wrong times and that again as it was with the bouncing Is down to the way that the curves are working in the graph editor. So let's sort that out So I'm going to go window animation editors graph editor I'm then going to just scale this bad boy up a little bit Go on chief get bigger get bigger And then I'm going to press a Okay, so this is the problem When it hits the wall, which is here. It's this keyframe And the line should be straight because it's hitting a solid surface So I'm going to slap this keyframe and make the linear tangents there I'm also I'm going to make this one linear too because I want it to start off at constant speed And then I just want to Come to a more gradual halt than it currently is doing So I'm going to set this keyframe here again. I'm going to break me tangents break those bad boys And then I'm just going to smooth The curve out Now as you can see that's had a bit of a weird effect because now it's going to bounce off the wall faster Than it originally came off the wall. So what I'm going to do is select this keyframe Hold shift on my keyboard and then with my middle mouse button. I'm just going to drag And then That'll allow me to just come to a more gradual stop and match the speed that I had before Okay, so hopefully that's going to lock how I want it to look so let's Rewind that and have a look That's not bad. It is still bouncing off the wall a little quicker than I would perhaps have liked it to But overall I'm fairly happy with it um Yeah, I think I'm just going to remove this keyframe So I don't know what it's doing And then just check that again. Yeah, so I just think on this keyframe. I'm just going to move it back a bit I'm going to Reset that See what we get Yeah, and we've got a nice little rollback animation as well so The reason we get that rollback animation Is a happy accident and it's because My curve has gone past the the original spot, but that's kind of what you're looking for in a ball bounce animation anyway So we're basically finished The one last thing I want to do you can follow me in this step if you want to or not I'm just going to put in Um a bit of geometry So that it looks like the ball's bouncing off it. So I'm just going to create a cube I move it over here And then I'm going to scale it up And it's just going to kind of represent a wall There we go. I just need to now go into this field because it's not going to be Thick enough in this direction There we go And then I'm just going to put it into Edge mode Slap this bottom edge. I'm going to press control and e to extrude it Then I'm going to go straight into my move tool I'm going to pull that edge along just to make a bit of a flaw And put it back into object mode Okay, and now it'll look like it bounces off A wall hooray amazing. So If you want to preview this without the controllers on you just go to show And then you deselect nirbs curves and then Choose an angle you like the look off. I'm just going to make sure that is Connecting with the wall Isn't quite so I'm just going to reposition that That's pretty nice And there we go a ball bounce animation So hopefully that has given you everything you need to know It's a very sort of basic introduction to character animations. So it introduces timing introduces squash and stretch introduces giving weight to a character in this case a ball And it also covers Some useful tools in Maya such as the graph editor. So that brings this exercise to an end Make sure that you subscribe if you want more exercises like this one If you've got any questions or you need any help then you can either email me or you can drop a comment below the video And the final thing I'd like to do in this video is thank you for watching and I'll see you in the next one