Tuesday, 9 October 2012

Motion Tracking

As my final project involves combining live action with CGI, I have to commit research on the subject of motion tracking/ match moving and figure out the methods/techniques that would be the most effective in order to achieve the desired effect. I managed to conduct most of my research on this subject by discovering several videos and sites on the internet that show many specific tutorials on how to perform match moving and motion tracking. I learnt that Autodesk MatchMover and Adobe After Effects could both be useful in different ways of achieving motion tracking, although MatchMover is in some ways more complex than After Effects.

Research

The links below are to a series of tutorials from which I acquired information and several techniques on how to perform match moving in MatchMover and After Effects.



Match Moving for Maya - Part 2 - Setting up in MatchMover and Automatic Tracking

Match Moving for Maya - Part 3 - Manual Tracking, good and not so good points

Match Moving for Maya - Part 4 - What not to track and when to say, "enough!"

Match Moving for Maya - Part 5 - Reasons for tracking certain points and filming tips

Match Moving With Autodesk Match Mover







Video:After Effects Motion Tracking Tutorial - AcrezH

Experimentations

Autodesk Matchmover


I attempted to test out Matchmover first to see if I can operate the basic settings after viewing several of the tutorials I have listed in my research.


To start off, I attempted to use a sequence of footage that I had filmed for this test. I produced an image sequence of the clip in After Effects first, saved the image sequence into a folder and then imported it as a continuous clip into MatchMover.



Selecting an image in order to create a sequence beginning with said image.



Then I used the option “Automatic Tracking” so that several markers will be automatically applied to several points throughout the clip so I would use those markers as reference in order to synchronise with the camera movements later on.


I then used the Automatic Tracking Settings menu to alter the density and sensitivity modes, therefore altering the amount of trackers applied to each image of the clip and how they will all stick to a certain point continuously.




After all the trackers were rendered and converted into cone markers, I used the navigational tools at the bottom right to view the virtual camera scene in order to see how the scene worked out. And also seeing how the virtual camera would follow a path, similar to how the live action camera filmed the clip.


Attempting to use the Solve for Camera mode to find out what it does, I still have yet to know exactly how it works.



For a while I couldn’t figure out how to get the exporting to work but then I realized that the export would only work by creating a new file from scratch but by saving it to an already existing Maya file. Tried it on a .mb file that I created to test it on, it still didn’t work and I got the same error but then I noticed it said “Maya(*.ma)” so I went back into Maya and saved the same scene as a .ma file and when I exported to that file, it finally worked.


Opening up the file back in Maya and I was surprised that it actually worked. Of course the markers were all laid out in the scene in the same space as it was rendered back in MatchMover so I had a little play with the navigational tools once again to see the layout more clearly. The image plane that was fixed on the camera was not displaying the image sequence of the clip at first so I had to select the plane and browse for the file in order to set it back up so I could view it in the perspective panel.




Of course, I viewed the scene in the camera panel to see how it played out and I found that due to certain keyframe errors, the camera jumped dramatically every few seconds in one part of the clip. All the markers stayed in the same place but the virtual camera needed fixing in certain areas so I would have to attempt to solve the problem by using another technique in MatchMover to get a better result. But I saved a rough clip of the sequence using Playblast and attempted to produce a few movie clips to keep a reference of the test.


This test didn't turn out quite so well as I thought so I'll have to make a few adjustments in order to get the next test working better than this one. Of course, I still have yet to figure out how to work the rest of MatchMover’s techniques so I’ll be able to use it more with Maya later on in order to properly synchronize CGI environments with live action camera movements.

After Effects Motion Tracking



With this test, I decided to use After Effects for a simpler tracking technique. After importing a footage clip of a field (where I take my dog for walks), I started off by using the tracker controls menu in the bottom right of the screen. I didn't have to stabilize the camera movement so I just chose "Track Motion" and began searching the clip for certain points where the markers could stay focused on. I may have used the markers in several areas of the clip before I settled on using both position and rotation mode, had to use more than one marker. Then I analyzed the clip so that the markers would stay on the certain points as the camera moved, creating a keyframe for each single frame of the clip.






Attempted to use a perspective parallel mode with the markers but it did not have the desired effect.


Once the clip had been analyzed and the markers had been set with keyframes, I attempted to transfer those keyframes over to another layer. I did this by creating a null object, editing the target of the null object and transferring the key frames to that object. As I was applying the keyframes to the null object, I set the option to "X and Y" so that it would affect the object horizontally and vertically. 



Then to try it out, I imported an image of a CGI building that I had produced in Maya at an earlier time and set it up where I wanted it to be. Then I used the Keylight mode, which is an advanced chroma key technique, and altered the settings to remove all green colour as well as alter the screen matte settings so as not to have any part of the building looking transparent.


Then using the parent link mode, I linked the the image of the building to the null object so that it moved with it, staying in the same place as the camera moved instead of remaining stationary. Then to make it blend in more with the footage, I altered the colour, tone and added a photo filter layer on top.


For an extra, I attempted to use the same image twice in the same clip, using a simple masking method so that it looked as if it was behind a chair and parented that image to the same null object.

This here is the original footage with no changes made at all.




As you can see in this clip, now with the CGI fake looking building added in, I have managed to successfully achieve some effect with the motion tracker mode in After Effects but if you look closely, you can see how the building changes position slightly as it goes out of sync with the footage which is due to a defect in a few keyframes on the tracker’s part.





This clip is almost the same with the motion tracking defect but with another building set in the distance with some masking attempt.

So these tests have had a few defects already but I will be sure to overcome those problems by trying other methods in different ways to achieve a better result.

No comments:

Post a Comment