Fusion Camera Tracker Point-Cloud Mesher
By Anton Grebenkin

ABOUT

This Fusion menu script exports solved PointCloud3D tracks to PLY and creates
a coarse terrain-style OBJ proxy. It runs inside Fusion's Lua runtime. Python,
plugins, network access, and external processes are not required.

INSTALL

Copy mesher.lua into Fusion's Comp scripts folder, then restart Fusion.
Install only mesher.lua; the other files in this ZIP are documentation.

Windows, standalone Fusion Studio:
%APPDATA%\Blackmagic Design\Fusion\Scripts\Comp

Windows, Fusion inside DaVinci Resolve:
%APPDATA%\Blackmagic Design\DaVinci Resolve\Support\Fusion\Scripts\Comp

On macOS or Linux, use the Comp scripts folder configured in Fusion's script
path preferences.

RUN

1. In a solved composition, select exactly one PointCloud3D node in the Flow.
2. Optionally select track points in the viewer. If none are selected, the
   script uses the full cloud.
3. Run Scripts > Comp > mesher and choose an output folder.
4. Import the generated OBJ manually with an FBX Mesh 3D node and connect it
   to the intended Merge 3D.

The script writes a PLY of the chosen points and a matching OBJ surface. It
does not create Fusion nodes or change scene connections. Existing files are
preserved; when a name is occupied, the script uses the next available
numbered name for the PLY/OBJ pair.

LIMITATIONS AND COMPATIBILITY

This makes a rough proxy from sparse camera-tracker points; it is not a dense
scan or watertight production mesh. It works best for one ground, wall, or
other terrain-like surface. It may omit unsupported gaps or bridge nearby
features.

The author has confirmed the workflow in Fusion, but the exact Fusion build
was not recorded. First test on a duplicate composition. The script expects
Fusion to expose the selected PointCloud3D settings and point positions.

LICENSE

See LICENSE.txt. It permits use, including commercial use, but does not permit
modification or redistribution without prior written permission.