Join Lee Lanier for an in-depth discussion in this video Faking reflections, part of VFX Techniques: Building Replacement with After Effects.
We have integrated the matte painting, so that's starting to look pretty nice now. Now we can move on and remove this original center building. Now the only way to do that is to simply rotoscope that and subtract it. So I can go down to my Background layer, where that building is right now and draw a new mask, I'll grab the Pen Tool, draw a mask that starts behind the foreground building, goes across and above the third building, which I do want to save and across in between the old building and the trees and then close that. Initially that mask is additive but I can go down to the new mask that I just drew and change that menu to subtract and there the building goes away.
Of course, I need to key this over time so I am going to go ahead and key the first frame for mask path here then, go ahead and move to the last frame adjust that mask and then continue to bisect to key that, I'll do one more frame, move that over and then I'll let you do the rest of the keying, it probably will need quite a few more keyframes, but that gives you the idea. So that building is now removed, now we can look at the overall quality here. Now one thing that might be nice in order to integrate this building better would be to create some type of reflection, this is just a static Matte painting, so you are not going to get any moving reflection that you would normally get if you were truly walking down the street, something similar to what you see in these windows right here on the foreground.
We can fake that right in the composite though and go back to the FoundryCameraTracker composition and create those reflections right here. Now before I do that I want to rename a few layers, just so I know what's going on. This layer is the left side of the MattePainting, so I'll rename that MattePaintingL and this is the right side, so MattePaintingR. Now in terms of reflection what we could do is bring in some other footage or some other still image and mask it so it's just for the WindowsR to create a fake reflection. Now there is a problem of bringing the still image from some other source; I don't have that camera motion so it's not really going to match correctly.
It's going to look like it's sliding in a strange way. What would be better is to use the original street footage somehow because that has original camera motion in it, and that will line up quite nicely, let's go ahead and do that, let's pull on the street a couple of times. I'll put one copy on top of the Matte Painting Right and one on top of the Matte Painting Left. Of course those new street layers take over the entire frame. So we need to figure out a way to mask those where they appear just for the WindowsR so I am going to turn off the street layers temporarily.
What we can actually do is copy up the original matte paintings and then, create a Matte using just the window color, let's try that, I want to pick the Left Matte Painting, add a duplicate, that becomes L2, I want to pull L2 above the street, I'll do the same with the Right Matte Paining, duplicate that, pull that right above the street so it goes original, street, copy. Okay, I am going to hide the original matte paintings now and I'll get down to just my copies.
Now what we do there, so you can use a keying tool to concentrate just on the blue color where the windows are to separate out that section. For example I can go up to Effect>Keying and apply Keylight. Now normally keylight is used for a green screen removal but it works perfectly fine in this situation also. In fact let me just start with the left side, so Effect>Keying>Keylight. The first thing I'll do is select the Screen Color, I'll pick an average blue.
Instantaneously most of the glass is removed and becomes transparent. Now what might be nice is simply to reverse that effect where I remove the stone, but keep the windows. So one trick for that is go to the Screen Matte section, and invert Clip Black and Clip White. Now normally these determine what's pure transparent and what's pure opaque but if I reverse these, I get the opposite result and in fact if I use a value of 35 or roughly 35 for Clip White and roughly 70 for Clip Black, I'll get a good result.
Now I am not concerned about the color because what we are going to do is use this simply as not the source, as a reference, and in fact I can see the Matte if I go and change the view right here to Combine Matte, that's a nice matte right there. I'll return this to Final Results so we can go back. Now I guess we're going to use this as a source, so the trick there is use the Track Matte tool one more time. So what I can do is turn back on the Streets, turn off the L 2 and Right 2, show the Track Matte menus through Toggle Switches, and change these menus beside Street. So for this street, I'll change this Track Matte to Alpha Matte and this street to Alpha Matte also.
And when I'm done with that, I'll see that the windows are cut out, in other words the street is cut out in the shape of the windows. My right side doesn't really have the Windows showing up yet, because I need to get the keylight over there first, so what I can do is go to my L2 where keylight currently is and is currently set, Ctrl+ C or Command+C that, copy that and paste it onto R2, Ctrl+V or Command+V and there we go, so both sides are cut out. Now we don't have to live with where the reflections currently are, in other words, the streets were brought, in after the default locations so we get a default center chunk of those images.
In order to be more selective, what I can do is change the transforms of those two street layers to select a better section to create the reflection. So for example, if I go down to the lower street which creates a front reflection, I can fiddle around with the scale and position until I get a section that looks kind of nice. For example it might be good to get a section of the sky back, so you can change these things interactively, and you will see it slide across. I'll give you some values that'll work pretty well here, for Scale 105 and then for Position 736 and 568.
What that does is it pushes the building over so this center building winds up more here on the left, and I get a piece of sky back. What's nice about this is this building right here, that's reflecting, is the one we cut out anyway so people are not going to recognize it. Let's try the right side also. I'll grab this street, and change the transforms, and this one I'm going to leave the scale 100, but I'll try a different position, 672, 470, there we go, and that gives me a little piece of sky right here. Now I need to get back my original MattePainting so I am going to turn those back on left side and right side and the first problem is that the reflections mostly take over the building, I can't see too much of the building left and that's not good.
What I can do though is reduce the opacity of those two street layers. Let's say 35% for each one. And there we go, so now I can see the reflection on top of the original MattePainting. Now one last step that would be nice here is to somehow distort the reflections. Often when you walk down the street and you look at a sky scrapper, you will see that the glass creates a wavy reflection, that's because the glass is not perfectly flat. In order to do that, we can apply an effect to these street layers and the one that's perfect for this is called Turbulent Displace.
So I'll start with the left side Effect>Distort>Turbulent Displace. You will see instantaneously the reflection becomes wavy, now you can change the intensity and the size of that wave by changing the amount and size. So for example the amount I can experiment with, but then slide down to 20 or so and the size I can also play around with but I'd probably want a relatively small size, very, very subtle so I think a value of around 8 will be good.
Now I have to see this by zooming in, but this is with the Turbulent Displace and this is without, very subtle distortion, but as the camera moves you will see this. At least you will see that the building windows and building sides in the reflection aren't perfectly straight. Let's take a look at this now in the BuildStreet composite. We'll play back a short section and there we go. Now one problem is because it didn't finish keyframing the removal of the original building shows up for a second, but once you keyframe that mask completely that will go away.
Let's concentrate on the reflections though, take a look at the reflections over here. One nice thing is the reflections move relative to the building which is very accurate. The reason this happens is if I go back to the Camera Tracker is because the MattePainting itself is been tracked, it moves but my street layers are not being tracked, so they stay static. So two move relative to each other in the end and that's actually a very realistic result in terms of the fake reflection.
Learn how to track the footage with the Adobe After Effects 3D Camera Tracker, replace areas such as the sky, rotoscope moving elements such as buildings and cars, and integrate a digital matte painting so it gains appropriate shifts in perspective and scale. You'll also apply color-grading techniques and learn how to fabricate reflections. The course also covers an alternative motion-tracking workflow with the Foundry CameraTracker plugin.
- Using the After Effects 3D Camera Tracker
- Applying tracking data to 3D layers
- Constructing and refining motion graphics
- Keying out the sky
- Rotoscoping to remove and save features
- Using the Foundry CameraTracker plugin
- Creating reflections
- Color grading