Certain aspects of PFTrack can be customised, extended and controlled through the use of configuration files.
Some of the files can be located in different folders depending on where you wish to place them. These folders are called, respectively:
The system folder:
/Applications/The Pixel Farm/
The application folder:
/Applications/The Pixel Farm/PFTrack/
The user's documents folder:
/Users/USERNAME/Documents/The Pixel Farm/PFTrack/
In addition to these locations, a directory path can also be set for different file types in the Preferences window. Camera and tree presets are also stored in the
presets sub-folder in the the user's documents folder.
If you make any changes to these files, you may need to restart PFTrack to pick up the new files at launch time.
Export scripts for different file formats can be generated using Python script files located in the
exports sub-folder of the system or application folder, and/or the user's application documents folder. Each file in these sub-folders defines a single export format.
PFTrack installs a default set of export format files in the
exports sub-folder of the application folder which can be used as a starting point for customization.
Export formats are Python scripts and are described in the Python API documentation.
Test objects can be generated using OBJ, FBX or Open Alembic files located in the
test_objects sub-folder of the system or application folder, and/or the user's documents folder. Each file in these sub-folders defines a single test object.
PFTrack installs a default set of test object files in the
test_objects sub-folder of the application folder.
Macros can be generated to perform collections of tasks such as automated feature tracking and camera solving, and are created using Python script files located in the
macros sub-folder of the system or application folder, and/or the user's documents folder. Each file in these sub-folders defines a single macro.
PFTrack installs a default set of macro files in the
macros sub-folder of the application folder which can be used as a starting point for customisation.
Macros are Python scripts and are described Python API documentation
In addition to the built-in nodes in PFTrack, customised nodes can be created to perform user-defined tasks (for example, manipulating tracking data or camera motion). These nodes are created using Python scripts located in the
nodes sub-folder of the system folder, the application folder, and/or the user's documents folder. Each file in these sub-folders defines a single node.
PFTrack installs a default set of node files in the
nodes sub-folder of the application folder which can be used as a starting point for customisation.
Customised nodes are Python scripts and are described Python API
metatags.xml file can be used to customize how metadata is read from media files. An example file is included with PFTrack and is available in the application folder:
/Applications/The Pixel Farm/PFTrack/metatags.xml.
This file contains a list of metadata tag names, collected into a hierarchy, such as:
<metatags> <photo> <body> <make>Exif.Image.Make</make> <model>Exif.Image.Model</model> <serial>Exif.Photo.BodySerialNumber</serial> ... </body> </photo> </metatags>
In this example, the metadata tag
Exif.Image.Make is used to define the camera body make for photogrammetry,
Exif.Image.Model defines the camera body model, and
Exif.Photo.BodySerialNumber contains the camera body serial number.
Other examples are available in the file, including reading position and orientation metadata from drones.
You can also read frame rates from movie clips by adding a frameRate entry to the movie information containing the metadata tag you wish to use:
<metatags> <movie> <body> <frameRate>Exr.framesPerSecond</frameRate> </body> </movie> </metatags>
You can place an additional file in your
/Users/USERNAME/Documents/The Pixel Farm/PFTrack/ folder containing any user-specific changes to avoid the need to edit the file installed alongside PFTrack.
The Clip Input node is able to make use of camera presets generated in the Camera Preset panel, but is also able to use simple Sensor Preset files with sensor size information if no camera presets are available.
These files can be placed in the
/Users/USERNAME/Documents/The Pixel Farm/PFTrack/presets/camera folder (or alternate location defined in the Preferences window), and contain only enough information to define the size of the camera sensor area used to capture an image:
<cameraPreset> <sensorName>My Sensor</sensorName> <frameSize>1920 1080 1.77778</frameSize> <definition>1920 1080 15.0 8.4375</definition> <sensorWidth>15.0</sensorWidth> <pixelAspect>1</pixelAspect> <mode>Exact</mode> </cameraPreset>
sensorName: The name of the sensor preset.
frameSize: The width, height (in pixels) and frame aspect ratio of the clip.
definition: The width and height in pixels, and the width and height in millimeters, of the full camera sensor.
sensorWidth: The width of the sensor area used to capture the image.
pixelAspect: The pixel aspect ratio of the clip
mode: This indicates that the sensor can only be applied to 1920x1080 clips.
In this case, the full sensor area (15 x 8.43 mm) was used to capture the image, so the sensor width is the same as the definition width.
The format standards is called
formatStandards.xml and can be located in the system folder, the application folder and/or the user's documents folder. This file can be used to automatically set frame-rates and pixel aspect ratios for source clips.
If more than one
formatStandards.xml file is present then the contents of each are concatenated. This file defines supported frame rates, pixel aspect ratios as well as format standards. PFTrack installs a default
formatStandards.xml file in the application directory which can be used as a starting point for customisation. A sample file is given below:
<data> <frameRates> <frameRate> <name>Film</name> <fps>24</fps> </frameRate> </frameRates> <pixelAspectRatios> <pixelAspectRatio> <name>Square Pixel</name> <ratio>1:1</ratio> </pixelAspectRatio> </pixelAspectRatios> <formatStandards> <formatStandard> <name>2K</name> <resolution>2048 1556</resolution> <frameRate>Film</frameRate> <pixelAspect>Square Pixel</pixelAspect> <default>true</default> </formatStandard> </formatStandards> </data>
In cases where multiple standards for a particular resolution are specified, the
<default> tag indicates the format standard that will be used by default when loading the media.