hey guys what's up this is Levi here with food fight VFX and today we've got another quick tutorial showing you guys how to use after effects to tackle screen replacements in your compositing shots so here we have an example of what we're talking about the original shot here as you guys can see a little white transition to show you the end result and that is of the tracked in screen replacement uh now there are a lot of tutorials on YouTube and other platforms that show you guys step by step how to do this in a
variety of different ways uh but I'm going to show you the way that I do it and I found great success doing it this way I've gotten a lot of clients doing screen replacements using this method and so I think it's perfect to show you guys in another tutorial a great way to make some money and get better results with doing screen replacements so let's go ahead and get started uh we're going to start by making a new composition with our original footage and so here we have our clip now this isn't the original CP
what I did was added in a zoom and I added in a little bit of a camera shake with the wiggle expression to give it some movement because I wanted this to be a more difficult shot to use as an example so we have movement this is going to be a rather difficult shot to work with when it comes to doing tracking so we have our original plate here I'm just going to call it clean plate and we're going to use mocha AE this comes installed with After Effects so we'll go to Boris effects mocha
and we'll choose mocha AE and then we'll launch mocha now there's a couple steps inside mocha that we're going to be doing but the first thing is we want to get a track of the TV itself now mocha is a plan tracker so it's great for tracking flat surfaces things with planes like walls buildings or screens in this example uh so that's what we're going to be using we're going to take our our rectangular xline and we're just going to make a quick square and then we're just going to drag this up to the outer
edge of the TV here all four corners just like so perfect and then we're going to make sure that we click perspective down here and we're going to turn the minimum pixels used all the way up to 100% And if I zoom out and click on the track forward button you'll see that it starts to track to the TV and it does a really great job here the reason why I increased the minimum pixels used is because I wanted it to essentially grab on and use as much of the image data the individual pixels from
frame to frame throughout each of these frames and so it does a really great job at holding on to the TV here even with that percentage pushed up so high so it's almost finished here excellent we've got a nice track here of R TV you see that it it holds perfectly I don't see it shifting or moving around any and that's important because this is is going to be what our content that we're putting on the TV is going to rely on and so in order to set that up we're going to show the plan
our Surface by clicking on this button here and this represents where the corners of the replacement footage that we're putting on the TV go so it's going to corner pin the new content uh based off the corners of this plan R surface and so I'll click the little magnifying the show Zoom Windows here and this is going to allow us to get nice and tight in here I'm going to put these to the corners of this inside bezel here so we're going to line that up for each of these Corners it's just a nice spot
to to position this and the other important thing that I want to mention is you're going to want to make sure that the boundaries of this having a hard time finding the edge you want to make sure that the boundaries of this are inside the boundaries of your original track because this outside track here is going to serve as a mask later on uh for our outside bezel to cover back over the content you guys will see what I mean by that but if I scrub through here you're going to see here that that stays
tracked just perfectly so we'll rename this from layer one we'll name it TV track you can name it whatever you like but I'm going to just stick the TV track the next step is we're going to want to create a mask around the edge of the screen and the reason why we want to do this is because we're going to place the TV back over top of the content so the content is going to stretch all the way to this edge of the blue planar surface but we want to essentially have only the TV screen
uh carry that content so we need to create a mask so I'm going to click on the X blind layer here and we'll zoom in with the mouse scroll wheel and we're just going to left click and go around the edge of this TV as close as we can and try to make those Corners as smooth as possible and we're just going to go around the edge like I said and draw this shape and we can zoom in a little further on these tighter Corners just to make sure that uh we're good to go and
then Zoom back out all right looking nice almost finished I usually forward through these points but I want you guys to see this process it's very fast we're literally almost with already and we'll move into the final compositing steps for the shot okay once we're done we will right click and you're going to see a plan R surface for this track as well we'll shut off the plan R surface tool for the time being and I'm going to select all of those points and I'm going to push them in which will round them up a
little bit for us make it a little bit of a nicer track and we can fix some of these a little bit uh but I think it's looking just fine and the next step we'll rename this from Layer Two we'll name this screen track because we're just tracking the screen we can actually use this link to track feature and Link it to the TV track so we don't actually have to have mocha do the track for the screen we can use the track and position data that we already gathered from the original track to drive
the track for the TV screen and that's all that we have to do we've renamed these we've linked the track and we've got our plan tool set up for our corner pin data for the new content that we put in so once you've done this we can go ahead and close mocha and make sure that we click save and this brings us back into After Effects so the next thing that we're going to do is we're going to import the footage that we want to use for our TV track track and I'm only going to
use a portion of this footage this is for perhaps a different tutorial that I'm kind of on we're going to first of all scale it up just to get rid of those black bars on the top and bottom and then the last thing that we need to do is precompose this and this is actually really neat we're going to right click choose precompose we'll name it TV content make sure that move all attributes into the new composition is selected and select Okay the reason I'm doing this and promosing it is kind of cool once we've
got the TV content placed on our TV screen if we want to change what's on that screen we can just double click into this precom change the video that sits inside of it and it'll automatically update in the other composition so it's it's kind of a neat feature that we can use to essentially create procedural effects you know we can very quickly just open the project change a video file and boom the effects already done we don't have to do it all over again so now let's go ahead and take that tracking data and apply
to this comp we want to corner pin that that this new content to where those surface edges were so we're going tock on our Clean Plate footage go to our effects controls panel and under the mocha AE uh effect we want to drop tracking data down and choose create track data and we're going to make sure we choose TV track which was that outer track that we did and click okay and right away you're going to see here we've got uh the corner pins set up and if I zoom back in time on our play
head here here you're going to see that they also zoom out we'll choose corner pin to support motion blur for the export option and for the layer that we're going to export to we're going to choose TV content and we're going to click apply export and what you see is automatically it has Corner pinned our content if I click on our TV content here we have a corner pin effect and it's key framed to follow along with the corners of that plan R server surface that we got from mocha so now that that's done we're
going to take our TV content layer and I'm going to do something cool I'm going to right click go to blending mode and click overlay and what you see here is that overlays the video over top of the screen so that we still have all those real neat Reflections that we had in the original shot so it's just a nice way of blending the new content onto the TV screen and having it look a little bit more realistic but we have a problem uh the edges of our new content go to the edge or corners
of where that plan our surface tool is so this is where we did the screen track uh to create a mask for that where we can essentially tell the content hey we don't want you going any further than the edges here so to do that we'll go to our Clean Plate we'll duplicate it and we'll move this copy to the very top and we'll rename this screen mat and you can name it whatever you like it's just you know for reference this is going to be a mat layer and we'll solo this layer for the
time being and we'll go to the drop down instead of the tracking data drop down and we'll click create a masks and what that does is it creates masks essentially uh first for the TV track and then second for the screen track and so if we drop down our masks drop down for this screen mat layer if we take our screen track and move it above the TV track what we can do is say Hey listen if I turn these both to none we want to subtract the screen track so if I turn on our
transparency grid here you're gonna see it's now cut that out but we also want to intersect the other one what this does is it creates the bezel all nice and cut out which will cover over top of our content which as you guys remember goes to the inside Corners this is why I said you want to make sure your the corners of your plan surface were inside of the track boundary and now if I unsolo this you're going to see that that sits on top of the TV content and so now we have our TV
content being covered by the edges of this TV if I solo it once more you can kind of see what I'm talking about I unsolo it there we are we got the TV content we've got The Clean Plate in the background if I just kind of solo through these layers you guys can see how these are layered on top of one another to give us that final result and so if I hit the till day key to go full screen here and we can preview this out you see that we've got a really nice track
the screen has got new content but wait I also mentioned that we can change that content fairly easy so I'll go to project and I'll import another piece of footage here so I'll go to let's see screen replacement tutorial I've got this creative cow video if we double click on the TV content precom that takes us inside of that composition we can now take and prop a new piece of footage in here and we can scale it up and if I click back now you guys see that content on the screen has been changed it's
that easy we don't have to do the track over again we don't have to do any of that it automatically changes the content that is being Corner pinned for our TV here so fairly simple to do super super easy one last thing that we might consider is Feathering the edge of this screen here so if we go to the screen mat and we hit the mm key or hit M twice that brings up all of our settings and for this screen track we can maybe feather The Edge just a smidge uh just to soften it
up a little bit and there you have it we've got the reflections we've got the new content on the screen it's all tracked in it's uh sitting inside the screen area just like it's supposed to and everything's looking nice one last thing that I did you might not have this effect but if we go to effect and we went to red giants V effects actually it's going to be in one of these other red giant effects there's a VHS filter and so if we want we can go to the TV content double click on it
take our footage and I'll apply the VHS effect and that just kind of adds grain and you know all the static and these Distortion lines and things like that onto the footage for us any effect that you apply to these videos is also going to be applied to the TV content that we've put onto our screen and this just gives you a better example based off the original that I showed you guys in the beginning of the tutorial so that's it guys as you see it's fairly easy mocha AE comes with After Effects you can
very easily track flat surfaces like TVs you guys can create masks in mocha and use those to hide the edges of your content you can even add effects to enhance the look like this VHS effect that we added you guys have that plug or you guys can create that yourself there's tutorials online showing you guys how to add grain and all sorts of other stuff to your footage just to give it that extra bit of spice so that's it guys thanks for watching the tutorial if you guys liked the video please like share subscribe do
all that kind of fun stuff share it to your friends put it on social media let everybody know that you guys watch this tutorial and give it a try yourself go out there get a piece of footage of your TV in the living room or your cell phone screen launch After Effects and mocha and give it a try yourself I think that you guys will be very happy with the end results you guys can get a lot of good clients you guys can enhance your videos and things like that for your own personal projects there's
really Limitless options and things that you guys can do with an effect like this so once again this is Levi with food fight VFX and we'll see you at the next tutorial