Saturday, May 15, 2010

Process Explained in Detail

Happy Saturday Peoples!!!!

I would be more focused on my work today but, I recently read a tweet that just annoyed the fuck out of me and has served to be more of a mental distraction than I aniticipated.

So, in an effort to put the subject to rest mentally and to give anyone who is interested in After Effects an idea some of the things it can do as well as explain to my friends why there has been an absence of AJ from their lives.....I am outlining, (rather quickly cause I want to get back to work and not have my focus drawn by ignorant remarks any longer), the process I am undertaking.

Just a note: The director, Mattson Tomlin, has been very cool about the work and even when I explained my O.C.D. tends to make me a perfectionist and I shoot for realism in the work I do, (instead of just churning shit out and in doing so taking away from the quality of the finished product), was more than gracious in telling me to 'go ahead and be an artist'.

To start, I was originally to add muzzle flashes and debris which is actually a very fun thing to do and much easier and far, far cooler. This task was assigned to Michael Oshins (also of the rap group Bodysnatchers) who did a great job and you should check out his blog. But, it was Mattson's preference to assign me with the task of creating and incorporating elements into a scene that has already been shot with the actors. I gave a good example of this in a previous posting. This posting is, again, to explain the process and give a brief 'how to'. My friends thought this was an automated process and shouldn't be too involved. So, now they, the 'tweeter', and you know...

Processing the footage


I had to split the scenes to separate the footage so I could work on each side of the room. This was done to aid in the speeding the rest of the processes along so that there was a continuous flow of that angle start to finish. Otherwise, the things like motion tracking and masking motion become more complex. Because of the interruptions of the camera angle changes you will find yourself having to to set the parameters for each individual segment which WILL throw off the motion tracking.

So, I used the raw footage and created four compositions, the final, elements, angle one and angle two. Go to the composition titled the final. Layer one should be the raw footage. You then want to drag the elements composition into the final composition and position that layer on top the raw footage layer. You do the same with each the angle compositions. This way as you go along and can see the resulting effect by turning the masks on and off in the angle compositions.

In each of 'angle' compositions I went through and simply removed the opposite angles' footage. These are the compositions that become the extracted actor that will be layered back on top of 'the final' composition over top of the elements layer.

It is prudent to give your layers names because the layer number will change if any layers are put underneath of it. So, it is easier to know your layer names than to try and keep track of the changing numbers.

Extracting the actor/subject


Basically, what you need to do is to create a mask around the subject you are trying to isolate. Now for the most part, you will read on other sites that you want to do it with the fewest points as you can get away with. That's great for some situations or you have the ideal footage, have at it and have a wonderful day and good luck with that. That really applies when the subject matter can be easily drawn out and is not doing a whole lot of moving despite the camera rolling.
However, you are going to run into instances where the subject has no real clear outline, is moving constantly and is actually going to be placed on top of incorporated elements. By doing the 'standard' method, the result will have a halo of the background around the subject as seen here:



Any self respecting artist would, or should, cringe at the thought of putting out a product like this and making their client/director settle. Yes, you can tweak the setting of the mask with expanding and feathering but even that will only do so much and should never be the fallback answer.

Because [character name] Barry, real name Dan St. Louis, is wearing a grey shirt against a pale grey/green wall with no back lighting and, due to the nature of the scene, is very animated, these rules simply do not apply. There will be blood spatters adorning the walls in both cast-off and arterial spray patterns so his masking needs to fully accurate throughout his entire form. Tracing every crease or wrinkle in the shirt and maintaining the integrity of the hairstyle. During this process, I recommend your mask property setting to be set to 'None'.




After Effects CS5 comes equipped with a new tool called the 'Roto-brush' which is to make a much easier and more efficient task of this very job. However there are no real users' controls in regard to the selection process and fine tuning how the computer reads an area by matching pixels. So, watching it action on ideal footage it is very impressive. However, most footage out there is not being shot with the intention of having work like this done to it. So, for this instance, the lack of being able to refine the selection process caused this to be a tool that could not be used for this project. The problem? It saw the wall on Barry's left and the left side of his shirt as matching pixels.

None of this is not a criticism of the footage, mind you. This is actually going to be more the standard if you are working with the general public and indie films as opposed to studios that are shooting with the intention of adding elements as I am finding out while being approached with other projects. So, there are no absolutes to this because even the extreme method I am using is because of the full body motion masking is essential to the rest of the work looking good as a finished product.

Isolating the actor


