Skip to main content

PolyChase

CAMERA TRACKING & MATCHING
📖2 min read

Introduction

Polychase is a free, open-source add-on for Blender that performs mesh-based 3D motion tracking.

Its core function is to track the movement (pose, or rotation and translation) of a rigid 3D object (mesh) within video footage. It is an alternative to commercial tools like GeoTracker.

The process relies on:

  1. 3D Mesh Input: Requiring a 3D model of the object being tracked.
  2. PnP Solving: Using the Perspective-n-Point (PnP) problem, where 3D points on the mesh are matched to 2D locations in the video.
  3. Optical Flow: Automatically generating correspondences using sparse optical flow data.
  4. User-Guided Correction: Allowing manual correction via a "bin mode" (interactive 3D pinning).
  5. Refinement: Using factor graph optimization (a form of bundle adjustment) to globally smooth and refine the final motion trajectory.

The outcome is a 3D mesh that remains accurately "glued" to the moving object throughout the video sequence.


Key Features

Smooth Follow

Makes the camera follow a target object with adjustable smoothness and lag.

Damping Control

Control how quickly the camera reacts to the target's movement.


Installation & Usage

Installation

  1. Download the addon from https://github.com/theartful/polychase
  2. Install the script/addon via Edit > Preferences > Add-ons.

Usage

A step-by-step guide for using the Polychase add-on for motion tracking in Blender:


1. Scene Setup and Video Analysis

This phase prepares the scene and extracts initial motion data from the video.

  1. Import Mesh: Import the 3D mesh of the rigid object intended for tracking.
  2. Create Tracker: Create a new Polychase tracker object.
  3. Define Inputs: Select the appropriate geometry (the mesh), the camera, and the video clip within the tracker settings.
  4. Set Database: Specify a location to save the SQLite database file. This file will store the generated optical flow data.
  5. Analyze Video: Start the video analysis process. The tool automatically generates sparse optical flow data.

2. Initial Mesh Alignment and Masking

Align the 3D mesh with the object in the footage and define areas to exclude from tracking.

  1. Set Focal Length: Adjust the camera's focal length in the tracker settings if the value is known.
  2. Enter Bin Mode: Activate bin mode to begin manual alignment.
  3. Align Mesh: Create and drag bins (2D points corresponding to 3D mesh locations) to align the imported mesh to the object visible in the video footage.
  4. Mask Geometry (Important Step): Press M to activate masking. Mask parts of the mesh that should not influence the track, such as:
    • Transparent areas (e.g., windows).
    • Moving or deformable parts (e.g., spinning wheels).
    • Inaccurate mesh areas.

3. Automatic Tracking and Inter-frame Correction

Execute the primary tracking process, pausing to correct drift as needed.

  1. Start Automatic Tracking: Use the automatic tracker function to track forward or backward through the timeline.
  2. Stop and Correct Drift: If the mesh begins to drift away from the object in the footage:
    • Stop the tracking process.
    • Re-enter bin mode to manually correct the object's pose at that specific key frame.
    • Run refinement on the segment tracked so far to adjust the motion between the corrected key frame and the last known good position.
  3. Repeat: Continue alternating between automatic tracking, manual correction, and segment refinement until the desired portion of the video is covered.

4. Final Global Refinement

Execute a final optimization pass for maximum global consistency.

  1. Refine Entire Segment: Run a comprehensive global refinement on the entire tracked section. This uses factor graph optimization to jointly minimize reprojection error across all frames, ensuring globally consistent motion.

Tutorial Video: https://www.youtube.com/watch?v=W4HNmcjFuLw


Summary

Camera chase tools add a layer of professionalism to animations by removing the robotic feel of standard parenting. They are essential for dynamic presentations.