After Effects - Advanced - Tracking with MOCHA

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi in this video we will cover tracking motion and perspective in mocha so let's get started for this I have shot a short video on my desk so I'm gonna bring it in as composition please notice the composition settings 1920 by 1080 and it's about 7 seconds out of these seven seconds I am going to I'm only going to use about five seconds so let me change the settings on my composition so that I start my time count at zero and I'm gonna scroll all the way to about two and a half seconds and then I'm gonna use about four seconds worth of this or three seconds so I will trim the layer all the way to about 414 that's about two seconds let's make let's do it three seconds so let's make it three seconds then I'm just gonna trim it to this and I'm gonna trim the composition so with that done I'm only going to track that portion of the footage the goal is to replace that book cover with this image that's the goal so in order to do that we would we could potentially use our tracking settings here and try to figure out how to track with motion track and and trying to distort as we go but that could be a lengthy process because of this there's a program that shifts together with After Effects called mocha it's by a company called Boris effects in the past bore mocha used to be a completely separate program and the workflow it was very similar to the one we have with cinema 4d today which is you have to go to a separate program save the file come back and things get updated with the newest version of mocha in and after effects it's a seamless workflow so it comes in as a filter even though it is still a separate program it still it's treated as a filter inside After Effects and what that means for you is a seamless workflow for your compositions so to do this what we want to do to select the layer that we want to track and like I said we want to drag the cover of that book so we'll go ahead and go into effects Boras effects mocha loca a now that applies the filter to a layer but nothing happens for you to actually start tracking you need to click on that logo and once you click on that the mocha program will open now it's a daunting interface at first but it's actually a fairly simple interface the key thing here the key things here are to figure out what you want to track give it enough of a margin of error and make sure that you understand what plane you're tracking now this might look like 3d tracking but it's not is 2d tracking and it uses a combination of transformation meaning position rotation and scale and something called corner pin Corner pen it's a filter that allows you to modify almost like bend your layers in After Effects so it combines all those things into one single filter while tracking and it allows you to save that data as tracking data so for this I want to go ahead and make sure that my time marker is either at the beginning or the end actually that doesn't matter because you can always track backward or forward and what you want to do is you want to go up here to create a rectangular spline or you want to draw your own spline now a spline is basically an area that you want to track in my case I want to track the that book cover now you can fine-tune this by clicking on the edges on the corners sorry on the corner handles and sort of define the area that you want mocha to be paying attention to and that is by moving those handles now you see this little what looks like Bezier handles sticking out of the of the corners well that's what they do they actually allow you to zoom it to push in or push out to bend the curvature of that corner if you need it if you can you don't necessarily have to create a rectangle you have other options under that or you could create like I said by hand you could create with a pen tool you can actually draw this thing well so with that done let me go ahead and fine-tune this this is where most people using mocha make the biggest mistake which is they say okay I got a covered and it's got a pretty good margin of error so I'm good in reality this is your actual margin of error that's the area that you're telling the program please focus in this area to track what really gets tracked is what's inside this blue box so you can actually show the surface point or over here either one of the two will get you to the same place what you want is for this blue box to cover the area that you want to actually track where your footage is going to go or whatever it is that you're replacing this with so you want to make sure that this box actually covers the area that you are actually trying to track that you actually want to replace in my case is the front cover of the book and I'm not gonna go for exact right here because there's some curvature up here and all that but this will give you a very good idea of what the powerful the power of this tool how powerful this tool is to create motion tracking so with that done I am going to simply set it up this way and I am going to go ahead and let the program analyze the footage I'm gonna select perspective notice that you can select either transformation only transformation and scale transformation and rotation you can select skew and you select perspective as well if you want to if you need it now you noticed when I was scrubbing the video earlier that my book sort of changes perspective because I am pulling back almost like a like I am truck in my camera and so the perspective of my book changes with respect to the position of my camera and because of that I want to have perspective as well now to to track this what all you need to do now is simply click either you're tracking backward or forward in this case since my playback heads at the beginning of the timeline I'm gonna be tracking forward and all you do is just simply click and let the program do its thing now this can take a bit of time depending on the length and the difficulty of the tracking footage what how difficult it is it works obviously best just like with any of the other trackers when you have the most amount of color difference or brightness and darkness contrast the highest contrast possible you'll notice also that as you go things might change and they might change position you can at any time stop the track and then bring it back slightly to the point where you start losing tracking then simply move your margin of error ever so slightly to create a keyframe on your timeline and then fine-tune the position of your blue box now you want to do two things after you do this you want to make sure that that the change that you made it's actually gonna be interpolated to the previous keyframe which is this one so you just need to literally just simply scrub that timeline to make sure that everything is kosher and once you're ok with that then go ahead and continue from that point on on the tracking the program will remember that that was the last setting and it's basically allowing you to keyframe the the shape of your tracker to modify it as you go to best fit the footage as you go so I'm just gonna simply let it all the way through this time and I see it's doing a fairly good job of tracking now I know that my shape is not rectangular and that I might get some spaces here that might not be tracking appropriately but for the intents and purposes of this video this will work just fine now you don't have to have a rectangular shape like I said earlier so this could track any shape because it allows you to draw your own shapes it could be any shape so any footage that you want to try to track 3d elements from or any object with any you can actually draw almost like drawing a mask around that object so now this got offset a little bit but like I said that would be fine you know now that you can stop it at any time and go back go back and fine-tune the track with this done what I want to do is click on this button here to save it so I want to make sure that that data is saved within my layer and then I'll just close mocha now I come back here and I don't see much difference that is because mocha still retains that information the tracking data information I need to bring that tracking data from mocha into my layer and to do so make sure that you uncollapse the tracking data and then you will click on the create track data clicking on that brings up this window that tells you which layer are you tracking when we created that tracking data in mocha we applied it as soon as you clicked on that shape to kerttu to actually set up the blue box and the the red box that was outside it outside it that creates this layer that is the tracking layer if you want to go back to mocha and see what that is if you click it open you'll see that that's the layer 1 and that's the information that contains this margin of error and the blue box that's inside it so that information is saved into that box it close this again and what I want to do is go ahead and place the tracking data into that by clicking in this button now with that done what happens is all that data comes to my composition as keyframes so let me go ahead and click on that select layer 1 and click OK now you'll notice that I get keyframes over here and if I double click my u key on the keyboard you'll see that I have keyframes for all this information all that information is transformation information as you can see rotation scale and all that and these things up here which are my corner pin pieces of information now what I want to do is I want to apply this to a layer so I want to move that information from the tracking data to actually functional data let's go back to the project and bring in that image now you'll notice that that image is way off size from my composition and what I want to do is I want to make sure that whatever I brought in matches the size of my composition so I know that my composition is 1920 by 1080 this should be 1920 by 1080 now obviously it's not 1920 by 1080 is 660 by 1225 so one way to make that layer 1920 by 1080 is by pre composing it so I'll pre compose it and then to make sure that it matches 1920 by 1080 I'll click on move all attributes into new composition even though that doesn't have any filters and it doesn't have any changes done unto it just simply clicking on this will resize that composite the new composition to 1920 by 1080 to match my current composition so go ahead and click OK on that any fight double click it you'll notice that there is my image in my new composition and if I press ctrl K or command key on the Mac you'll notice that my composition is 1920 by 1080 now the point is to make that artwork match the size of my composition that's a fairly simple process just like what we've done in Photoshop and illustrator and over here you can right click on any piece of art and go transform and say fit to comp now that is stretches my image and it doesn't look anything like the original image and that's okay that's what we want that's where the corner pin comes in corner pin is hoping that I do this so that it resizes accordingly to place within the tracking information and so let me go back to my original composition you see that my pre composition now it's all stretched out I want to go back to my footage the one that I tracked go back to effect controls and now what I want to do is export this information the tracking information onto a layer now I have options I can either export corner pin I can export corner pin with supported motion blur or I can export transform transformation is rotation scale and position if you're if you include it skewing or if you included perspective you need to use one of the corner pin options 99% of the time when I'm using mocha I export with corner pin support motion blur so I will go ahead and select that and I am gonna tell it what layer to export it to that precomposed the pre composition to compose most precomposed they're painting so I'll click on that one and then I'll say apply export so doing that places my image and you see that it came back to the regular size it was and you notice that the corners have these little handles those are my corner pin handles let me select the pre composition and you see that I now have a filter apply to a cold corner pin if I press the U key you will notice that all my pins have information on my corner pins and all that transformation information from the tracker got moved onto this layer as well so now when I scrub this my book has been replaced by the painting okay let me go ahead and play that back and you'll notice that I have a fairly decent rack now with that done let me go ahead and apply I see that I see the reflection of the book at the bottom of the of this so for this what we want to use is we want to create a reflection now there are many ways of creating a reflection you can go ahead and try to read you know using the same tracking data try to turn the whole thing around and use the pin the corner pin to reset to fix the other one but that's a very long workflow what I want to do is utilize a filter and this filter is a free filter that is offered by a company called Video Copilot they offer a lot of good stuff including element 3d which allows you to create native 3d elements within After Effects and it allows you to control with interaction with lights and everything else inside After Effects they they have they have a ton of data so videocopilot that net it's a website to visit and they also have a lot of tutorials now I want to go into my filters and look for VCU reflect PC reflect is a filter that allows me to create a quick reflection it tells me where do you want the reflection to go where's the floor position so my floor position is right here you'll notice that this comes kind of sideways so what I want is I want to rotate this so I want to make sure that I rotate it under this cue oops sorry not that one rotation first so let me rotate it and I'm gonna rotate it to about negative negative 30 let's say a little bit more negative 31 33 problem negative 34 move too much negative 33 I was right at the beginning okay negative 33 negative 32 that's good alright and that I can always move that back up to get it closer to the pant to the actual painting and I want to skew this ever so slightly so let me skew it to about negative 30 a bit more negative 32 to match perhaps okay and let me set keyframes for that and for my reflection angle then I'll go ahead and go about halfway through my composition and I see that this got moved ever so slightly so let's go ahead and move it back to about negative 24 that is and then my skew let's try to match it negative 24 that looks pretty good and let's go ahead and go to the end and bring it back again bring my rotation back not too much negative 19 perhaps negative 20 too much negative 19.5 negative 18 then a bit too much eighteen point five negative eighteen point five and my skew goes to negative eighteen point five as well so that should match now I see that that's a bit off and that might be just because of too much skew and I'm gonna go to 19 and this might be a bit jumpy but it gives you a pretty good idea that you can actually go in and start working with reflections I am going to increase the blur amount on this to about three so that my reflection is blurred and then I want to bring down the offset on this the fall-off sorry so that it starts disappearing let it blend and let's see not too much on the offset so you can start playing around with the settings to change the blurriness and how much offset you want on that you can also change the opacity if you want to if you're feeling that it's too sharp and then when I play this back then I should get a fairly good reflection once again it's called VC reflect and it's by Video Copilot and it's a free download so if you go to the Video Copilot website then you will get a free you can download it for free now I see that I have my floor positions changing as well so what I want to do is I want to go back to the very beginning and capture that make sure that I have a keyframe for that go to the end bring that slightly down to be too much maybe I want to skew it a little bit more on that last keyframe and perhaps I want to rotate it even more not too much so you know you get you can just go ahead and play around with this until you find a happy medium for the things and that should give you fairly good results for a free filter it's great results if you ask me and I hope that this clarifies how to use track mocha for tracking again it's another option besides the trackers that come standard with After Effects it does not replace the 3d tracker but it does match the motion trackers so I find myself in my work clothes matching using all three of them because like I've been saying throughout the class it's not a one bullet solution we need to basically make use of all the tools
Info
Channel: Claudio Ramirez
Views: 6,964
Rating: undefined out of 5
Keywords: After Effects - Advanced - Tracking with MOCHA
Id: GbZ7C7mKDjA
Channel Id: undefined
Length: 19min 41sec (1181 seconds)
Published: Sun May 17 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.