Once you have your actor/subject completely masked, move to the next frame and adjust all the points around the actor to match the new positing. It seems an easy enough task until you consider you have 29 frames per second. So, even just a ten second clip means 290 frames that you need to do this process to. One trick that works to a degree is to do a couple of frames in the beginning and go to the end of the clip and do a couple of frames and the mask will transform itself in the frames in between and you go through and make some adjustments along the clip. However since Barry is jumping into frame and moving about with excitement screaming 'Surprise', (and boy was he ever surprised in this scene), that trick didn't work out well and served to be more time consuming than to just advance frame by frame and make the adjustments along the way as opposed to undoing what the computer anticipated the next move to be.

Anyhoo...once you have your clip done or anytime you want to see the final effect in the final composition, you turn the mask property to 'Add'.




Creating the elements


Using Photoshop I created a 'Happy Retirement' banner. The thought had occurred to grab an image off the net, but that wouldn't be very artistic of me, would it? I then bring the banner.PNG (you need the final image and not the layered PSD file) file into the project in After Effects and open it as it's own composition and called it banner.



Using Zaxwerks 3D Flag and the directors' notes I was able to create a realistic banner from the image. Note: 3D Flag has it's own lighting tools that you will have to tweak to match the light color and source of the room in the raw footage. This is very important because the shadows from the material need to follow the shadows of the room.



You will then import the banner composition into the elements composition. By clicking the 'eyeball' icon to the left of the layer in the composition window, you can turn the layer's visibility off to ease with the rest of the processing of this composition.

In the composition named elements you have the raw footage layer. This footage will only be a guide layer to work with to allow you decorate the scene with the elements and to set and tweak your motion tracking that you will in turn anchor all the incorporated elements to. This footage layer will be deleted or turned off when layered into the final composition to make for much speedier rendering process.

Like the banner, I am creating the blood spatters in Photoshop then importing the .PNG files into the After Effects project and elements composition. I use .PNG because of they have the clearer and more refined look needed for transparent backgrounds. The .GIF format doesn't handle fade at all and will add white to compensate for the lack of color information in the edge or faded areas.

So, the first thing to do would be to set the motion tracking. The motion tracking panel/tool can be accessed in the upper right on the toolbar where you see the word 'Workspace' [see purple circle below]. Click the selection arrow next to it and scroll down. The tool panel [see white circle below] has options and parameters to set. You can track motion by using a single tracker [see green circle below]. You can track motion, rotation and scale by using two or more trackers, which will require you to find two or more good reference points on the footage. Be sure that nothing in the scene crosses between the camera and your reference points and that it does not go off camera for a split second. That will break the tracking and not do you much good at all. You start the process by hitting the 'analyze 1 frame backward', 'analyze backward', 'analyze forward' or 'analyze 1 frame forward' buttons in the motion tracking tool panel.



You then create a null object layer and name it 'Tracking'. Then you go into the motion tracking tool panel and hit 'edit target' and choose the 'Tracking' layer. You need to hit apply to add the motion tracking data to the 'Tracking' layer. It is this layer and data that you will make adjustments when refining the motion tracking.

Once you have that done, you start bringing in and positioning the elements into the scene starting with the banner composition if you have not already done so. Change the 'parent' option on the added element layers from 'none' to 'Tracking'.



Once your elements are in place and are parented to the 'Tracking' layer, we start putting it all together and go into the refining process of tweaking the work and blending it back into a single scene.




The refining and tweaking is a personal thing and I will leave the room while you do it.

Now, this particular footage ends with the lights being turned out in the room. For this, I keyed to the exact frame when the lights go out and adjusted the lighting of all the elements to match, instead of just splitting clips and deleting. This gives a much more desireable effect because you still see the elements in the darkened room along with the actor as demonstrated below.



Thus draws this posting to a close. I hope that it gives a bit more insight and understanding as to the process involved and educates or inspires as well as keeping others from being so judgemental in their commentary.

While I do not expect this posting to envoke a public apology to match the attempt at publicly humiliating me on the Internet, I do hope that it causes the mad tweeter to think twice before opening their mouth without any knowledge of what they are talking aboot [intentionally mispelled].

You can find video tutorials on After Effects on sites like Andrew Kramer's Video CoPilot or Creative Cow and Lynda.com

'Til next time...
Cheers!

All video stills and images courtesy of
Mattson Tomlin & Wackeychan Studios
.

3 comments:

Michael Oshins said...

Fuckin' Awesome post AJ. Thanks for sharing.

AJ Evans said...

Hey Michael,

Thanks man. You did an awesome job with the muzzle flashes. I was actually pretty jealous, dude. :) Keep up the great work.

Michael Oshins said...

Thanks for the link AJ. You knows I'm gonna link it back! No reason to be jealous, I learned everything I know from Andrew Kramer. You work with Maya or 3DSMax at all? I don't but I certainly want to learn. I'm trying to decide which one I should go with.