I've been holed up in my bat cave doing VFX work for the last month on a feature film called Neshima. As with any rush, rush, rush, schedule a few things were missed during production at which point they say...come on, we all know it....................."we'll fix it in post." I'm pretty sure I heard a collective worldwide groan from outside my bedroom window just as I typed that "p" in the phrase. Yes, "we'll fix it in post" is a reality we'll all have to deal with at some point.
Tonight I want to talk about a little technique I used to fix a wall that needed to be extended. Part of the film takes place in straw huts that the villagers live in. The problem is that the straw walls on the indoor set weren't quite long enough and when the camera panned around to catch the actors movement there was the flat black wall. At least there wasn't green screen spill!
So while sitting in my bat cave, I put on my bat thinking hat and opened up my bat utility belt (i.e. After Effects) and went to work. The first thing I needed was a matte. This came from copying the end of the wall on the left and repeating it.
To anyone familiar with Photoshop, this was a no brainer. However the camera was panning around. That's how we ended up with the black set wall exposed on the left. Alright, says the After Effects experts. We'll just do a track on the position of the wall and slave the position of the matte to the motion tracker. The problem is that we have smoke in the shot that's diffusing the wall. After Effects can track motion with me manually watching for random incorrect jumps in position, deleting the jumps, then re-starting the tracking. However, because the wall is diffused with smoke the tracking is slightly inconsistent. So much so that the matte seems to lag the actual wall in the shot and you get a type of rubber band elasticity between the matte and actual wall when the camera moves. That's clearly not going to work.
What After Effects did was get me in the ballpark with the motion tracking. I now had to go back in and key frame the anchor position of the matte frame by frame. This created another issue. Since the wall is diffused (kinda blurry really), it's hard to tell if I'm actually lining the two up correctly or if I'm still off. This is where the innovation had to come in. After a few minutes I decided to try to align the two layers via color.
As you can see in the photo below the top layer has a mask with a 27 pixel feather and 27 pixel expansion. On the top layer I used the Color Combiner effect to remove blue and green. Likewise, on the matte layer I removed red. So when I set the top layer mode to "Add" then I got back the wall's straw color in the mask feather area. If I saw fringes of color in the feathered area then I knew the matte wasn't perfectly aligned to the wall and I adjusted the anchor position just slightly for each frame. This aligned things rock solid. No more rubber band wall, even at 4k resolution.
Lucky for me, this was a pretty straight on angle. When cleaning up another wall shot that was more at an off angle I had to use the same technique, but also tweak the scaling a few percent per frame! This was despite using position, scaling, and rotation in the track. The smoke was throwing off the tracking just enough to be noticeable. Doing these frame by frame tweaks wasn't easy from a time consumption point of view, but it worked equally well as the technique I discuss here. I could clearly see when the matte wasn't tracking the wall perfectly and make a slight adjustment.
Hopefully that helps more of you After Effects bat-cavers out there.
HOW WE DID IT: Doc Style
2 years ago