Tuesday, April 13, 2010

MatchMoving - Icarus (and optionally Voodoo)

Week 3: Match-Moving
We will be looking at the process of motion tracking (AKA, Match-Moving). The process of match-moving is a way to  process raw video taken with a camcorder, and retrieve information about the position/rotation/zoom/tilt of the camera so we can emulate those EXACT movements in 3D space. The end effect is to be able to seamlessly composite 2D video with 3D models. Here are some useful links, notes and thoughts about the process:
---------------------------------------------------
Icarus Program Download and Support:
http://www.colinlevy.com/tuts/IcarusTutorials/Icarus.php
(please note that this software is a personal edition, not meant for commercial work and is no longer supported by the software engineers because the company was bought by a larger software entity. The commercial version went on to become PFTrack).

There are a number of useful video tutorials on the above site that will get you started.

Notes about using/shooting video:
  • Using a camera to pan/tilt/zoom is easier for the program to recognize and calibrate. Use a tripod when possible.
  • We will experiment with shooting in HD and down-sampling a copy video to DV quality for the matchMoving calbration. In the final render we will reuse the HD version. I am using HD video, compressed down in Adobe Media Encoder to two files: a 480P version and a 1080P version (.MP4).

Notes about Calibration:
  • If there are moving elements in the video that you want Icarus to ignore, you can mask out that element. Go to TRACKING>NEW MATTE and create a new matte by click points to make an N-gon shape. You can go to a new point in time and move those same points and Icarus will auto keyframe between the two times.
  • There are two kinds of tracking: User Feature Tracking (manual) and Auto Tracking. Generally speaking, auto-tracking works better for more organic shapes that lack distinct features or hard angles, and it is a lot slower to track. User Feature tracking is faster and is better for angular features in video.
  • When Auto Tracking, start with TRACKING>TRACKING PARAMETERS. Setting the 'Num Auto Features' determines accurace (more featuers = more accurate, more wait time). Same goes for 'BackTracking' which tracks the video backwards after it is done tracking forwards.  When you are ready, go to TRACKING>AUTO-TRACK and let the program do its thing (this will take a while...good time to make coffee).
  • If there are areas of video that show clearly defined Y or X axes, it is a good idea to Go to the COORDINATE FRAME icon in the left-hand panel and draw two parallel lines for the Absolute X and Y axes. If you do this, then go to CAMERA>ESTIMATE FOCAL LENGTH to improve accuracy.
  • If the Auto-Tracking feature doesn't do it already, you need to calibrate the video (after it has found the tracking points). CAMERA>CALIBRATE.
  • When it is done, you should see a ground plane and a blue ball in your video...if not go to VIEW>GROUND PLANE. Choose a green tracking point that you want to be the main area in 3D space where you animation will take place, right click on that point and choose 'SET AS ORIGIN'. This will become the 0,0,0 origin in Blender. If the grid that appears look off axis, click on the 'Coordinate Frame' icon in the left hand panel and left mouse drag til the ground plane looks better.


Notes about Getting 3D data into Blender:
There are two steps in getting the Icarus camera data:
  1. Export 3D Data by going to PROJECT>EXPORT 3D MOTION from Icarus. For the format type, choose 'Human Readable (.txt)'
  2. From Blender you need to open the Icarus import Python script (called 'ICARUS_import241.py'). If you are on your own machine, you probably want to copy this file to your Blender python script directory. But if you are on a lab machine, simple go to the TEXT EDITOR window type in blender, and open the python script from there. Then go to TEXT>RUN PYTHON SCRIPT. It should then copy the 3D camera data from Icarus to your camera. You may need to select your camera prior to doing this.
--------------------------------
If you want to look into an alternate program, check out Voodoo.
Here is a pretty good looking tutorial:
http://fictionality.co.uk/doku.php?id=tutorials:matchmoving

If you fall in love with this process and want to take it to the next level, consider purchasing PFTrack 5, higher end, more polished, and roughly $150 for an academic license.

      No comments: