PolyChase
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:
- 3D Mesh Input: Requiring a 3D model of the object being tracked.
- PnP Solving: Using the Perspective-n-Point (PnP) problem, where 3D points on the mesh are matched to 2D locations in the video.
- Optical Flow: Automatically generating correspondences using sparse optical flow data.
- User-Guided Correction: Allowing manual correction via a "bin mode" (interactive 3D pinning).
- 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
- Download the addon from https://github.com/theartful/polychase
- 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.
- Import Mesh: Import the 3D mesh of the rigid object intended for tracking.
- Create Tracker: Create a new Polychase tracker object.
- Define Inputs: Select the appropriate geometry (the mesh), the camera, and the video clip within the tracker settings.
- Set Database: Specify a location to save the SQLite database file. This file will store the generated optical flow data.
- 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.
- Set Focal Length: Adjust the camera's focal length in the tracker settings if the value is known.
- Enter Bin Mode: Activate bin mode to begin manual alignment.
- 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.
- 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.
- Start Automatic Tracking: Use the automatic tracker function to track forward or backward through the timeline.
- 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.
- 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.
- 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.