My New Favorite Way to Camera Track In Blender

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
there are a ton of ways to camera track inside a blender and so today I'm going to Showcase one of my own methods I've been using for a little bit that will hopefully help you guys out before we get started I just want to say a massive thank you to all my patreon members without your support I don't know if I could provide free content here on YouTube so I really do appreciate it if you are interested in joining I'll actually have some links down below where you can check out some of the amazing perks I offer all right so let's go ahead and jump into it so the first thing I need to do is let's convert our video file into a folder that looks like this which is a image sequence so I'm going to come plus v effect or sorry uh video editing video editing and we can go ahead and add in our movie here so here is my video file I'm going to add the movie strip and then down here I'm not going to use the full uh frame range so I'm just going to set it to end at 200 just so I can uh view this a little easier uh this is where you want to plug in the correct resolution and the uh frame rate so you can see all of those numbers are fine there so I'm going to leave it like that and then in the output tab uh we can come here set a new file location I'm going to save it as PNG I know it's not the best kind of industry standard way but I just want to save on some space for this tutorial and honestly I don't think we're going to need to use all of that extra data so again just a PNG right there going to set it to RGB since we don't need Alpha now PNG is actually a lossless format so we can go ahead and play around with this compression value uh technically we could set it all the way up to 100 to save on all of the space it's not going to uh compress our uh quality of our video it's just going to increase our render time so I'm going to leave it at 15 I feel like that's a good kind of compromise there so once we have all of that set up we can come and render the animation and so once all of that is finished rendering we should have a folder that looks like this where each frame of our video file is basically rendered in its own individual image file and so we have all of this right here from 1 to 200 so that is looking good let's come out to uh add a new general scene and so now we need to go ahead and align our 3D camera to the real world camera inside of our 3D scene the best kind of program to use is fspy for that and so I'll have a link to that down below now we're going to need the fspy program and then we're also going to need a importer add-on for blender and so download both of those two things I'll show you how to install the Importer add-on in a little bit but let's go ahead and jump inside of fspy and open up our image sequence I'm just going to use the first frame and so let's drag that into here I'm going to dim image off and now all we need to do is just align our scene and so we have this X and Y value here it's very nice because we have a a lot of nice lines for this specific scene and so specifically I noticed that these lines are going to be perpendicular to each other just because this uh building is very square and so it's going to be very nice and give us a very good axes inside a blender and so let's just place it there I'm zooming in by the way uh by holding shift and so uh that's how you can just be a little bit more accurate there so I'm going to place these x1's here I'm just using kind of straight lines along these edges here uh and we'll use like the top of this here actually like this line down here we'll use this one instead so that is leave this one actually a little bit hard to see so right there uh so now you can see we actually have our uh center of our scene I like to do some checks before I kind of send this off the blender so we'll do uh the YZ floor you can see that we're having this result I'm basically just checking the kind of line over here to make sure everything lines up and that is looking good and then we'll come to the x z line and then we'll line up this side of the building here uh which that is also looking good so uh now let's uh this is going to be our origin of our blender scene so I do want to Define this so I'll put it on the very edge of our building there so now everything is looking good you can see over here if we check the focal length it's actually giving giving us a focal link now and so that's going to be uh really good to import into blender and give uh some of that camera information there so I'm going to contrl S we'll just save this into a new kind of location here and there we go so now we can come back inside BL blender and we want to go ahead and add uh that camera back into this blender scene so like I said before we're going to need the Importer add-on and so let's go to edit preferences add-ons and then you just want to hit install up there and then locate uh the zip file that you installed from the link down below once you have that installed you should have a window that kind of pops up like this that means that you installed the add-on correctly uh you just want to make sure this is checked and so now with that checked if we go to file import we should see this f-spot down here and so we can click that and then open up that project that we just made okay so here is my FS spy project I can click that and import that into my scene so now we have this as our scene uh if we scroll throughout our footage we can see that we no longer have all of the frames in this is just the kind of singular still that we brought into fspy so what we need to go ahead and do is we need to go ahead and uh camera track this shot and so what I'm going to use is I'm going to use the geometry tracker add-on by keing tools there will be a link in the description below if you want to take a look at that I do believe they have a free Tri version and so definitely go check that out but in order to install that we're going to just going to go to the same process here hit install locate that zip file and then once you have that you should have a uh button that pops up like here the only kind of caveat to this uh that's different is that we do need to have this check down here uh and if you do have a license anything this is where you can uh come and plug in your license and so once we have that enabled if we hit in we can go over to this side and there's a new geot tracker kind of menu here let's create a new tracker and it's automatically detected our camera which is very nice however we don't have any clip data or any geometry data into our scene so let's go ahead and open up our clip that's just going to be your image sequence that you made before so we're going to hit a to select all my image files we open the clip and now if we script throughout we can see we actually have our video file into our camera background and so that's nice uh now let's go ahead and uh first before we do anything we do have to analyze our footage you should see that there's a analyze button here if you haven't uh analyzed it before and so so just click that it'll go forward and backward through your scene basically just getting a lot of the background data you don't have to worry about that it's uh all the stuff that it kind of handles itself uh one thing I do want to call attention to real quick is the camera right now uh actually has that focal length number that we had from fspy into it and so that's the great thing about kind of this workflow is fspy and the geot treer add-on work hand inand with each other it's kind of amazing pairing of add-ons you know that were never kind of meant to work together but just using this method it you know Works flawlessly so that's just a really good uh thing to note is that we actually have some of that fspy data into there so let's click that we do need some geometry right now now we can see we have our origin point and it's basically along this uh basically line of our building and so I want to go ahead and use some of that information so let's bring a new window out here I can go ahead and uh let's add a shift a add a mesh plane and then R rotate that like that I'm basically just going to track this side of the building here I notice uh if I kind of go throughout my footage this side of the building becomes a little bit squished in the frame and so it might uh be a little bit hard to track that and so uh we can see this side of the building is perfectly in frame the uh kind of entire footage so that's my rationale of why I'm just using that side of the building for now for tracking so let's uh come over here uh if you remember we set our world Origins so what I can actually do is hit Tab and I'll hit a to select everything GX and then holding control I can snap it over uh basically so our origin point is on that line now so if I come out of edit mode by hitting tab I can hit s and basically scale that down now so that's really nice to have uh just so you can get very very precise onto that side uh so let's gz move that up and then I already scaled this side I want to try to match uh the kind of side over here so that is looking pretty good and matches pretty well into our scene so uh that's what I'm going to stick with so let's go and save the project uh before I do anything cuz it might crash on us let's join the areas over here and I'm going to go ahead and pick select this to be our geometry so the plane object there so now we have everything ready and set up to uh actually camera track so down here we have a new tracking setting and so usually this add-on is meant to track geometry all this means is that uh this is whatever uh the object that is going to be moving and so we don't want our geometry to actually be moving we want that to be uh still in our scene we want the camera to be moving so I'll hit camera right here and then on the first frame this is the frame that we used inside of FY I'm going to start the pin mode so now you can see that we have this result we basically have this green box right here and that's very important you always kind of want to check that that green box is there uh because if you don't have it that basically means that the model is incompatible with your thing so you might need to find another model uh or anything like that uh and so we do have this green line here so that is good we are ready to start tracking and so for this specific scene is super simple since we already aligned everything and the building is looking correct all we need to do is come over here and press this button button and have it track forward okay so once it's reached the end you can come back and kind of do some uh self-checking right here you can see it's doing a pretty good job of uh you know uh tracking throughout our footage and basically kind of looks like a planer track right now and so uh that is all good you can of course uh do some refinements by adding some pin and everything there I'm not going to be going into uh into depth there uh just because there are plenty of tutorials on this add-on already but uh you can see we've gotten a pretty good result and if we exit out of pin mode now and then we'll kind of exit out of the camera we can see that if we play the footage now our camera is actually moving down here and basically camera track to our scene and so that looks really good and is going to give us a super nice result and so yeah so that's pretty much it now we have our camera track and we are ready to go so let's uh go ahead and do some fun little stuff for this scene so say I wanted to put some CGI on the side of this building here let's uh go ahead and add we'll just add our uh you know trusty monkey in here so right here and then let's just make it on uh to our plane and so I basically whoops don't want to do that side I want to do this side and so we'll just come to the side view here and I'll scale down my monkey uh now this is actually one thing that I do want to kind of call attention to uh the scale of our scene isn't actually set up yet and so let me just position the monkey onto the slide just so we can show that the camera track is accurate and so there it's basically on the side right there and then I can uh go here and I'll just move it kind of up here and we can hide that and I'll close these areas okay so now you can see our monkey is uh tracked onto the side of the building we'll just go ahead and turn some of these off so we can see that uh but yeah so now it's sticking pretty well and is giving us a pretty good result and so uh that's basically it let's go ahead and set up the correct scaling of our scene just because setting up the correct scale of our scene is very important for depth of field for ambient occlusion lighting um bunch of stuff inside a blender even simulation and stuff like that uh if we go ahead I like how I like doing it is we'll go ahead and add a mesh we'll go to Cube and for this Cube if we hit in over here and go to item we can see these Dimensions over here so by default each cube is set to 2 meters in every way what I'm going to do is I'm going to set in the X and Y axis to 0.5 and then in the z-axis I'm going to set to 1.8 and so I pick those numbers because 1.8 is basically 6 feet and so this uh cube right here is basically the height of a average person right now and so that is way too big this person is basically you know like four five stories tall right now and so we basically need to scale this person down so it's the exact kind of height into the scene so let's just uh move him up so he's on the floor plane of my scene right here and then uh what we will notice right here is uh you know we do want to kind of use uh some points of reference into our scene so we actually have a nice kind of guard rail and Bridge up here so we know uh that the person would roughly be ending around right here is kind of what 6 feet would be in this specific scene so let's go ahead and add that in what I want to do is I want to add shift a we add a new empty plane axis so like that and then I want to select all of my objects so I'll select everything besides our Cube object our Cube object we don't want to actually affect uh in the scaling because the scaling is already accurate uh let's go ahead and select our empty last just so it's the active object uh the highlighted yellow one then we can hit contrl p and set parent to object so now that we have that uh we can basically just scale and the whole kind of scene and everything remains accurate however now it's just scaling down our little guy right here and so that's exactly what we want let's scale him down a little bit more and so now if I kind of you know would Place him up here he would roughly be the exact height as we want let's actually uh g y move them over here then I'll gz move them up so you can see uh we're getting pretty close I actually might scale it down a little bit more so something may be like this uh so g y gz and so yeah so now our person is basically just standing on the side of our building right there and so uh that is roughly around what I would expect 6 feet to be in the real world uh and so now we have the correct scene scaled and the reason we did it with a empty is because our camera path is actually not affected you can see all of our camera information is still accurate it's still giving us a good track uh and all of that stuff is set up and so that's kind of my own workflow in order to set up the scale correctly into my scene uh now that we have that we can just go and delete that little guy let's just uh use for reference and so yeah so that's pretty much it we have the scale correctly defined we have everything kind of correctly defined up here and yeah so that's pretty much it uh the only kind of final things I want to talk about and some things to take into consideration uh is that you know with this method we don't have perfect uh you know workflow for lens Distortion and so if you don't know lens Distortion is in every kind of camera lens that we use uh basically towards the edges of the lens there's going to be some warping and some Distortion uh and stuff effects and so uh basically straight lines towards the edge of our frame are going to be a little bit curved and so that uh in the traditional kind of camera workflow that does take that into consideration and actually tries to estimate that however in this workflow it actually doesn't give us any of that information so that's purely something that you're going to have to worry about in the composing space and so the kind of NE uh the final thing that it's going to do is that it's not going to be the most accurate camera track outside of the area that you actually use for the geometry so we can actually see if we kind of scrub through our footage it's doing a pretty good job to actually track to the building however areas out here we'll go ahead and demonstrate that by just adding like a UV sphere out here uh you can actually see if I kind of play this it's jittering around a ton and so we'll just play that you can see it's uh you know bobbing around and everything again that's just because uh we're using only this information in the screen rather uh than in actual camera tracking we would be using all of the kind of pixel data everywhere uh to get an accur track so just keep that in mind again uh if I was using and adding CGI out here uh this would probably be where I'd go back into the traditional camera tracking realm uh but again since for this shot you know say I get a client shot who just wants to add a object on the side of the building uh this is the use case I would do for this specific camera tracking so hopefully that gives you an idea of when to use this versus when not to use this and so uh that's pretty much it from here you would just be adding some CGI and some uh you know stuff to the building whatever you wanted to use there uh and then going into compositing into composite this real Ally but anyways that's pretty much my entire process hopefully you guys found this useful and can apply it to your own workflow now if you made it this far in the video i' greatly appreciate it if you liked and subscribed as it would greatly help me out also if you want to continue your learning I actually have a full visual effects course where I go a little bit more slower pace for you beginners out there so I'll definitely have a link down below for that if you are interested anyways thank you so so much for watching and I will see you in the next video
Info
Channel: Jacob Zirkle
Views: 38,270
Rating: undefined out of 5
Keywords: blender vfx, visual effects, tutorial, vfx, vfx tutorial, blender vfx tutorial, cgi, how to, blender tutorial, blender visual effects tutorial, how to camera track in blender, camera tracking, camera tracking tutorial, blender camera tracking, match moving, blender match moving, geometry tracking, geometry tracking blender, how to track geometry in blender, camera, track, tracking in blender, blender tracking, blender vfx camera tracking
Id: -1cLxHMLex0
Channel Id: undefined
Length: 15min 55sec (955 seconds)
Published: Mon Mar 11 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.