Imports and exports RealityCapture/RealityScan-style XMP camera priors (xcr: namespace), either from a Blender camera animation or as one XMP per scene camera.
- Export one
.xmpper frame (RC-style<xcr:Rotation>,<xcr:Position>, intrinsics). - Import or export one
.xmpper camera in Multi-Camera mode. - Export a single Metashape/Agisoft XML from an animation range or from many scene cameras.
Render Frame + XMPandRender Animation + XMP:- Internal backend uses Blender’s normal render UI/preview.
- External backend runs a background Blender render (reliable cancel).
Export XMP (Range)writes XMPs without rendering.Import XMP Camerascreates or updates scene cameras from selected XMP files.Export XMP Cameraswrites one XMP per visible, selected, or all scene cameras.- Imported XMP intrinsics, distortion, groups, and double-precision pose values are stored on the camera for safer round trips.
Export Metashape XML (Range)writes one XML camera per animation frame without rendering.Export Metashape XML Cameraswrites one XML camera per visible, selected, or all scene cameras.- Principal point is exported as zero (
xcr:PrincipalPointU/V = 0). - Distortion model:
Perspective: coefficients exported as zeros.Brown: manual coefficient entry in the UI (k1 k2 k3 k4 t1 t2), and the add-on auto-selects the RC model:brown3/brown4(ifk4 != 0)brown3t2/brown4t2(ift1 != 0ort2 != 0)
- Build the install zip:
python3 build_ground_truth_addon_zip.py
- In Blender:
Edit → Preferences → Add-ons → Install…and pickground_truth_blender.zip. - Enable the add-on: GroundTruth.
Open a .blend with an animated camera and use:
View3D → Sidebar → GroundTruthpanel (main controls)Image Editor → Sidebar → GroundTruth(render-time status + cancel)
Key options:
Camera: defaults to the scene active camera.Camera Mode: useAnimationfor one camera over frames, orMulti-Camerafor one scene camera per XMP/XML camera.Name Matching: controls whether Multi-Camera import updates existing cameras by object name, camera data name, case, and extension.Preserve Imported XMP: reuses imported XMP metadata during export while the camera pose still matches the imported pose.Use Scene Render Output: names XMP sidecars next to Blender’s render output (scene.render.filepath/frame_path).Use Scene Frame Range: usesscene.frame_start/end/stepfor animation operations.Write Metashape XML: after render, also writesMetashape XMLinto the output directory.
XMP is written as a sidecar next to the rendered image:
.../frame_0001.png→.../frame_0001.xmp
For still renders, Blender may write directly to scene.render.filepath; the add-on writes the matching .xmp next to that file.
In Multi-Camera mode, camera XMP files are written to Output Dir and named from the camera object names. Metashape XML camera labels also use camera object names; rename cameras to match photo filenames when you want Metashape to attach transforms to already loaded photos.
Use Clear Stored XMP on a selected camera if you want export to ignore imported metadata and use the current Blender camera settings instead.
- Internal renders: Blender does not reliably expose a cancellable render operator via
bpy. Cancel usually requires Esc in the render window. If Blender is launched with--enable-event-simulate, the add-on can attempt to send an Esc event. - External renders: cancel terminates/kills the background Blender process.
- External renders require a
.blendon disk. If the file is unsaved/dirty, a temporary copy is saved into the output directory. - The external process runs with isolated
BLENDER_USER_*paths (to avoid broken user add-ons affecting the render).