[Script Info] Title: [Events] Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text Dialogue: 0,0:00:00.08,0:00:01.75,Default,,0000,0000,0000,,>> I'm going to show you how to put a 3D object Dialogue: 0,0:00:01.75,0:00:05.06,Default,,0000,0000,0000,,into your video using the camera\Ntracking features in Blender. Dialogue: 0,0:00:05.06,0:00:08.32,Default,,0000,0000,0000,,And if you want to follow along with me\Nin this tutorial, click the link below Dialogue: 0,0:00:08.32,0:00:10.47,Default,,0000,0000,0000,,to download this exact video clip. Dialogue: 0,0:00:10.47,0:00:13.89,Default,,0000,0000,0000,,So open up Blender and go into the\Nmotion tracking tab by clicking here. Dialogue: 0,0:00:13.89,0:00:15.34,Default,,0000,0000,0000,,Then here. Dialogue: 0,0:00:15.34,0:00:18.33,Default,,0000,0000,0000,,You can either drag your footage in here, Dialogue: 0,0:00:18.33,0:00:20.60,Default,,0000,0000,0000,,but I'm going to click open\Nand select our video clip. Dialogue: 0,0:00:20.68,0:00:24.16,Default,,0000,0000,0000,,The first thing I'm going to do is\Nclick on set scene frames so that in Dialogue: 0,0:00:24.16,0:00:26.79,Default,,0000,0000,0000,,and out points matches the\Nlength of the video clip. Dialogue: 0,0:00:26.79,0:00:29.57,Default,,0000,0000,0000,,Then click on prefetch to\Nload the clip into memory. Dialogue: 0,0:00:29.61,0:00:32.16,Default,,0000,0000,0000,,Then under tracking settings,\NI'm going to set the motion model Dialogue: 0,0:00:32.16,0:00:34.99,Default,,0000,0000,0000,,to affine and the match to previous frame. Dialogue: 0,0:00:35.10,0:00:37.66,Default,,0000,0000,0000,,Affine takes into account the\Nperspective changes in the shot. Dialogue: 0,0:00:37.66,0:00:41.85,Default,,0000,0000,0000,,And previous frame basically just tracks the\Npattern from the current frame to the next one. Dialogue: 0,0:00:42.02,0:00:43.87,Default,,0000,0000,0000,,Then I'm going to tick normalize. Dialogue: 0,0:00:43.90,0:00:46.15,Default,,0000,0000,0000,,This makes sure that if there's\Nany changes in light Dialogue: 0,0:00:46.15,0:00:48.82,Default,,0000,0000,0000,,in the video clip, the track\Nis not affected by it. Dialogue: 0,0:00:49.01,0:00:53.28,Default,,0000,0000,0000,,Now that's done, I'm going to go to the\Nfirst frame by pressing shift arrow, Dialogue: 0,0:00:53.48,0:00:55.74,Default,,0000,0000,0000,,and then click on detect features. Dialogue: 0,0:00:55.74,0:00:58.20,Default,,0000,0000,0000,,Now these boxes on the scene\Nare tracking markers. Dialogue: 0,0:00:58.26,0:01:00.87,Default,,0000,0000,0000,,They track points of contrast within the clip. Dialogue: 0,0:01:00.94,0:01:05.31,Default,,0000,0000,0000,,Now I want more tracking markers, so I'm going\Nto click on this little tab on the bottom left. Dialogue: 0,0:01:05.35,0:01:08.11,Default,,0000,0000,0000,,I'm going to change the threshold to 0.1. Dialogue: 0,0:01:08.11,0:01:10.83,Default,,0000,0000,0000,,I'm going to change the distance to, say, 50. Dialogue: 0,0:01:10.91,0:01:13.77,Default,,0000,0000,0000,,And I'm going to set the margin\Nfrom the edge of the frame, Dialogue: 0,0:01:13.77,0:01:16.92,Default,,0000,0000,0000,,or the borders of the frame, to about 50 pixels. Dialogue: 0,0:01:17.06,0:01:21.01,Default,,0000,0000,0000,,Now if you go into our tracking setting\Nover here, we need to set the value Dialogue: 0,0:01:21.01,0:01:24.10,Default,,0000,0000,0000,,of this margin lower than the\Nvalue of the other margin. Dialogue: 0,0:01:24.10,0:01:25.85,Default,,0000,0000,0000,,So I'm going to set this to about 40. Dialogue: 0,0:01:25.85,0:01:29.94,Default,,0000,0000,0000,,Now, with all the markers selected, I\Nwant to press control T to track forwards. Dialogue: 0,0:01:31.14,0:01:31.96,Default,,0000,0000,0000,,Yeah, brilliant. Dialogue: 0,0:01:32.03,0:01:35.18,Default,,0000,0000,0000,,Once you've finished tracking forwards,\Nmaking sure all the markers are highlighted. Dialogue: 0,0:01:35.18,0:01:37.44,Default,,0000,0000,0000,,And if you want to highlight all the\Nmarkers, just hover your mouse over here Dialogue: 0,0:01:37.44,0:01:40.40,Default,,0000,0000,0000,,and press A. Now I'm going\Nto press H to hide them all. Dialogue: 0,0:01:40.40,0:01:44.38,Default,,0000,0000,0000,,And while still being on the last frame, I'm\Ngoing to once again click on detect features Dialogue: 0,0:01:44.46,0:01:46.29,Default,,0000,0000,0000,,to bring up all the tracking points. Dialogue: 0,0:01:46.29,0:01:48.72,Default,,0000,0000,0000,,And I'm fully happy with these tracking\Nmarkers so I'm going to track backwards Dialogue: 0,0:01:48.72,0:01:52.98,Default,,0000,0000,0000,,by pressing shift control\NT, or control shift T. Nice. Dialogue: 0,0:01:53.65,0:01:55.52,Default,,0000,0000,0000,,Next, I want to reveal all the trackers, Dialogue: 0,0:01:55.52,0:01:58.27,Default,,0000,0000,0000,,so I'm going to press alt H\Nto bring up all the trackers. Dialogue: 0,0:01:58.43,0:02:00.61,Default,,0000,0000,0000,,Now we have a couple of trackers\Nthat are problematic. Dialogue: 0,0:02:00.61,0:02:03.29,Default,,0000,0000,0000,,For instance, maybe these ones\Nhere that follow the cars. Dialogue: 0,0:02:03.29,0:02:05.62,Default,,0000,0000,0000,,So what I'm going to do, you\Ncan either delete them manually Dialogue: 0,0:02:05.62,0:02:07.66,Default,,0000,0000,0000,,by selecting them and pressing X to delete. Dialogue: 0,0:02:07.66,0:02:11.52,Default,,0000,0000,0000,,Or you can also click on solve right here. Dialogue: 0,0:02:12.06,0:02:17.82,Default,,0000,0000,0000,,Then select cleanup to get rid of any glitchy\Ntracks or tracks that have high error value. Dialogue: 0,0:02:17.82,0:02:19.70,Default,,0000,0000,0000,,I'm going to click on filter tracks. Dialogue: 0,0:02:19.70,0:02:22.17,Default,,0000,0000,0000,,And, as you can see, it's selected\Nall the markers that are glitchy. Dialogue: 0,0:02:22.17,0:02:26.93,Default,,0000,0000,0000,,So all I have to do is hold my mouse\Nover the footage, press X and delete. Dialogue: 0,0:02:26.93,0:02:30.01,Default,,0000,0000,0000,,I'm going to go halfway throughout\Nthe clip and select filter tracks. Dialogue: 0,0:02:30.01,0:02:30.77,Default,,0000,0000,0000,,And there's none. Dialogue: 0,0:02:30.95,0:02:34.36,Default,,0000,0000,0000,,And just to make sure, I'm going to go to\Nthe last frame and select filter tracks. Dialogue: 0,0:02:34.49,0:02:36.02,Default,,0000,0000,0000,,And there's none showing up, so that's good. Dialogue: 0,0:02:36.23,0:02:42.23,Default,,0000,0000,0000,,Okay, so next, while still on the solve tab, I'm\Ngoing to select focal length and optical center. Dialogue: 0,0:02:42.49,0:02:47.04,Default,,0000,0000,0000,,Then for keyframe A and B, so you want to pick\Na frame range where the camera is moving a lot Dialogue: 0,0:02:47.04,0:02:49.22,Default,,0000,0000,0000,,so Blender can actually track the shot. Dialogue: 0,0:02:49.22,0:02:52.72,Default,,0000,0000,0000,,So I'm going to pick a frame range\Nbetween 100 to, say, frame 180. Dialogue: 0,0:02:52.82,0:02:56.53,Default,,0000,0000,0000,,I've just seen some tracks that are\Nwild, so I'm going to delete them now. Dialogue: 0,0:02:56.73,0:02:58.32,Default,,0000,0000,0000,,Like so. Get rid of this. Dialogue: 0,0:03:01.17,0:03:02.97,Default,,0000,0000,0000,,Get rid of that one. Dialogue: 0,0:03:02.97,0:03:03.70,Default,,0000,0000,0000,,Yeah, that's cool. Dialogue: 0,0:03:03.70,0:03:04.18,Default,,0000,0000,0000,,That's fine. Dialogue: 0,0:03:04.18,0:03:06.97,Default,,0000,0000,0000,,Now I'm going to click on solve camera motion. Dialogue: 0,0:03:07.31,0:03:12.35,Default,,0000,0000,0000,,And we have a solve error\Nof 0.35 which is fantastic. Dialogue: 0,0:03:12.46,0:03:14.25,Default,,0000,0000,0000,,Any solve error below a pixel is good. Dialogue: 0,0:03:14.25,0:03:16.72,Default,,0000,0000,0000,,And anything below 0.5 is great. Dialogue: 0,0:03:16.72,0:03:20.62,Default,,0000,0000,0000,,Any solve error above one pixel is\Nnot a good track, I wouldn't use it. Dialogue: 0,0:03:20.69,0:03:23.80,Default,,0000,0000,0000,,Now in the scene setup, on the\Nleft, click on set as background. Dialogue: 0,0:03:23.80,0:03:25.100,Default,,0000,0000,0000,,And, as you can see, it puts the\Nvideo in the background of the camera. Dialogue: 0,0:03:26.16,0:03:28.97,Default,,0000,0000,0000,,Then I'm going to select setup tracking scene. Dialogue: 0,0:03:31.38,0:03:34.99,Default,,0000,0000,0000,,Next, I'm going to hold shift\Nand select these three tracks, Dialogue: 0,0:03:35.31,0:03:37.93,Default,,0000,0000,0000,,and click on floor to set the floor plane. Dialogue: 0,0:03:37.93,0:03:41.69,Default,,0000,0000,0000,,Now I'm going to set the origin of my scene by\Nclicking this track and selecting set origin. Dialogue: 0,0:03:41.69,0:03:46.53,Default,,0000,0000,0000,,Just to make sure that's the middle of\Nmy scene, I'm going to delete this cube Dialogue: 0,0:03:46.74,0:03:48.93,Default,,0000,0000,0000,,and I'm going to go into the layout view. Dialogue: 0,0:03:48.93,0:03:50.92,Default,,0000,0000,0000,,So I'm going to click this tab. Dialogue: 0,0:03:51.95,0:03:56.29,Default,,0000,0000,0000,,Then I'm going to press zero on my\Nnumpad to look through the camera. Dialogue: 0,0:03:56.29,0:04:01.53,Default,,0000,0000,0000,,And I'm going to click this little scroll down\Nbutton here and I'm going to select 3D cursor. Dialogue: 0,0:04:01.53,0:04:04.97,Default,,0000,0000,0000,,Once I've selected 3D cursor, I'm going\Nto make sure my camera is highlighted. Dialogue: 0,0:04:05.02,0:04:10.41,Default,,0000,0000,0000,,And I'm going to place R for rotation and I'm\Njust going to line up the camera's perspective Dialogue: 0,0:04:10.54,0:04:15.44,Default,,0000,0000,0000,,so that the Y direction is going\Nalong the road and the X is going Dialogue: 0,0:04:15.44,0:04:17.96,Default,,0000,0000,0000,,across the road, just like that, in this field. Dialogue: 0,0:04:17.96,0:04:18.96,Default,,0000,0000,0000,,Just so it lines up like that. Dialogue: 0,0:04:18.96,0:04:19.46,Default,,0000,0000,0000,,That's perfect. Dialogue: 0,0:04:19.46,0:04:23.30,Default,,0000,0000,0000,,I'm going to select the scroll down button\Nagain and select bounding box center. Dialogue: 0,0:04:23.30,0:04:25.80,Default,,0000,0000,0000,,Next, I'm going to change the scale. Dialogue: 0,0:04:25.80,0:04:30.62,Default,,0000,0000,0000,,And I'm going to move the plane about here. Dialogue: 0,0:04:30.62,0:04:31.54,Default,,0000,0000,0000,,Yeah, that's nice. Dialogue: 0,0:04:31.54,0:04:32.09,Default,,0000,0000,0000,,That's perfect. Dialogue: 0,0:04:32.09,0:04:32.89,Default,,0000,0000,0000,,I'm happy with that. Dialogue: 0,0:04:33.05,0:04:36.86,Default,,0000,0000,0000,,Now I'm going to press space bar just to make\Nsure that the plane is sticking to the ground. Dialogue: 0,0:04:36.86,0:04:37.56,Default,,0000,0000,0000,,Yeah, that looks good. Dialogue: 0,0:04:37.75,0:04:39.75,Default,,0000,0000,0000,,Now we can easily put a 3D\Nobject into the scene. Dialogue: 0,0:04:39.75,0:04:42.52,Default,,0000,0000,0000,,I'm going to press shift A,\Nmesh, and select the monkey. Dialogue: 0,0:04:42.52,0:04:44.88,Default,,0000,0000,0000,,I'm going to place the monkey so\Nthat it's kind of facing the camera. Dialogue: 0,0:04:44.88,0:04:47.11,Default,,0000,0000,0000,,Also so that it's just sitting above the plane. Dialogue: 0,0:04:47.28,0:04:47.93,Default,,0000,0000,0000,,Yeah, that's good. Dialogue: 0,0:04:48.19,0:04:50.90,Default,,0000,0000,0000,,I'm going to decrease the scale a bit. Dialogue: 0,0:04:51.69,0:04:52.44,Default,,0000,0000,0000,,Yeah, perfect. Dialogue: 0,0:04:52.44,0:04:55.100,Default,,0000,0000,0000,,Now I'm going to go into render view by\Neither pressing Z then clicking render. Dialogue: 0,0:04:55.100,0:04:58.38,Default,,0000,0000,0000,,Now, as you can see, we can't\Nreally see the video footage. Dialogue: 0,0:04:58.51,0:05:01.79,Default,,0000,0000,0000,,But to show the video clip, click\Non the render properties tab, Dialogue: 0,0:05:01.90,0:05:03.78,Default,,0000,0000,0000,,go to film, then select transparent. Dialogue: 0,0:05:03.78,0:05:06.32,Default,,0000,0000,0000,,And we can now view the clip through the camera. Dialogue: 0,0:05:06.32,0:05:07.86,Default,,0000,0000,0000,,Now, as you can see, we don't\Nhave any shadows cast. Dialogue: 0,0:05:07.86,0:05:09.80,Default,,0000,0000,0000,,That's because we need to bring the ground plane Dialogue: 0,0:05:09.80,0:05:12.10,Default,,0000,0000,0000,,from the ground collection\Ninto the foreground collection. Dialogue: 0,0:05:12.17,0:05:13.48,Default,,0000,0000,0000,,So I'm going to do that. Dialogue: 0,0:05:13.78,0:05:17.62,Default,,0000,0000,0000,,I'm going to change the light to a\Nsunlight by clicking on this light. Dialogue: 0,0:05:17.96,0:05:20.87,Default,,0000,0000,0000,,And clicking on the light\Nproperties and selecting sun. Dialogue: 0,0:05:20.87,0:05:23.75,Default,,0000,0000,0000,,I'm going to decrease the\Npower to about three or five. Dialogue: 0,0:05:23.95,0:05:28.46,Default,,0000,0000,0000,,And I'm going to change the angle to match\Nwhere the sun is coming from in our clip. Dialogue: 0,0:05:31.05,0:05:35.23,Default,,0000,0000,0000,,And I'm going to change the angle\Nso that the shadows aren't so harsh. Dialogue: 0,0:05:35.23,0:05:36.18,Default,,0000,0000,0000,,Nice. Perfect. Dialogue: 0,0:05:36.44,0:05:39.92,Default,,0000,0000,0000,,Now there's a lot of other things you can do\Nto increase the realism of this object fitting Dialogue: 0,0:05:39.92,0:05:44.34,Default,,0000,0000,0000,,in this clip, like adding realistic reflections,\Nlighting with a HDRI, adding blur and glare. Dialogue: 0,0:05:44.34,0:05:46.02,Default,,0000,0000,0000,,But I'll cover that in another tutorial. Dialogue: 0,0:05:46.07,0:05:49.05,Default,,0000,0000,0000,,There's also several other ways you\Ncan track a more difficult shot, Dialogue: 0,0:05:49.05,0:05:51.02,Default,,0000,0000,0000,,and I'll also cover that in another tutorial. Dialogue: 0,0:05:51.02,0:05:53.78,Default,,0000,0000,0000,,But, for now, I hope you learned something\Nnew and any questions let me know. Dialogue: 0,0:05:53.83,0:05:54.81,Default,,0000,0000,0000,,And I'll see you in the next one. Dialogue: 0,0:05:55.06,0:05:55.45,Default,,0000,0000,0000,,Take care. Dialogue: 0,0:05:55.45,0:05:55.78,Default,,0000,0000,0000,,Cheers. Dialogue: 0,0:05:56.52,0:06:14.23,Default,,0000,0000,0000,,[ Music ]