Start learning with our library of video tutorials taught by experts. Get started
Viewers: in countries Watching now:
VFX Techniques introduces common yet critical visual effects techniques that are used in film and television shows on a regular basis. This installment shows how to build complex composites with Adobe After Effects and mocha, where motion graphics are mapped to live-action footage of an actor. Author Lee Lanier starts by combining rotoscoping and effects to digitally apply makeup to an actor to disguise motion tracking marks. Then discover how to transfer footage into mocha and generate planar tracking data that you can use to motion track graphics to the moving face of the actor. Plus, learn how to build and adjust motion graphics to create the look of a virtual tattoo and a pair of holographic heads-up glasses.
We've finished creating our heads-up display. Now, we're ready to go back into mocha, and retrieve the tracking data. This is mocha once again. And where we left off was making sure that the planar surface was tracking with the face, which it is. So, as long as this layer is visible, which it is, the Eyes layer, I can go right down to the Export Tracking Data button, click that and make sure it's set to Format: After Effects Corner Pin. Now, instead of saving to the clipboard or copying to the clipboard this time, I'm going to save to an external text file.
So, I'll click Save, and save it out as a text file. I already have one called Eyes.txt, but I can always make a new one, like Eyes2, and click Save. Now, I can return to After Effects. Here's where we left off in After Effects. We had finished the heads-up display and masked it into a rough shape of a pair of sunglasses. I'm going back to the Spy composition now, and I'll go ahead and leave everything off for the moment just to save time. I'm going to drag the heads-up Mask composition into this one and drop it on top.
Now, it's empty for the first 90 frames, because there was no background there, because the footage started at frame 100, and we had a green solid at frame 90. Here it is right here though. What I need to do though, before I apply tracking data, is make sure that the top-left corner is positioned in the top-left corner of the frame. Top-left corner of the frame is 00 in After Effects space. So, for the tracking data to be applied correctly, I need to push this artwork up here to the left. I can do that with anchor points.
In this case, it would be 640 and 360. There it is at the top-left corner. I'm going to go back to frame 0, and then retrieve that file I wrote out. I am going to use Notepad, but you can use any plain text editor to open the file you saved for mocha. There is Notepad. I want to select everything, and this is just a very long list of keyframes and the XY positions of corner points. So, I'm going to use the Select All option, highlight everything, and go to Edit > Copy, return to After Effects.
Again, make sure I'm on frame 0, select that layer, HeadsUpMask, and then paste. All the keyframes come in, for the Transforms, also there's a new Corner Pin effect, with all the corners animated. I don't see much now because, again, the first 90 frames are basically empty. So let's go to a different frame number and check it. There we go. I am going to go to frame 275 because in mocha, that's where we originally set the position of the surface, the planar surface, and I'll zoom in.
Now, here's where we can decide if we want to adjust the mask or not, because we roughed that glass' shape in, we might adjust it to fit the nose better. Another thing we can do is adjust the scale. If we select that layer, we can see that its anchor point is basically in the center there of those glasses, and that's where it's attached to the motion path. So, we can change the scale without ruining the actual tracking. They look a little small now, so what I can do is while I'm on frame 275, is adjust the scale.
I'd say that looks pretty good. Now again, I mentioned the mask. It looks like I might need a little bit more room for the nose. If I go to an earlier frame, I have some issues with the perspective here. So, if I widen out that bottom area of the sunglasses or glass' display, I won't have an issue there. So I can return to the HeadsUpMask, display the mask, and adjust that. Now remember, there are two masks here, one on the bottom and one on the top. So, you'd have to adjust those separately and make sure they match.
So, there is one layer adjusted. I can adjust this one now, like that. Let's say that a little bit more room will look better. I can go back to the Spy composition, and take a look. And I can also flare out the bottoms too. I'll go back one more time, and maybe flare it out like this. This will take some experimentation.
Let's try that for now. Back to the Spy composition, and there we go, it fits a little bit better. I'll go to a later frame. Okay, let's say the scale is good. You can continue to adjust that if you want to. I would do it on frame 275. Now, there is one issue with that and that's if you do adjust the scale directly right here, it's only going to adjust one keyframe. It's important to remember. You really want to adjust the entire row of keyframes. So let's go into the graph editor and see what happened here.
Well, the one keyframe I adjusted is over here, it's been pulled up way too high. It's out of line. In fact, I can just select that little area of keyframes, and frame that area, and you could tell that I really pulled up too high. It's not similar to anything around it. Now, I can get that back down to where it was, right here. I really would want to offset all the keyframes at once. So, I framed them all right here, and I'll select them all.
And then, while I'm on frame 275, move them up and down to adjust the scale. Be careful not to move them left or right if you can help it. There we go. So now I'm able to scale it up, but keep my overall motion-tracking intact. Okay. Let's say it looks pretty good. Close the curve editor.
Now, I probably need to adjust the mask more, but that will be fine for now. Another thing you have to consider is if your heads-up display and motion graphics were correctly positioned, you notice that some of my text is being cut off here, so I could consider going back to my original HeadsUp composition and adjusting some of the positions, for instance, the text or text boxes. In the interest of time now, I'm going to move on. Now, there are some other ways you can make this HeadsUp display look better. It's very opaque, and it's very hard-edged.
Let's deal with the Opacity first. What we can do is animate the Opacity changing over time. Remember that with the tattoo animation, when she presses her finger, the tattoo turns on between frame 90 and 100. So, let's do something similar here. I'm going to go to frame 90. I'm going to key the Opacity at 0. Let's say it takes 20 frames to turn on, we'll have it flicker. I'm going to go to frame 110 and give its maximum opacity.
Now, it would be better to see through this as if it was a midair projection. So here, I'm going to make it 50% opacity. So we can see her eyes through that. And in between I'm going to fluctuate the opacity, so it's just flickering on like it's warming up, just random values, high to low or low to high. All right.
I'm going to play back this tiny section now. Okay, here's a little flicker on. Let's go on to the edge quality. It's very hard-edged. If it was a midair projection, we'd probably want a softer edge. So, let's try a tool that we sometimes use for a green screen. And that is the Matte Choker. Matte Choker erodes the edge of a layer in terms of the alpha matte edge, and can potentially soften it.
One way to do that is to increase the Gray Level Softness. Let's try 50%. We'll zoom in here closer, and now you can also just move the slider around to see what you get. So, there's a little bit softer. If I turn it off, here's before, and here's after. Let's wind up with a value of, say, 45. There we go. Now, since this is a midair display, another thing that would be nice would be to get a sense of glowy-ness, a sense that it's a light source.
So, let's apply a glow to it. Effect > Stylize > Glow. We'll adjust the various settings. Let's try 30% Threshold, 45 for the Spread, the spread out, the radius, and then you can make it more intense like this, or less. Let's try the default one for that. Okay. There's our heads-up display tracked onto the actress.
We were able to bring the tracking data from mocha by saving the tracking information out to a text file, opening the text file, copying the text, and then pasting it onto the new layer. Now, there were still adjustments to make in terms of the mask in order to get the glass' shape to fit, and that still needs some more work. And also, we were able to improve the quality of that heads-up display, once it's tracked, by affecting the edges through the Matte Choker, and applying a glow, and also altering the opacity. Now that we have the heads-up display working, one thing that we can use is some device that the actress has to project that into midair.
So, we're going to add an armature that comes out from behind her ear, with a little light projector at the tip.
There are currently no FAQs about VFX Techniques: Tracking Objects onto a Face.
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.