After Effects: Motion Track and Composite a Device Screen! | Duncan Rogoff | Skillshare

After Effects: Motion Track and Composite a Device Screen!

Duncan Rogoff, Video Editing & Motion Graphics

Play Speed
  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x
5 Lessons (19m)
    • 1. 01 Intro

      0:50
    • 2. 02 MotionTrackingInMocha

      5:08
    • 3. 03 TrackDataAndAnimation

      4:55
    • 4. 04 Compositing

      7:17
    • 5. 05 Outro

      0:30

About This Class

In this quick, intermediate-level course you'll learn how to composite a device screen into a scene.  I will teach you how to motion track your footage in Mocha, a plugin included inside of After Effects, and I will give some tips along the way to ensure you get a solid track.  Then we will hop over to After Effects where I will show you how to apply your track to a pre-composed layer, animate your assets, and composite your scene using green screen chroma key and the rotobrush tool.

Also, please complete the project if you have time, and review the class if you like it. :-)

Transcripts

1. 01 Intro: everybody. Duncan Rogoff here for skill share dot com We got a quick class for you today. We're going to be tracking and compositing some device footage using after effects and mocha. Today, we're gonna be using a watch screen as the device. But, ah, these techniques work whether using an iPad or an iPhone or any other sort of device we're gonna want had a motion track your footage inside of Mocha, we're gonna cover some quick tips on how to get a good, solid track at a mocha that we're gonna bring that track into after effects and apply that to our footage. Don't talk about compositing and rotoscoping. Your footage to get a nice queen looking device green seeing class. 2. 02 MotionTrackingInMocha: Okay, here we are, Inside of aftereffects, we have our main footage plate. We also have ah couple of screens. We're gonna be compositing into that watch face. We have the a muted and the muted buttons I'm gonna go be. We're gonna be compositing them right here into this area. 1st 1 to start off by creating a new composition from this footage, we're just gonna take this footage and drag it onto this composition icon. And there we go. Now, footage is here, and then we're just gonna take these two and we'll bring them in and we'll be using these later. We don't currently need them for now, so I'm gonna turn them off by Quicken This I right here and now we're going to go ahead and bring our footage into mocha double click on that and go up to animation trapped in moca A . And what's register it later. Ah, here. Your basic settings really don't have to worry about these. Make sure your frame rate matches your clip. Focus should identify all this for you and automatically have these setting set appropriately so quick. Okay. And here we are. So in this case, we're gonna be using a track with some corner pin. Ah, in order Teoh composite device screen accurately. So we'll just go appeared to his ex. And this here is the pen tool that allows us to set the boundaries of our track. So this is really just where the track is gonna reference areas of the screen and basically , you kind of just want to draw a general area around where your screen is. We'll also grabbing a couple of out outlying points just to give that something to grab onto. And you just click back at the start here to get an end. Now, in order to get the device corner pin correctly, what's really great is you can just go in and quick. This s here, this point, our surface. And now we have these four corners so you can just click and drag these corners to match. The outline of our device was grabbed the top left if you notice in the upper left. Here we have a zoomed in view, so that really helps to get nice and tight. I like to go a little bit outside the green marks which will make sure that our final asset covers the entirety of the Green Spirit Place top right bottom right down here. And this bottom left again using this close in view just to really make sure we get that in there. Now we have these corners set. And if you look down here at the bottom, this shows what will be tracking, translation, scale, rotation and sheer. Now we also want to make sure that we click this perspective button when composited device screen. So that will count for any tilts and shifts in the actual position of the screen. So I can come up here and we contract forward and the tracking should begin. Everything looks good so far. And now if you notice when this finger came into view, we sort of lost that bottom left corner. Once that finger gets out of the way, you'll be able to see now this track, these bullets have come off from where we wanted that. It's really easy fix for that. We go back to the beginning Here you have our original point set. What weaken dio as you can scrub forward a little bit until where that finger comes in. Quick off the first layer and come back into our X. We can create a new layer above the initial way. We could just draw an outline of the area around the finger. Now, basically, this tells Mocha to ignore this area of the frame. So if you go back to our layer one so we can do here, yeah, that outline. Go ahead and we can set a key friend. We contract backwards from that point, and you ignore that finger completely. This allows the corners to stay pinned and for us to get a nice clean track. Now I can go ahead advance that key friend. We contract the rest of the way all the way to the end. Keep your eye on the corners here to make sure nothing gets off the finger. Lee's frame Things are still looking pretty good, distracted, whole, pretty steady. That's looking good now. One thing that can be helpful if you find that the actual corners of your track are a little too dark and there's not enough contrast because Mocha looks for contrast. You come into this brightness setting, you can just type in a higher value to obviously a little too blown out 1.5 this cups, actually pretty good, but sometimes to boost. The contrast will give you a nicer track. Anyway, now that we have this track, we can go ahead. We can export are tracking data. The after effects have a couple options here. Aftereffects corner pin aftereffects transformed data, which is just the position in scale and rotation of our track and doesn't include the corner pin Parken Onley that won't support Motion board. We want motion board supported cause That'll add some realism to the composition. So go ahead and do that and only have to do now it's copy that to the clipboard. 3. 03 TrackDataAndAnimation: Now we can come back in aftereffects and turn on this meet where? Back in our composition. Here we can go ahead. Go the beginning, we're gonna sit command V or at it, paste to pace Attract at now. If you'll see here, you could scrub along and it appears that attracts working correctly. But our actual screen is way off centre. That's because of our anchor point. So if you come into the mute here and you compress a on your keyboard for the anchor point , set that to the center of your frame. Now, I know that for working in a 10. 80 p composition with center will be 9 60 by 5 40 And here you go. And now we have this screen actually tracked right in the center there, looking pretty ness. Now you can see if we zoom in that corner pin was a little bit off, mostly because the actual size So what's that for? Most because the actual size of the asset has these rounded corners and cuts that off, so I won't worry about that here. That's something to keep in mind. We're working with this footage. One thing I recommend doing is, instead of applying the tracking data directly to the layer itself, I recommend applying to a composition instead. This allows you some room for animation. So I'm gonna go ahead and undo a couple steps to get rid of that Tracking data hit you on my keyboard to bring my points and undo one more time. I went back to normal. We'll go ahead and take this layer, and I'm gonna pre compose it by either hitting shift command. See, on my keyboard, we're going upto layer recompose. We'll just call this the vice cream. I'm gonna go ahead on press command V or go up to edit paste and paste my tracking data directly onto that composition on a press aide to bring in my anchor point. Gonna center that out to 9 60 by 5 40 We're back to where we were here with the nice clean track that's allows us for animation. Someone take my UNM you'd way or here. I'm gonna go ahead and press command X to copy that. Cut it out and paste it in here to my cop. Now it doesn't show up because it was in a different position. I'm just gonna align that incentive that to the composition. And there we get you have are muted and I meet it so we can dio you go back to our main composition scrubbed forward until right where that finger comes down right about here. We can take this meter layer and we could trim the end either by hitting Ault right bracket to trim it. Or we could just drag the end. And now, if you want to snap right to our play head is we consoled shift and that's just snap into place. And now you have a hard cut. And so here, if we scrapped there, assumes his finger hits, we switch from a muted to meet it. Now, maybe we want to give this a little bit more life, maybe do a little bit of animation. So let's go ahead and drag us back out, and we can go ahead and we can set a key frame here for position. We can go forward 10 frames by hitting shift, command and the right era, and we're just drag our X value over till this is offscreen and we'll go ahead and parents are muted. Clip the UN muted clip. Now we have a little bit animation. We can ease weaken, setting Eazy E's on these by hitting F nine R keyboard. Smooth out the motion. We can add motion blur to the assets by clicking the box next to these little circles for motion blur as well as turning it on for the composition. And you can see now we have a little bit more realistic movement. When we pop back into our men Come. You can also see that this animation now takes place and everything is still tracked right onto the device itself. Now, right now, you concurrency, we see the green on the screen of the phone. We can easily get rid of that by going back and tired of ice cream comp and adding a black solid to the background. But either hitting command, why on the keyboard, we're going upto layer new, So make a black layer. Make that the comp size press. OK, drag, get to the bottom. Now our animation, instead of happening over transparency, happens over black. We can no longer see through. We have an animation 4. 04 Compositing: Now there's two ways to composite this footage one way, which is really nice. But Jenna screen off. Since we actually have green a green screen on the device, we can just go ahead and key that out before us. We're gonna want to duplicate our footage layer by clicking are layer and hitting command D on the keyboard or going at it duplicate. It's gonna drag that above the divi screen. Turn that, honestly, you can see the effect will go up into effect. King, Cuba. We'll take a screen color here. You see Eyedropper donkey at that green. Now, immediately, you can see that a device screen is there underneath the key doubt layer, and now our finger that comes in over top of the screen is actually already composited perfectly over top of the screen. Now, in a lot of cases, if you are working with the device that has a green screen, this technique works flawlessly. In the case of this footage, you can see the actually, the color of the screen matches the color of the background, so this creates a problem. In some cases, you might also not even be working with green on my screen. So there's another way to go about compositing, and that's through the use of the road, a brush and red escape. So we'll go ahead and we'll move. The cute effect here and now. Rotor brush takes a little bit of time to render, so you want to make sure you're on Lee Road or brushing the necessary parts, so we'll go ahead. We'll figure out right about where that finger enters, and we'll turn the beginning of that clip by pressing all left bracket well scrubbed forward as soon as it is no longer covering the face of our devices from the end. By pressing all right bracket, or you could just drive the end again. Now, with double quick, the footage to go into the actual footage will come up here to the Rodeo Brush Tool. We'll select that, begin to read a brush now. The green circle here represents areas that we don't like to include in the road, so you just want to drag this along the inside of the air you'd like to include, and it could be pretty rest the road a brush, recognizes contrast and really adjust to the edge of what you're trying to grab. Now you can see here The pink area is the area where including we're currently including a little too much of this arm in the hand Here, it's on order. Subtracted area. You just hold down all on the circle, will switch from green to red and just outlined The outside of the shape you'd like to remove Just go like that And that'll term that in nice and tech. And so now we can do is we can frame backwards by pressing command left bracket frame by frame making sure the rodeo stays attached to the finger. And now here you can see we're losing a little bit of this area in between the index finger and middle finger, and we compress all to get rid of that. But really, in this case, you don't have to worry about that area since it's not actually covering the device. So go ahead and will continue to scrub backwards and again won't just go on the way. Make adjustments as you can remove that area. Maybe add back in a little bit around this year. Backtrack No one backtrack. One more friend and now we'll go ahead and scrub forward and you can see Loretta again. This is where we started. I won't do the same thing. Going forwards go forward frame by frame by pressing command right arrow and again have a little extra space here. So just go ahead and press all to remove that. Make a little bit of an adjustment before and we're out, and we should be good that now the rodeo brush won't work unless you quick here on this freeze button. So this is gonna go ahead and freeze our rotor brush in place. That takes a little bit. So just go ahead and let that do it. Stay. Can I take through my father? And they have it so naff we pop back into our main com. We're back to a similar situation with finger deposit over top of our device screen, and we've maintained a green background. Now you can see the edge of the road. Oh, is a little rough when we want to go ahead and refined that, using some of the tools and the effects controls over here. So maybe we can increase that feather about 10. You can shift the edge in just a little bit maybe, like 2%. And now what we want Dio, you can also reduce the chatter. Now the chatter these little jagged edges on the side of the road over. Maybe we can just bump that all the way up to 50% and you can see that should smooth out all our edges. These a little bit of blushing blur. Well, decontaminate the edge card. Remove some of the green. You can come back in here. We're already looking a little bit better, but as you can see, it's not perfect. We zoom in. You can still see some of the green outlining the fingers here. But what's great now that since we already have the rodeo, we're not We're not worried about the background and we have to hand isolated. We can come back in defects King to effect King. He light. Go ahead. We can select that green color we know somewhere this background and then we zoom in here. You can see that we've now removed some of that green from the outside of the finger. Things were looking at last minute. So if we go ahead and jump out now composited device screen brought a scope the finger over top maintained a green background and we saw her. Nice watch animation. That happens as soon as that figure was a friend. We want to get a little more realistic on this device. Green. You can add some motion board of that as well. It's the rate your calm. So that was at a tiny bit emotion border with subtle movements. One thing I like to do that gives you more control of the screen. So like to create a duplicate of the device screen present Command D We're going up to edit you. Okay. I like to take this bottom copy and go to effect, generate Phil also, to save some render time, you go into a layer time freeze frame created still cause we don't actually need the animation. Here. We're century just creating a black salt. So I'm gonna take this from red, make it black. So now what I can do is I can go into our our top screen here. I compress tea on my keyboard for rapacity. I could just bring the capacity down to something that looks a little more realistic. If we think that right now at full capacity. Maybe it's a little too vibe looking. Just dim that down a little bit. Maybe 70% or so. Now I have an animation that looks a little bit more embedded in that watch as posted. Something that stands out. So obviously, composited. There you have it. Go ahead and render that out. Thanks to be looking pretty good. 5. 05 Outro: thanks everybody for falling along with me in this class. We went after effects and mocha to track our footage and composited device screen would have set up the tracker and mocha using corner pins and exporting that data into after effects. And then we learned how to composite the device screen by using color King and wrote a scope. See you next time.