Mocha AE Planar Tracker for Absolute Beginners

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
mocha if you want to create advanced visual effects you will likely not get very far without getting into the art of match moving match moving is all about extracting camera movement and spatial information from your shot in order to be able to add new visual elements be that 2d or 3d into that shot and have them sit realistically in your scene while After Effects does include a 2d point tracker as well as a 3d camera tracker that can help you track objects or extract camera information from your scene you may find yourself up against the wall rather quickly when trying to deal with some more complicated scenarios Walled has been trying to get a shot track for days now well good luck to him this is where dedicated tracking software packages come into play since neither of us wants to end up like Walter and I do want to get him some advanced visual effects on this channel I want to start creating some tutorials for mocha from imagining systems mocha is a planar tracker that has been used in quite a few Hollywood movies and TV shows such as the latest Star Wars movie Harry Potter and The Walking Dead now the name planar tracker does not mean that you can only track flat 2d planes the name simply implies that instead of using small groups of pixels to latch onto as is the case with feature or point trackers a planar tracker uses planes and surface textures within those planes for the purpose of tracking this provides a potential advantage especially when dealing with shots that contain a lot of motion blur or a very shallow depth of field where pawn trackers can get lost and slip off the target quite easily the full version of mocha comes with powerful tracking and rotoscoping features that let you do anything from simple screen or sign replacements to complex 3d integrations lens correction stabilization or removing objects and people from moving shots and what's even more exciting is that Adobe After Effects actually includes a version of mocha called mocha AE now mocha a is a future reduced version of mocha and so you don't get access to some of the advanced features but in this absolute beginner tutorial I want to take you through the basics of how to use mocha and you should have no problem at all following along with the version that comes included with Adobe After Effects this is going to be an intermediate tutorial and I will assume that you have watched my tutorials on how to use the 2d and 3d trackers in Adobe After Effects just so you have a basic understanding of how tracking works and what some of the common challenges are but now enough of me talking your ear off let's jump right into the tutorial here we are once again in Adobe After Effects and Before we jump into mocha I do want to quickly touch on the limitations of the 2d point and the 3d camera tracker within After Effects the clip we are going to use for this tutorial is just a very short video of me lying on the couch and pretending to play some video games if you do want to follow along with this tutorial as always I am going to put download links to all the material down in the description of the video let's assume that all we want to do with this clip is to insert a screen of an actual video game playing onto this screen seems easy enough let's see how we would go about that using only After Effects now a really important thing for anything tracking related is if I go to the clip in my project panel the framerate of my clip is 23.976 frames per second and it is utterly important that all of your compositions and any tracking you do uses the exact same framerate resolution and pixel aspect ratio because otherwise you're checking data is not going to line with your final video and everything is just going to be horrendous ly off so my video clip is at 23.976 frames per second and the composition if I quickly jump into the settings also has a frame rate of 23.976 frames per second and it has the same resolution and a square pixel aspect ratio let's get out of this and let's have a look at the actual shot at the beginning is very easy the full screen is in view and you could easily overlay a corner pin onto the screen but as the shot progresses the screen almost entirely vanishes from the shot and there's quite a bit of perspective shift in the screen itself if you were to go up into the window menu enable your tracker panel and let's pull this up a little bit and maybe track motion obviously you're only going to get a single point to track even if you enable tracking rotations you only have two points so you can track two corners of the screen but in this instance most of the screen is off screen and it's perspectively distorted and this is just not gonna work let's expand the layer and delete the tracker again and let's forget we even tried that let's return to our composition and let's try to use the 3d camera tracker that comes included with After Effects since version cs6 I have a separate tutorial on how to use the 3d camera tracker so I'm not going to go over all of the details I've basically already prepared a little composition here and what it is is the couch video but with me cut out because you really just want to leave the static elements in the screen so the 3d camera tracker does not get confused and let's search for the 3d camera tracker and let's apply it to the clip we want to track processing might take a little bit depending on the speed of your computer so you know feel free to go grab a coffee take the dog for a walk play with the kids or you know do something else and come back once this is done uh-oh analysis solve failed a lot of people have seen this often and it's simply because the 3d camera tracker just couldn't figure out the camera movement off you seen it couldn't figure out the spatial information and so just kind of gave up and said I can't deal with this and herein lies the power but also the big limitation of the 3d camera check within After Effects it's great as like the magic bullet if it works it works great however if it doesn't you have very limited control of fixing this problem one thing you can do you can expand the Advanced tab and say detail analysis which usually does a reprocessing with just a little bit more consideration for the finer details in your footage and again if you've had a little bit too much coffee this would be the perfect opportunity to go use the bathroom and surprisingly the 3d camera tracker actually managed to solve our scene let's scrub through this so we can see all of the checkpoints look all riders they're kind of drifting off it's not very accurate and if you jump over here into the 3d camera tracking effect you can see that your average error is actually one point two eight pixels which is actually a really bad track so this is probably not terribly usable even if we were to create a plane on the screen of the TV and insert it into the shot yeah just scrubbing through this you can see kind of drifts off if i zoom in a little bit you can see it just doesn't really stay on track so now that I've shown you a whole bunch of problems and probably made you a little bit depressed let's talk about how to do this properly let's delete all of the additional layers and enable our base footage again there we are back to what it was and let's use mocha AE to track the scene and insert our screen as I mentioned mocha AE actually comes in built in Adobe After Effects and in order to use it all you have to do is select your clip come up into the animation menu and then select track in mocha AE this will launch mocha and the very first thing we need to do is we need to set up our project the app we can call it Tobias couch and the location is going to save it in the same location as my footage and a subfolder called results the clip we're going to use is my Tobias couch video frame 0 to 239 and very very very important make sure that under the format options your frame rate matches the frame rate of the video as well as the composition in Adobe After Effects because once again if this does not match your final tracks will not align let's hit OK and here we are in mocha the interface for mocha looks quite different to Adobe After Effects with the main similarity is really being that there's a big preview in the middle and the timeline at the bottom that you can use to scrub through your footage don't worry too much about all of the different panels and controls I am planning on covering them in much more detail in some future mocha tutorials obviously I'm also interested to know what you guys want so leave me a comment down below if you would like to see some more in-depth tutorials from mocha for now let's simply focus on tracking this screen so that we can replace it with a different screen in Adobe After Effects let's scrub to a position where the entire screen is in the shot but it is as big as it is gone get and let's zoom in on the clip in order to zoom in MOCA simply press and hold down your Z key and then click and drag up or down with the mouse to zoom in and out of your footage to drag the footage around simply press and hold the middle mouse button and then drag in the preview window there's the screen that we want to track now because mocha is as I set a planar tracker we are not going to define little track points that we place around the screen instead we are going to define a plane we're going to draw a shape around the plane of the TV and mocha will then track the plane of the TV itself there are a couple of different tools in mocha that you can use to create your shapes and you can find them all in the tool bar my favorite one is the simple create X spline layer tool so let's click on that to enable it and now let's draw a shape around the screen so simply click to place the first control point go over to the right side click click and click and in order to stop drawing your shape simply right click and there you go we've just drawn a shape around the plane that we want to track around the plane of the TV and it's actually not a problem that this plane extends a little bit past the surface we want to track mocha is smart enough to figure out which parts are inside the plane and which parts are outside obviously you don't want to go overboard but it's actually quite helpful if the shape overlaps the plane that you want to track but just a little bit right now all of the corners of the shapes are rather rounded and we can spike them out and you've got these little handles where you can soften or harden the corners so you can either drag them all individually out to tighten the corners really nice and sharp or you can actually select one corner press ctrl a to select all of the corner points and then control them all together so let's pull them all out so that the shape is nice and tight maybe I'll pull it in just a little bit cool that should do so now we have a shape set up and over in our layer controls on the left hand side you will see a new layer layer 1 that's the layer we've just drawn around the TV screen you can simply double click the name and let's rename this to screen ignore all of the layer settings for now let's come down into the track panel at the bottom of the interface and here you can define how mocha is going to track this particular shape probably the most important setting when tracking with mocha is the minimum percentage of pixels used this tells mocha as a percentage how many pixels of our shape that we've drawn around the TV it has to find from frame to frame for the track to remain valid because mocha uses the content of the shape to track from frame to frame and figure out the movement of the plane the higher this percentage the more accurate track will be but it will also take longer to process in order to Jack this up you can either double click and type in a higher number or actually do prefer to click and drag and then circle around the field to wind it up as you do kind of like this control of Cap'n we're used to it and let's Jack this up to probably around the 90% this should ensure that we get a nice and solid track and the screen is not going to drift off just over to the right in the motion panel you will find a number of check boxes these ones define the properties and the types of movements of our surface that mocha is going to track now I do plan to cover all of these in much more detail because there's a lot of detail to be covered but for now simply content yourself with knowing that enabling these will tell mocha to track the translation scale rotation and the shear and because our TV actually has some perspective distortion because the camera moves closer to it and it moves further away again we also want to enable perspective now technically we are all set up and ready to track however it is extremely important to understand that the shape that you draw on the shape that mocha uses to track from frame to frame does not actually represent the tracking data itself this means that just like with points in the point track and after effects you can actually move this shape around because mocha only uses this shape from frame to frame to calculate the tracking data the shape is really just a child of the tracking data that mocha is going to generate let's quickly reposition our shape back over the TV and knowing that the shape is just a child of the tracking data mocha provides you additional tools that help you monitor and analyze the tracking data and make sure that everything is tracking correctly you can find these tools in the little toolbar just above your preview window and one of the most important ones looks like a little s in the square and it's too short plane our surface tool let's enable this and I'm not sure you can see this MOCA is now displaying a small blue square within the shape that we've drawn let's drag the corners of this surface right into the corners of where we want to insert the new screen this surface actually has two purposes for one again because it is just a child of the tracking data it will follow along with the track and it allows us to see how well our track is going secondly because we are going to use a corner pin in after-effects to insert our screen this surface defines the corner pin information that we are going to export the other useful tool to the surface is the grid tool which is just on the right-hand side to the planar surface tool so let's enable show planar grid let's zoom out all the way you can zoom out by pressing the star on your num keypad we can now see a big planar grid and this grid is actually aligned with the surface so as we're dragging the corners of the surface around this grid changes perspective the grid is really useful to see how the plane sits in our shot as Mokka is doing the tracking this was probably much more information than you really need it or wanted to know let's finally start tracking at the bottom of the preview panel you will find the tracking controls and again you can do this frame map frame or let's just track backwards which is the bottom all the way on the left hand side mocha is now tracking frame my frame the tv-screen plane by using the surface that we defined we can stop tracking at any point in time by pressing escape let's zoom in a little bit more and let's make sure we can see the screen just so you can see how tracking is going let's continue tracking backwards and the surface is sticking to our TV screen nicely in your timeline you are going to see some blue frames on the left hand side which indicates that these frames already contain tracking data and over on the right hand side it's already at this are the frames we haven't tracked the little green triangle in the middle just defines a keyframe because this is the frame that we use to set up our shape let's make sure we right on there keyframe and let's start tracking forward and an interesting thing is going to happen let's quickly stop this if i zoom out just a little bit the TV is now going to go off-screen however because mocha is a planar tracker and there's still some of the surface left to track mocha is going to just continue tracking so let's continue this keep an eye on the grid as well as the surface and all of this still seems to be sitting right in place and locked on properly to the TV screen let's just let this run all the way through hold everything we just had a glitch in our track if I scrap back a little bit keep watching the top-left corner of our surface right here between frame 176 and 177 our track actually slips and this is going to be really bad if we now want to use this data to insert the screen into the shot the reason for this happening is that on my TV screen I actually have a little info panel displaying that's telling me to connect an actual device and from frame 176 to 177 that info panel on my screen jumps down a little bit now because we have told Moka to track the surface using translation scale rotation SIA and perspective mocha text is jumping of this info box as a shift in perspective on our screen and therefore our surface and grid kind of tilt a little bit towards the camera because mocha thinks that the surface is changing in perspective there are a couple of ways we can solve this problem the first would be to reshoot the scene without me actually turning the TV screen on however I felt it would add a little bit of a realistic flicker into the shot and also I'm kind of lazy gonna reshoot this we could also simply mask this out before we get to the tracking or we could simply tell mocha to ignore the perspective shift between these two frames where the info panel jumps downwards for that I want to return to the last good frame which is frame 176 for me and then at the bottom right now we're looking at the parameters there's a dope sheet panel so let's pull that up the dope sheet simply contains the keyframes for all of the properties in our scene that contain actual tracking data I'm simply going to select all of the keyframes past frame 176 and delete them let's return to the parameters for the track and I'm now going to temporarily disable tracking the perspective for the shape that we've defined with perspective disabled let's track forward a single rame and did you notice there was no snapping in the screen so from frame 176 to 177 the track stays on now I know that this info panel does not actually jump anymore throughout the rest of the video so from frame 177 we can re-enable tracking the perspective and let's just continue tracking through now that MOCA has finished tracking let's zoom out a little bit and check this out and I would say that actually looks like a pretty good track mocha allows you to enable or disable tracking any particular properties for your shapes at any point in time this can often help you dealing with difficult situations where your track starts to slip off now before we get to exporting our data there is one more tool that I really want to show you because it is really really valuable to ensuring that your track is actually accurate let's return to a frame where the entire TV screen is in shot and go to the tool bar and two over to the right from the grid control you will find the quick stabilized mode lets enable quick stabilized mode if you now scrub through your project mocha will stabilize the motion of the video around the blue surface that we've defined if we zoom in a little bit this is really useful because you can look at the corners of the blue surface that we've defined and ensure that they stay exactly where they're supposed to be I think this track looks really good before we export this data as I corner pin let's quickly hop back over into Adobe After Effects and setup the screen that we want to insert here we are back in Adobe After Effects and in my project panel I have another small clip called Street Fighter let's drag this into our composition this is just a simple green screen clip of me and Walter fighting it out street fighter style and as always there is going to be a download link down in the description of the video so go check that out it is important to note that the resolution of this video matches my composition exactly this is very important when you're applying corner pin data from mocha across to After Effects because mocha is going to assume that the layer you applying the corner pin data to is the size of your full composition if the video or that you are using is smaller than that you will have to precompose it first so it fits exactly into the size of your composition let's fit this layer to our composition and return to mocha now let's select the screen we want to export and obviously we are going to export the little blue surface of our TV screen s corner pin data and in order to do that make sure you in the track tab in mocha and then simply click export tracking data you have a couple of options for the format you want to export in the one I am going to choose is After Effects corner pin which supports motion blur next you can either save the data as a file but I'm going to be a bit lazy and simply go copy to clipboard let's return to After Effects select our streetfighter layer and very very important make sure that you at the beginning of your composition because in mocha we track from the very beginning of our composition so make sure and after effects you on the exact same frame at the very start and then simply go ctrl V to paste the mocha tracking data onto our layer BAM and our layer is now properly on the TV and what's more or some if we play back our composition our layer follows the screen precisely let's scrub back a little bit and zoom in right now you'll see that the screen is a little bit too sharp because there's actually quite a bit of camera movement in this frame but because the corner pin data from mocha supports motion blur let's enable motion blur on the layer and on the composition and so now the video layer will match the motion blur from the camera and set even more naturally in the shot this looks pretty good actually let's zoom back out and play this back cool that looks pretty awesome and from here everything else should be pretty simple you could add some flicker to the layer some interlacing lines or vignette you could color correct it all to make it all fit really nicely together Mooka AE comes included with the doobly After Effects and hopefully this total gave you the first view at how easy it is to track something in mocha and then bring that information back into After Effects for your final composite and that's all this to it I really hope you enjoyed this absolute beginner photographer mocha and as always if you do have any comments questions or suggestions just leave them down in the section below if you did enjoy this video I would greatly appreciate it if you can give it a thumbs up favorite and share it with the world and if you do want to see more cool filmmaking and visual effects too Charles don't forget to go to youtube.com/scishow and subscribe thank you very much for watching and until next time I will see you later you
Info
Channel: Surfaced Studio
Views: 224,633
Rating: undefined out of 5
Keywords: After Effects, Mocha, Mocha AE, Tutorial, Planar Tracker, Camera Tracking, Motion Tracking, Screen Replacement, Visual Effects, VFX, Special Effects, How To, Adobe, Motion Blur, Export, Imagineer Systems, Surfaced Studio, Instructions, Intermediate
Id: RevDN2fNGag
Channel Id: undefined
Length: 22min 53sec (1373 seconds)
Published: Sun Jul 10 2016
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.