Animate Any Object Along a Custom Path - After Effects CC 2020 Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome back to fix it and post my name is nick today we are going to look at how to make this car drive on the road this this effect right here now it's not particularly difficult to do actually it's super simple uh we're going to try a few different things we're going to get the reflections to move left and right of the car as it goes round the path but more so than that i'm going to show you how easy it is to set this up and guys a whole bunch of you out there are not subscribed to the channel but you are watching the videos so do me a favor just click the subscribe button it'll just take a second and if you don't like what you're watching then just unsubscribe it's pretty much that easy now your boss might come in and go hey i need you to basically make a car drive on a road around a circuit and you might be thinking all right well let's try and do that so we'll set up the road and we'll make this first com 1920 by 1080 let's set up the road itself okay so here we go we'll make it a white background why not now let's draw our road we're going to get the pen tool here and we're going to make the road a dark gray and we're just going to draw a quick little road so let's go let's make it like this sort of crazy shape it doesn't really matter what the shape is as long as the the corners are not so sharp but even if it is even if it is you know make it this crazy crazy shape i'll make it even crazier than that let's make it like this it's all right let's make the road a little bit thicker oh look at that let's make the road super thick thick all right here we go now let's go in here and we're going to duplicate this shape and we're going to press ctrl d or command d and then we're going to make this top layer white and then shrink it down so it's very thin more like the dotted checkers on the road we're going to go in here and we're going to go stroke and then we're going to go oh we're going to go stroke and then we're going to go dashes and then plus and then you see the dashes and we're going to just adjust the dashes until they kind of look a bit more evenly spaced more like road marks now that's your first thing down now we're going to get the car now we've got a few cars here we can pick from you know let's go to the garage here let's see which one we want to use maybe we'll use the blue one today all right let's cut this one out this is just an illustrator file just in case you are wondering and i'm going to uh make the origin point the center so i'm going to press alt command so i'm going to press option command home or control alt home for those on pc and we're going to center it up by pressing alt home or command home and we're just going to shrink it down so it is like the size of the thing now you may be wondering this is what you would probably be doing if you haven't done this before so what you would normally do i used to do it this way is you go up here and you go start okay you want to start it here let's set a keyframe and we'll go okay let's set it here now let's make it go let's go a bit further and we'll make it go down here and then in order to make it just go down that one section we've got to curve it a little bit and we're going to curve it down this way and you know this is fairly tedious but what you know this is the way you would normally do it and then you got to also rotate the car so we're going to rotate it this way and then we're going to go da-da-da and then we're going to go make sure that it's rotating as they do it but we have to adjust in the middle here because you know cars don't slide that way so we have to kind of adjust it as we go uh yeah look it looks like it's sliding out look pretty tedious um pretty tedious way to do it if we had to do this all the way through i would say you know don't bother because that is just really painful there is an easier way now here we go this is this is what we're going to do we're going to grab the path here and uh we're going to go to the path down here and then we're going to copy this so we'll go edit copy now here's where the magic happens let's go on to the position what do you think is going to happen guys all right i'm going to paste i'm going to paste this data see what happens my word what just happened all right so it just copied the path onto you know onto the row look at it it just hugs it perfectly now if i just play this back i'll show you what happens so look at this wow that's amazing now that's great but it goes around the path by itself which is in itself fantastic however there is a problem um it's not sticking it's not going forward in the road and we wanted to kind of incrementally turn to follow the road now how do we fix that well what we're going to do is we're going to right click on this layer and we're going to go transform and then we're going to go to auto orientate and then we're going to go orientate on path now let's watch this now that's looking a lot better right nice now we've got some slot car racing going amazing all right now this is going a little bit fast so i'm going to pull this out now what's nice here is that when it's pasted the position keyframes down here the motion path here around the circuit it just these keyframes here are all are basically equidistant to each other so you'll always get a consistent space all around the uh the path so it's going at a constant speed so what we can do is we can just drag this out and we can actually make it go for longer so watch this how easy is that now that's pretty cool and what's even better than that is that you can go all right i want to loop this so if we put an expression on it loop out and then we go cycle press enter this will just go on forever which is pretty dope nice huh all right so we can also put some other fancy things on here like a drop shadow which is also very nice as well now if we put a drop shadow on like so and i'm using the video co-pilot plugin uh f effects console which will basically pull up this little shortcut menu for me but if you want you can go over here and go effects and library like an old school person but i definitely definitely please encourage you to go get fx console because it's much much more efficient drop shadow let's go now let's drop a shadow onto this thing we'll just turn this layer we'll just put turn this layer the road layer off and just see if we can get a drop shadow going now right now it's going that way it doesn't really matter which way we're going but we want it to be above it and we want to be a pretty soft now learn this i learned this trick from good old ben mario and another aussie as well um he's a good dude very smart guy there we go now ideally if the sun was coming this way the shadow will always be going this way right so that's what should happen however when we do play it back that's not what's happened that's not what's happening you can see the shadow's just following it around and that's obviously just a limitation with the uh plugin itself it's just looking at the position of the car as it's going around itself so to fix that what we're going to do is we're going to up here and we're going to cut these effects out and then what we're going to do is we're going to nest this i mean we're going to pre-compose it so we're going to press shift command c and make sure you move all the attributes into the new composition now i should have called it something different but anyway now let's paste if now let's paste the effects back on now you can kind of see it's kind of hard to see but you can kind of see there's a shadow there but it's a bit it's not it's we need to fix these shadows a little bit but as you can see the shadow is now in one direction which is exactly what we want huh one direction all right let's uh let's let's soften the shadow a little bit and make the distance a little bit closer and likewise at this one i'll make the distance a little bit closer oh wrong one make the distance a bit closer and probably do another one just just for gags i can soften this and come up on this one a bit i think the softness is a bit too much in this one hand i'm gonna make this a bit darker and bring the softness down on this pull this one across and the softness down this and pull it across a little bit more too there we go that's look a bit better all right now let's turn the road back on now you'll see that the shadow actually is in a constant direction so it's going that direction now which is good i mean we can always vary where we want it to be but it'd always be in the same like it's consistent which is what we want let's actually make it more facing up so we'll make it all 90 degrees we'll make it all zero degrees so the shadow is facing to the top of the screen which is fantastic nice so you can kind of see the shadow going around as we do that all right so now we've got that down let's put a little bit of a reflection on the car so that as it goes round it's also kind of reflecting light as it comes around so we're going to use another effect called bevel alpha now it's very hard to see but it is there i'll turn it on and off as you can see so there isn't a bevel on it and we can kind of make it you don't have to be too over the top with it i would probably suggest being very conservative with it we'll make it go the other direction of where we are from the car so if the shadow is going up that way we're going to make the light that means the light is coming from this direction so just so you can see there's a slight light coming from this side so as you watch this you're gonna see that the light will come from this direction let's see if you can see it in the close-up it's a bit hard to see here but the light will shift according to which side of the car is facing uh the light i guess and as you can see from this side too it'll shift sides you can kind of see the reflection is coming from that side now all right so that is cool but how do we do that close-up effect that i was showing well i'm glad you asked let's get a new null and we'll make it we'll just put it here and we're going to do exactly the same thing we did before so we're going to copy the path edit copy and we're going to paste it onto the position keyframes as we did before now that is in the wrong place so i'm just going to move these keyframes to the beginning and we're going to find out where the keyframes ended where i ended my last set of keyframes because we've got to make it exactly the same so i just jumped into the precomp there and voila there is the magic point so we're just going to drag this out so it snaps i'm going to hold down shift though it snaps so now as you can see there is a null that is following the uh the car as well now we're going to turn on a couple of things so we're going to turn on the car layer and make it a 3d layer as well as the road i'm going to rename this road just so you can understand what i'm doing and now we're going to go to camera and we're going to make a new camera and we're going to parent that and now we're going to parent the camera to the null and then what we're going to do and watch this this is good this is crazy so now look at this as you can see here it's not zoomed in but you can kind of see what it is the camera is now following the null so all we have to do now is just reposition our camera so that it's on top of the car and that's pretty much all we need to do so check this out we're going to get our camera tool and we're going to move it so that the the car is dead center of the screen and we're going to zoom in just a touch now i will admit the car model is a bit small and the only way i think i can fix that is to actually come in here and basically triple or quadruple the size of this so i'm going to bring my trusty calculator because my mass is not very good so let's say 1080 times three three two four zero yep all right let's make that that size and we're going to make this let's hope the proportions are correct because uh this would be bad if it doesn't actually what was i going to do i need to parent this to a null and triple that size all right so hopefully ratio wise that should be exactly the same um and so obviously this is going to be too big now but that is okay what we're going to do is we're going to shrink this down to 33.3333 and that should be correct and there you go that that should fix the scaling issue as we have here all right now let's see this in action that's looking pretty good pretty smooth really nice now it does look very computery at the moment so i'm going to just put a little bit of a wiggle effect as i do with everything that i do in fact i'll do it on both the position and on the uh on the rotation as well so we'll just wiggle the null just to touch not a lot nothing drastic just you know just something just a little bit of something something just to give it a little bit of a little bit of realism just so it doesn't feel like it's just locked on the whole time so it just moves a little bit that's probably still i can probably put a little bit more on a little bit more on the wiggles let's make it 50. maybe even more on the rotation let's go really crazy all right so this is cool but there's one more trick i want to do which is basically to always have the car orientating towards the front but like a video game because right now we're just following it from the top like a helicopter but i want to be able to follow it you know like a micro machine did you ever play that game micro machines anyway so what we're going to do is we're going to go to this null and we're going to select it and then go to transform and you guessed it we're going to auto orientate and then a long path and bam check this out now we're oriented at the front and what's cool is that you can actually set the rotation in any direction you like and it'll just follow that direction so if we want to go to the left for example here it'll just stay that direction and what's kind of fun is you can kind of see these little cool reflections in the car kind of moving with it as it goes around the track as well yeah so it doesn't matter where you go and i mean you can even set keyframes in this as well so for example if you went you know set a keyframe here went to two seconds and you know we wanted to spin it this way just for whatever reason and then we want to spin it back um we could also do that as well and then we'll just set some easy eases and check this out so you know it kind of spins as as we go all right guys so that is pretty much it in a nutshell aha if you know what i mean i'll just show you another trick just in case you do need this because it did come in handy for me recently and that was this is just another example where i'm just going to take these cameras off just so you can kind of see what i'm doing so let's just say that you wanted to go and stop here and then move off right so you could do that in keyframes but because we've already set it we've already set the parameters up in terms of the speed of everything these are all equidistant in terms of you don't want to kind of mess with these frames too much one thing you can do is put a time remap feature on there and as you can see here if you wanted to pick a moment in the future where it where it stops him let me just turn this onto a quarter because it's just freaking out okay just say you want it to stop here for example so what we'll do is we'll put a keyframe there and then we'll just let it keep going and maybe we'll put another keyframe there we'll say we want to stop there and then keep going another keyframe there and then we'll keep going and then we'll just come back to the end which is there so that's where it loops now just say we wanted to stop so what i would do is grab this frame and keep frame and then put next to it so it's the same and then we'll just ease these in so we'll press f9 and ease them in and likewise we'll do that with this and likewise i'll do that with this and watch this stops then goes stops and then goes stops and goes and stops and then goes and keeps going so that's kind of pretty nifty right there's another thing you can do which is for example if you wanted to go around here for example and then decide you know what i need to i need to basically go back right so you come to about here let's set a keyframe around here and we want to reverse all the way back what we can do is we can set a keyframe there and then we'll copy that keyframe and put it that way and then we'll copy this keyframe and put it back here and likewise if you ease these two keyframes here watch this it'll go all the way to the middle stop and then start reversing up it's pretty much as easy as that it's pretty cool right like this is this is a very useful kind of um workflow i think because there's tons of stuff which you could use this in applications for especially with objects that need to move across the screen in a nice fluid motion it means you can draw your paths out and basically do whatever you like with them once you've got them re-timed anyway guys i hope that's been helpful hit me up in the comments if there's anything else you want to learn and i'll see you next time and guys don't forget to check out my instagram page as well at nick benku underscore motion uh look i would love to see what you guys create and tag me tag me in these posts i want to see what you guys are creating and especially if you're using the tutorials to do so i want to see it guys thank you guys you are the best
Info
Channel: Nick Khoo
Views: 35,082
Rating: 4.9632015 out of 5
Keywords: after effects, adobe, compositing, animation, motion path, vfx, visualfx, keyframes, adobe boomerang
Id: VVYjp0fy7aA
Channel Id: undefined
Length: 18min 41sec (1121 seconds)
Published: Fri Jul 31 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.