 This video is part of a series. Check out the link in the description to the full playlist. If you get to videos that are mark private, that's because they haven't been published yet. And last time I showed you how to do basically just overlay some 3D objects over a video very simply. Today we're going to do it again, but we're going to do some motion tracking with it. If you've watched my videos over the last couple of days, I've uploaded the test videos that I've created for this. Go ahead and grab those if you want to use those or use your own videos. I'm using Blender 2.78a, which is the most current, I believe, at the time recording this, although I think they're getting ready to release a new release. And what I'm going to do first thing is I'm going to set the frame rate over here to 30 frames a second, because that's what my video clip is at. Again, that was more important in older version of Blenders. In a lot of instances, when you import videos into Blender now, it will ask if you want to adjust that and usually the default is yes. But let's go ahead and get started. So, in the 3D view, I'm going to hit one and I hit Control-Alt-0 to move the camera to the front view. And then I'm going to go back up here and I'm going to go into where it says motion tracking. Here I'm going to click Open and I'm going to choose a video that I have already recorded. Open, Center-Scroll to get back out. Now we can click Pre-Fetch and you'll see this line getting darker purple, or I guess it's a lighter purple. But for me, it's only getting about halfway and that's because of the quality of my video. By default, Blender only gives you about a gig of cash for videos. And this has to do with your RAM. So, be cautious with this, but we're going to go up to File, User Preferences, Over to System, scroll down and I'm going to change this. Since we're about halfway, two is probably enough, but I'm going to set it to three gigs, so 3,000 for me. And now, I can close this and I'm going to Pre-Fetch that. And what that will do is load the video to RAM so there's no... Otherwise, when you go to Play, it might be jerky if it's a higher quality video. Now, I can play the whole thing by hitting Alt-A without it being jerky at all. So, I'm going to escape. We're at our first frame here, but we don't need this first part of the video, so let me find right here where I start talking basically, which has around 30 frames. So, start frame to 30 right here. And at the end, we're going to go a little past here, a little further. And it looks like I'm done talking and smiling. Hey, about 333, that's what it was last time. I'm just eyeballing this. So now, we have all that. And again, I'm going to click Pre-Fetch, or let me hit... Go make sure we're at the first frame here and the Pre-Fetch is completed. Now, we're going to do some motion tracking on this screwdriver I'm holding because it was something that was lying on my desk when I went to record this. You know, it's even in this first frame, it's already blurry. So, we might need to give it a little help along the way, but for most part, I think we'll track it pretty good. Blender does a pretty good job. And I think it's Control-Click. Yep, Control-Left-Click, we'll place a marker, and then S to scale it up. So, I have it on the head of the screwdriver here. I'm going to make some changes over here. Instead of Match Key Frame, I'm going to say Match Previous Frame. I find that that works better. And then here, the track settings, there's a default and that it should be set by default, but it's at Fast, I guess it's remembered from what I did last time, I guess. Fast motion is what we're going to select. I watched a video saying that that tends to work better. So, let's go ahead and give this a go. Make sure we're at the first frame. We're going to click this button here or press Control-T, it will start tracking. And you see it's lost the track a little bit. So, all we have to do is hit G, reposition it slightly and hit Control-T again. It will start tracking again. Tracked quite a bit more. Again, we're just going to move it, Control-T again. And basically, I'm moving it so fast, it gets kind of blurry so Blender kind of loses it. But it's doing a great job. I only had to move the marker two or three times during that and it did the other 328 frames for me, which is a lot better than trying to track it by hand and it will look a lot better than tracking it by hand. But I can hit Alt-A at this point and you can see the track marker tracking the screwdriver. Perfect. So now at this point, up in the 3D view here, we never delete our cube, so I'm going to delete that. And over here on Solve, with that marker selected, I'm going to scroll down to Geometry and I'm going to say Link Empty to Tracker. And it put an empty here. So now we can go back to our 3D view. We're done with the tracking. So I'm going to go back here to Default and here you can see there's an empty, which is basically a marker you see in editing here, but it will not render out. I can hit Alt-A and you can see it moving around. But what's it moving around to? Well, with your cursor over the 3D view here, make sure it's over the 3D view, hit N, scroll down. Just like we did in the last video and choose Background Images, Add Image, check this to Movie, Uncheck Camera Clip. And then instead of clicking Open, we've already imported our video, we click this drop down here and choose our video. And now, if we go over the 3D view here and hit Alt-A, you can see the empty is now following the video. So let me go ahead and drop in some text and I'm going to hit RX90 to rotate it, Enter. Tab to edit that. Again, I'm going to leave it as the default text. I'm going to do some flat text here. You may want to change the font under the Font tab. I talked about that in previous videos. And I'm just going to type, this is a screwdriver. Tab to get out of edit mode. And I'm just going to hit S to scale that down to about there. I'm going to put it right there. And if I hit F12 now, you'll see it renders out. It looks black because the light is behind it. In this particular case, I'm going to do something different than I did in the last video where we added some lighting. I'm actually going to add a material to that. I'm going to set it to total white, but it'll still render out black at this point because there's no light on it. But I'm going to say, shadeless. And that just makes the whole thing white. And this is good for text, something like this. Otherwise, lighting will affect it, and there might be shadows cast on your text. So we have that. Next, I'm going to add a little pointer, just a little line. So I'm going to hit space and I'm going to type in plane and choose add plane under mesh. RX90 to rotate that. I'm going to scale it down quite a bit. Scale it on the Z. Scale it on the X. Make it a thin line. I'm also going to make it the same material as the text. I'm going to rotate that. Move it to here, rotate it a little bit more. Scale it down. So I have a little marker going to that. And the empty is following our screwdriver but the text and the line isn't. So we're going to choose our text, shift select the line or any other object you want, and then shift select the empty and hit control P. Make sure the empty is the last thing you select and click parent to object. Now, Alt A and it plays and you see everything is tracking. If we hit F12, you'll see our text there with a great background. We went over this in the previous video. I'm going to go to render settings here down to shading and change alpha to transparent. Hit F12 and now we have a transparent background with our text that we can overlay on our video. Just like we did last time, we're going to go to composite, choose node backdrop and auto render if you want. And I'm going to up here in our node editor, hit shift A, input and choose movie clip. And again, movie's already been imported. So instead of open, we're going to click the drop down here, choose our video clip. Grab it, right click and G. So we're using G, the same keys you do in the 3D editor. So G to drag things around to grab them, G for grab. And we're going to hit shift A and we're going to go down to color, alpha over, put this here, put the again, top video in the bottom input and the background video in the top input, kind of counterintuitive, hit F12 again. It's not lined up right. You'll notice that it isn't pointing at screwdriver again. As we talked about in previous video, you'll notice it's cropping. That's because we're rendering at 50%. Let's go ahead and hit shift A, distort, scale and drop it in there. And now let me zoom in so you can see here. Instead of relative, I'm going to choose render size. Now if I hit F12, you can see it's rendering out properly. And that is it for all of that, except for our audio. Let's go into our video editor here and we're going to again go add, movie. Go to our movie clip, make sure sound is selected, set the start frame to one and hit add clip. And again, the bottom clip is your video so you can right click that and hit delete. We'll go back to our default view here and now we have to make sure we set this to a video output. So I'm going to choose Xvid, but you can choose any of these formats that you prefer. Under encoding, even though I choose Xvid, it doesn't necessarily set it to Xvid. Interesting, it's always been like that. Under presets, I'm going to say Xvid and that will change our format to Xvid. And we have to choose an audio if we want audio output. And again, I'm just going to choose MP3 just because it's right there. And now give our video a name and I'll call it basic motion tracking with Blender 3D. Take example, .avi. And now scroll up here instead of hitting render, we'll hit animation. And you might be like, oh no, it's not running in the background all the time. And that's just because it's rendering our 3D scene and then it's throwing the video back there but the video takes so little processing power compared to rendering the 3D view that it goes onto the next frame before you see that. So don't worry if some of the frames look like there's no background. As long as you see it occasionally like this, you should be fine. And right now it's rendering pretty fast. I mean, it's pretty simple. It's not very complex. And it's rendering each frame in a 15th of a second, not a 15th of a second. Yeah, .15 seconds for each frame. In fact, we're almost done. We're at frame 270 and we're going to 333. So that's it. That's how you do that. I do thank you for watching. I hope you have a great day. Please visit my website, filmsbychrist.com. That's Chris of the K. There should be a link in the description of this video. Also a link to my Patreon page, patreon.com, forward slash middle X 1000. And I just realized I rendered this out at 50%. That's why it was rendering so fast. Still shouldn't take that long. So I'll just change that. And again, I'll hit animate and it will automatically override that. A little bit slower, a little less than half a second for most of the frames. Anyway, yeah, my Patreon page, patreon.com, forward slash middle X 1000. Go there to support my channel if you enjoy my videos. There's also a PayPal link on my website. Link's in the description. As always, I hope that you have a great day. My name is Chris, but this is a test video and this is a screwdriver. That's right. This is a screwdriver. Have a great day.