OBJECT TRACKING! (after 1.5 years)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
you know if you gather all the mayans the fortune tellers all the fortune cookies in the world all those things together they could not predict that this tutorial was coming i was hinting at object tracking like over a year ago i think and i never actually followed through so this tutorial is meant to correct that mistake and i'm gonna teach you uh how to do um object motion tracking which is different from camera solving because um in this case we're gonna have a stationary camera and it is the object that is moving uh which you might think okay what's the point why not have a moving camera around a stationary object well if you want physics or anything that depends on the actual velocity angle whatever and general motion of the object you're gonna want a moving object not a moving camera now of course uh you can have a moving camera and a moving object but that's for another year down the line okay i'm stopping here i'm just solving this mistake so uh we're gonna we're gonna do some object solving it's pretty much the same as camera solving with the couple of caveats okay uh so new blender scene i'm using 2.92 doesn't matter what version i'm using i don't know it might that's for you to figure out so movie clip editor again the same way that you do any kind of tracking we're going to start off by importing in our footage for me um i was sponsored by scotch not really um but uh i have a piece of scotch tape lying around and it has a bunch of detail on it so i thought why not track it okay uh footage preparation same as usual render tab color management set this to standard i know if you go if you do control n and start with a v effects it's going to do that automatically but i didn't uh next frame rate is 59.94 in my case make sure to match that and then finally now that we have the color the frame rate matched last thing we need to do is make sure that this is all cached or in other words in ram so the footage plays quickly and that the project endpoints correct set scene frames does the project endpoint now we're going from one to 396 and uh prefetch is going to make it super awkward as we wait for it but what this button does is it loads the whole footage into memory there we go you can tell because the purple's down here okay cool um i'm not going to bore you with tracking every single point instead let me show you a trick to kind of speed up the workflow first of all i'm going to enable some like stuff or rather change some stuff for trackers we're going to add i'm going to enable normalize i always do that that makes it invariant to lighting changes somewhat i'm also going to make the search size a bit bigger but not by much if it's too big it's going to slow everything down okay and otherwise i think it's fine okay now holding d for annotation tool i don't know why it's a d is the shortcut but whatever you hold d i'm going to drag around our object why because i'm going to have blender automatically add trackers and we want to tell blender hey dummy only keep it inside this area we don't want to track anything else because unlike camera tracking if you're doing an object you only want trackers on that object not anywhere else in the scene and we're gonna assume that this camera's on a tripod even though it's not okay so draw that detect features is going to automatically add trackers which coincidentally only added stuff here since it's in focus but by the way if we take the distance and start bringing it down not too much or it's going to actually freeze so bring it down to like 50 or so and then also bring down the threshold in other words what conditions need to be met for it to be a tracker you're going to see it's going to start adding stuff outside here so instead of placing them on the whole frame of course we're going to place them inside the annotated area okay a couple other things to add a couple trackers you can take the margin down a bit might not affect anything this is basically saying trackers can be added very close to the rim of this annotated area bring down the threshold a bit more just add in a few more trackers we want something like 40 or 50 and let me also bring down the distance a bit okay we might need more trackers we'll see generally you need eight so it was a joke it's gonna be fine okay uh now that we have all our trackers we can take the annotated area and uh remove it and recently there was an update to tracking that made uh tracking a bunch of stuff not just one tracker at a time uh significantly faster i think they said 25 times faster so let's uh test it track is uh control t yeah that is tracking pretty quickly okay so i'm going to take all these trackers ctrl l to lock them now i know what you're thinking some of these trackers are hard hot garbage how do we know which ones are bad without kind of taking forever to kind of pinpoint them uh well that's what graphs are for we're gonna go to graph and control middle click drag it's hard to describe what i'm doing control middle click drag to rescale this okay um this graph is showing the x and y data of all the trackers you're going to notice some of them are not very in sync with the general stream or flow of this right there's a bundle and that's the general motion of the object these are the ones that tend to deviate so i'm just gonna x to delete and basically each one of these and let me just and i know i know this is turning into much more of a tracking tutorial let's set this to clip than i was expecting but whatever may as well every time we select a curve it's going to select a different tracker so i select this one apparently it's this tracker we delete it and i'm just looking for trackers and there's a way to filter these kind of automatically and i'll show you kind of how to do that but generally i'm just going to look for ones that look out of sync and it should be pretty obvious which ones those are until we have a bundle and sometimes uh there's an argument to be made like is this tracker bad maybe you could even i think you have to unlock whoops didn't want to do that i think you can unlock the tracker and actually manually change the placement of this so let's say we do this tracker we want to unlock it but first we need to select the tracker track unlock i think you can even take a single point and drag it just to correct it like that um that's a thing you can do i'm not gonna i'm just gonna delete the track just so you know it exists okay um okay so this is a general pretty good thing maybe you want to get rid of this one point is whenever you're done make sure you have at least eight trackers okay uh let's bring this up let's save our valuable progress which we should call that valuable progress but not three s's two s's why does it do that it always like assumes there's a folder i'mma call it a bug whatever now we have our trackers that have been filtered and um this is where it starts uh changing before we filter actually know what i guess we could filter the track but no no let's let's move on uh too much tracking stuff this is where it starts getting weird because normally uh at this point in the process we have our trackers we're happy with them we go to solve pick some settings and do solve camera motion although this time it's not a camera it's an object right so what you are going to do is you're going to go to objects in other words this is the well i don't want to say the word objects this is collections of trackers where it can either be for the camera or for a object right this object is going to be our scotch tape okay and notice that the camera has the trackers scotch doesn't if we add a new tracker here and like track it forwards then this tracker will exist for this one and all the others for that one right they're kind of collections of trackers or objects that we're tracking for the camera we don't actually want any trackers we want to take all of them control c scotch control v we've copied over the tracker so now they're identical and for the camera i'm going to select all these trackers and delete them so the camera um we're not we're not doing anything right um if we have a moving camera and object we would want to do both but we're doing only object for this one right so this is gonna have no tracker since we're assuming it's on a tripod and the scotch does and when we are selected on this object you're gonna see we have solve object motion not solve camera motion solve object motion couple things about this first of all the error that we're going to get which is up here when we click this generally it's going to be higher because all the trackers are only in a small part of the frame and generally it's harder to get accurate object information than camera information that's not always true but it depends okay um so with our object selected just like you know camera tracking we need to select a keyframe or sorry we can have it automatically select keyframes or pick values again these are two frames uh where our trackers have a bit of parallax going on so i like this tilt so relative to each other these trackers are moving quite a bit so i'm going to have it start on frame 77 where it's nice and level and then i do my tilting which gives us a nice second reference point uh that's frame like 93 i guess okay so let's just solve object motion and you can see we get a solver of about you know it's actually infuriating that it's not exactly but we get an error of one pixel okay generally pretty good with camera you want to get down to like .65 pixels or below but honestly this is fine now how do we lower this error and what things do we have to consider well first of all we didn't do our camera solve which is fine it's on a tripod but what does matter is this in our camera options we still have a focal length and the object trackers and the solve is still dependent on that stationary camera which has some kind of focal length now you might not know this number so what you could do is you could be like oh not 24 you could try 30 and then solve again and see that the error went down so maybe it's closer now in this case that's not true lower error doesn't always mean more accurate um in this case i believe i filmed at something like 18 um not 188 18 error might go up but uh technically this is more accurate right so kind of like a kind of like a what's it called plus and minus cons and benefits whatever point is it's worth uh putting in your accurate focal length if you know it's even if you don't have a camera solved okay now how do we take this error which has gone up again this is acceptable it's an object solved but how do we take this and make it lower well this is the thing i was hinting at before that i didn't want to do them and there um you're gonna see that now that we have an object solved we get this blue line which is representing our overall kind of like average error uh for this object solve you want this to be near zero but on average it's like 1.32 right uh what we want to do is look at these individual trackers and see which ones are the bad ones right so you can enable info and each of these trackers so this one has an error of 1.09 that's a good one because it's below the average but some of these and i'm just looking 1.69s above so maybe we'd want to correct that okay how do we do this nice and visually well there is a button for it i always forgot it yeah show tracker error is going to show all the errors and of course just like last time this one has a high average area you can see this is 2.36 so it corresponds we take it we delete it or or if you want to be controversial uh technically the thing you want to do is not delete it but instead take the weight in other words the contribution it has to the solve and just bring it down okay so it's better than deleting it because we still get a tiny bit of information from it so i'm just going to do that for a couple of these now some of these are unredeemable this one's garbage so just delete that tracker right but in general that's what we want to do okay um so now that we've done that of course nothing's changed because now we have this new weights and we deleted a track or two uh now that we have that we need to resolve and now we get 1.12 we already you know brought it down by 0.2 pixels you could go crazy with this and get really refined about like what does and doesn't qualify but once we get near like one pixel like we are now we're in very very good shape so i'm just going to bring this one down a bit and whatever 1.1.09 is i guess okay enough to settle with okay um cool now here's the second part uh where object solving gets very different from camera solving right normally what we do and you can kind of do this here you have your floor set origins right we want to orient our solve into the scene but you can see normally when we do this we'd have a moving camera and stuff like that this has not visibly broadened this information into the v port right here's how we do that well first thing you have to understand is again this object solve is camera dependent yes it's on a tripod but the position of the camera matters so for example if i was to take all these trackers i'm selecting all them geometry 3d markers to mesh in other words it's going to spawn in all our points trackers as just uh three-dimensional points uh you can see that it's spawned in front of the camera right if i move the camera and this is something you should be doing to like a place that makes a bit of sense ideally you want to make a good prediction for where your camera was so mine was actually like pointing downwards a bit but that's not too important point is no matter where you put your camera 3d markers to mesh it's dependent on the camera position right if we go into the camera view and actually enable the background quick way to do this movie clip active clip so this is the active clip right you can see all these dots are in the correct place um again this is camera dependent and even if we do this and click play you can see it's not really doing anything it's just imported it on the first frame we could do the same thing again for this frame whatever and create like a bunch of meshes um that's not what we want to do we want some way to actually have a moving object okay so at this point i'm going to close this down how do we do that well for whatever mesh and now this is where it gets very weird for whatever mesh we want to be our object in other words whatever object like i don't know like a cube a sphere whatever that we want to inherit the motion we're actually going to add that in via a constraint okay so what mesh am i going to use well let's use a kind of creative one i'm going to go into edit mode on this tracks thing that we imported i'm going to run a convex hull which i already typed because i practiced this tutorial that's why i'm so good at it convex hull what it's going to do is it's going to run a general you know kind of shitty honestly algorithm to generate a mesh that doesn't have any concavity or whatever based on this right so it's kind of uh tied into our object it doesn't look like it's supposed to with the cylinder and whatever but that's fine now we want this object to be moving with it because in some sense this is the most accurate object we can have to do this you are going to go to constraints you are going to go to object solver now something you might not realize is when you do a camera solve it actually does this automatically it just does a camera solver we have to do it manually so for our object that now has this constraint we wanted to inherit the scotch object um relative to our camera and you're gonna see that what it does is um it's going to do a motion now whoops um you can see it's actually working however it moved out of frame right uh the reason it does this is i don't know but to fix it you want to hit set inverse okay now this is the reason you have to do the set inverse and clear inverse whatever is because sometimes you do have a moving camera and you there's this stuff matters but generally you select these you hit set inverse and now you can see it is moving with it um whereas the camera is a stationary unlike normally we'd have a stationary object and the camera's revolving around it which would look correct from the camera view okay so this is how we do object solving now here's where it gets interesting we can add in another object so let's just do it like this so we can see we can add in another object like a cylinder something that's a bit more accurate and position it where it should be again we can use this mesh and the general tracker dots we imported in just to get a general like sense of where it should be and uh we can do this also from the camera view you could do it like this and reorient it and whatever just so kind of looks correct this is very rough don't expect this to look perfect you can either take this and parent it to this which of course works and now this geometry is a bit more reflective of what we want or let me actually clear that parent so now it's not moving or what you could do is again since this is a constraint uh we can actually do object solver like this like this like this and it's actually nice to do it this way instead of parenting because then you can add in other constraints and stuff like that that kind of stack in an interesting way um but really um at this point so i'm just going to delete the original i guess or you know we could with the original what we could do is get rid of the object solver and also clear all the faces only so we still have the vertices where only faces there we go and i guess also only edges only faces and edges there we go so we still have the vertices these can still be used for alignment on the first frame which is kind of hard to do which is why sometimes you want to reorient your camera and maybe uh link the trackers to it so just so that everything's oriented more nicely so for example you take these uh you parent it here and then you say okay i'm gonna take this rotate it rotate it just so the cylinder's sitting on the floor this isn't technically correct orientation but it does make things uh super easy for us here we go um now it should be much easier to orient our cylinder going to the different views and what was the point the point is you can model all this and get an actual like accurate thing mesh that goes over it and then like parent physics to it and stuff like that but generally i think that's the kind of main coup de gran right this this is how we go from camera solving the little simp little baby brain you know camera solving and go to the chad object solving so there you go um i know this turned into not just like how do we convert it in two minutes but like a fully fledged tracking tutorial uh you're welcome right i know turned into that but um i thought it was worth doing this especially since this tutorial has been on the back burner for a year and again maybe in another year i'll show you how to integrate the two it's pretty much solving for the camera and then the object right but there's a couple caveats right um there you go i guess that's it so at this point this is where the credits roll why do they roll it's because patreon is part of this channel uh the names you are seeing are the 500 to 600 i think we're getting close to 600 again uh some patrons that are getting what what are they getting that you are not they are getting exclusive tutorials that are not available on this channel or the cg matter channel those are only uh for patrons they're getting blend files like this one i'm going to upload with the footage and the track just so you can play with this uh they are getting discord access they're getting behind the scenes they're getting the patreon newsletter which is a little cringy thing that i film every once in a while whatever they get their names in the credits and they get to support both these channels i want to thank all the patrons that's why i always put it in the put them in the credits when possible sometimes it doesn't make sense but this time it does so thank you all the patrons thank you all people that want to become a patron based on this really bad one minute rant that i'm doing and for all the people who do not want that thank you for watching this tutorial it's going to be available for free that's the business model and uh yeah i hope you learned something and literally the best object uh solving tracking tutorial that has ever been put up on youtube i'm you could argue it link me something if something's better but uh again the mayans the fortune tellers the fortune cookies could not have predicted a tutorial this grand yeah okay that's it see you
Info
Channel: Default Cube
Views: 62,725
Rating: 4.9817996 out of 5
Keywords: blender, tutorial, object tracking, motion tracking, tracking, camera solve, object solve, constraints, beginner, easy, 3d, cg, cgi, vfx, animated, animation, movie clip editor, 2.92, 2.9
Id: SbkXb31DrRA
Channel Id: undefined
Length: 19min 1sec (1141 seconds)
Published: Wed Jan 06 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.