How To 3d Motion Track a Camera with Boujou - Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
what's up filmmakers and visual effects artists of YouTube Brian Constantino with upper state entertainment coming at you again today with a tutorial on how to 3d motion track a scene with buzu it's really important to be able to know how to accurately and correctly motion track a camera and today I want to show you how so let's get right into it motion track is important for a lot of reasons but two of the most important is that a nothing screams amateur more than an object that's shaking around and isn't really locked onto the the plate the the raw video that it's been that's been recorded and be it's really important to have the scene coordinates and geometry be aligned to the scene correctly where you can pass the project file between After Effects and cinema 4d and other programs without needing to realign the the visual effects elements so let's get started okay so once you have booze you open the first thing you're gonna need to do is import a sequence now you might have heard that you have to use a JPEG sequence in order for it to work correctly but this is not true you can use lots of different file types with Buju I've had success with everything from JPEG sequences to TIFF sequences to even the raw pro res files loaded directly into the program okay so once you have your image sequence or your video file loaded into the program you'll need to select a frame rate for the project that you're working with in this case it's gonna be 24 because that's how I like to work once you select your frame rate you can click apply and then you can see that for whatever reason it looks like it's a little bug or something it'll jump back to 25 all you have to do is just go back to 24 and click apply again and it'll stay and the first thing you're going to want to do is add a poly mask to mask out anything that's not part of a stationary object inside of your scene and what that's doing is telling Buju hey don't look at any of the pixels that are contained within these areas because they could move during the course of the shot and providing inaccurate results all you have to do is click on the add poly masks create your mask and you can flip down the masks button here to look at all of your keyframes in that sequence and then all you have to do is go forward and backward in this case it's actually fairly easy because you know my two actors they're not really moving at all so you could probably get away with motion-tracking this shot without even doing the masks but trust me it's a really good habit to get into because it'll save you some headache in the long run with with in terms of solving the camera after you're done creating all of your masks you ready to go ahead and track the scene when you're ready to track go ahead and click the track features button in the tool box and it'll bring you a dialog box with a couple of options up top here you can either select to track all of the frames or just a selected range and of course you can click the advanced button to see additional features the adaptive search window allows you to define a minimum search distance and maximum search distance based on a particular grouping of pixels it looks kind of like this where you've got the blue box is the distance in which the computer will search for this particular grouping of pixels so if you have a camera movement that's really shaking it's got a lot going on what you'll have to do is increase that maximum search distance for how far the the computer is going to be looking for this particular tracker and of course it'll do this adaptive search for all of the points in the entire scene at the same time the sensitivity allows you to define the amount of points in the scene that are being tracked now simply turning up the sensitivity is not necessarily going to get you a better track all that means is that the computer is going to pull out more features in the scene and begin tracking them but just because there's more features doesn't necessarily mean that it's going to be better what you want is a higher quality features the feature scale whether it's using normal or larges will be mostly dictated by how much motion blur you have in your scene I often have to use large features because I always shoot at a 50th for all of my movies and that gives you that natural kind of filmic motion blur that everybody likes lastly the channel select allows you to determine whether you want the computer to motion track features sit in the blue channel only the green channel only the red channel only or any combination of those three for this case we're just gonna leave all three of them on and we're going to start and if you'll notice that there are no features being picked up on the two actors in the foreground because we mask them out with a poly mask before we started and after that's completed you're ready to go ahead and solve the camera and again you can do all frames or the selected range and and down here in the advanced solve refinement section you can click optimize camera path smoothness I tend to leave this off because I find that every once in a while it can smooth out some of the jittery shakiness that you get with a handheld camera and I think in those situations it actually makes the track less accurate so when you're ready go ahead and click start and it'll solve the entire sequence okay so after you're after you've got your predictions you can click on the 3d button in the upper left hand corner on the toolbar and it'll give you an idea of what the scene looks like and then the next step you're gonna want to do is work on the scene geometry the scene geometry is important because you have to orient your scene in order to be able to accurately work with objects and other 3d programs if you were just to you know jump out in 3d space and then use the manual movement to you know to to adjust the scene like this it'll never be as accurate as it needs to be in order to interact with objects you know during a visual effect sequence okay so first things first when you're doing the scene geometry is you need to add an origin this is going to be the zero zero zero coordinates in a lot of your 3d programs like cinema 4d or MI or whatever so you just all you have to do is click Add coordinates from hint and the defaults type is going to be origin so I have to do is select a point inside of your scene where you want that zero zero zero coordinates to be in some cases it might be up in the corner or in the back of your scene so once you've selected your prediction you can click connect to selected and it'll say that it's connected and of course you can click on the overlays tab and then turn on the ground plane if you want to see what your current scene geometry looks like ok once you've selected your origin you're gonna need to start defining where the x y and z coordinates are located inside of this particular video clip click Add coordinates from hint and then you can see the default is origin but you're going to come over here to type and then use the drop-down box to select a type of coordinates I like to use line parallel to XY and see ax it allows you to select two points that are in a line and and tell the computer that that particular direction that those two lines are parallel to a specific axis now you're gonna find two predictions that are in a straight line from each other on the x axis so what you can do is come in and select a prediction here and then you can hold down the command button or I guess on Windows it would be controlled and select another one and then say and then click the connect to selected button once you've done that click another ad coordinates from hint and then select the next one we're going to pick two predictions here that are parallel to the y axis let's find some and then click connect to selected and then lastly in this case you'll do line a parallel to Z that's the only one that we don't have all right so once you've selected all of your your predictions you can click update coordinates frame and see what you got and then after you update the coordinates in the frame you'll have something that looks kind of like this and you can see of course it's looking a lot better because that ground plane is now matching the floor the first thing we can do in order to increase the accuracy of the track is to use manual target tracks in order to do that you can click on the add target tracks button in the toolbox and then of course select the object that you would like to track you're going to want to move the search distance out in order to tell the computer hey I need you to look all the way out to this blue line in order to determine where the next frame lands in the accuracy of this particular track you can click on the TT button over here on tab on the right which is stands for target track and you can either track one frame at a time going forwards and backwards or you can click the auto track backwards button and it'll just continue tracking from these key frames will change color based on how accurate the computer thinks that that track is so as it travels backwards if it starts to slip or it gets too close to an area that it doesn't know if it's being very accurate it'll start to turn yellow and then red see it down here you can see it's starting to turn orange because it's slipping a little bit and a lot of times it's easier to use a a very sharp edge or an area of contrast for your manual target track that way you can click and add keyframes when necessary after you've completed doing that and you're ready to resolve the camera now you do not need to use the cameras alt button in the tool box in order to redo that the correct way of adjusting a camera solve after you have added things like your your your target tracks would be to go up to 3d tasks and then solve adjust go ahead and click start and then you'll see that bushu is calculating the the differences and if you noticed the the grid on the floor it shifted just by a few pixels and that correction those little minut amounts are what make a big difference in motion tracking and accurate object okay so let's say you've added a bunch of target tracks and your cameras is still shaking a little bit first you can add it add a locator manually now a locator is a way of telling Buju hey in every frame that i have i show you and this is where that object should be click wants to add a locator to a specific object in your scene and the track and then I usually track back like five frames and click that same exact object and as you can see the second keyframe in that locator now has populated that green crosshair that green crosshair is your window into where buzu thinks that those pixels are in the frame and then where the solve camera puts those pixels at so for example right now this green crosshair is pretty accurate and as you can see it's starting to slip a little bit here and that means that Buju thinks that this particular corner the camera solve is actually placing that slightly to the left and we don't want that we want to correct that and of course this really isn't that bad I've tracked some shots where my locator is here and then this green crosshair is like all the way over here that's a good indicator that the camera solve isn't that good okay just like before after you've gone through and added all of your locators and your target tracks you can refine the cameras all by clicking on 3d tasks and then solve adjust and then click start and if you wanted to add a test object you can click test object and if you'll see that it jumped into the zero zero zero coordinates you can move it around and place it in the area that you want to see it at and after you've added your test objects you can go and hit play see how the test objects react to the motion track into the environment but of course the one true way to determine is just with your eyes so if something doesn't look right if he thinks it looks shaky continue doing target tracks and locators until you're happy with the scene after you've done all of your motion tracking you're happy with the scene it's time to get the camera out of buzu and into the 3d program of your choice in this case I like to use cinema 4d so I'm going to show you how to do that right now go ahead and click export camera in the tool box and then it's gonna ask you to where would you like to save it this next option down here export the flag to tracks only is only if you want some of these predictions to be you know in the scene in cinema 4d I like to export them all because you never know when you need an extra prediction to place an object scaling your scene is important I like to leave it at 100 because buzu tends to make things very small and then when you're ready you can drop down the box and click on cinema 4d or the program of your choice and then go ahead and click Save okay so there's one thing you have to do in order to get the camera out of lose you and hit to cinema 4d and what that is is you get it you've got to change the code a little bit in the c4d file that booze you exported is i all you have to do is right-click do open with and then choose text edit open it with that I'm going to write this in the description so if you get lost in order to get it open in cinema 4d all I have to do is click is click command f4 find and then type in in the final window 3.14159 and hit enter and then you'll see it's gonna jump down to a specific keyframe and what you got to do is just go up to the previous keyframe where it says zero point zero zero zero zero zero copy all of that and get rid of the the negative and then jump down to that same exact number three point one five and paste it right there okay and then after you've done that you can go back to the find window and type in parent item one with six zeros one two three four five six and one okay and then you can click replace and what you want to do is same thing parent item 1 1 2 3 4 5 6 zeros and 2 and you click replace all hit done and click Save alright so once you've done that you can open that up and send before D it's gonna ask you what is the skill the scene this you're gonna have to change that based on the scale of the object that you have created or you're gonna be inserting into your scene and there you have it after you have your camera loaded up into cinema 4d you might notice a couple things the first one is that in Buju your track starts in frame 1 while in cinema 4d the track starts in frame 0 so nur to compensate for this what you'll have to do is select all of the keyframes on your camera and just move them up one frame to frame 0 and then what it'll do is it'll line up correctly it's also important to note that your project frames per second matches the frames per second that you've got going in buzu otherwise all your keyframes are going to be jumbled up and spaced out incorrectly now to import your camera into an After Effects project all you have to do is drag your dot ma file directly into your After Effects project you'll end up with something that looks like this where you've got all of your null objects that represents all of the predictions that Buju had made copy the camera out of the file that you import it into After Effects and just paste that into your sequence now it's also important to check that all of your keyframes have lined up correctly based on the frame rate and in this case it looks like it didn't because of this this one's actually 23 9 7 6 and that we exported it at 24 if this happens to you in order to fix that it's really easy all I have to do is select all of the the keyframes and then hold down the alt/option button on Mac and just click it and slide it over us just a tad and it'll line up perfectly with all of the all of the the frames and there it is once you have a really accurate 3d motion track for your camera we'll really step up your game and then make things look a lot just that much more realistic okay well there you have it that wraps up today's tutorial on how to 3d motion track a scene with moves you if you have any requests for tutorials on digital effects filmmaking or cinematography feel free to leave me a comment below and I'll try to get that made until next time thanks for watching [Music] you
Info
Channel: Upper State
Views: 18,626
Rating: 4.875 out of 5
Keywords: tutorial, 3d motion track, motion tracking, boujou, camera track, vfx, cgi, cinema4d, how to, visual effects, ryan constantino, after effects
Id: UxcZXwhSP-o
Channel Id: undefined
Length: 16min 5sec (965 seconds)
Published: Sun Sep 03 2017
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.