Exports RealityCapture/RealityScan-style XMP camera priors (xcr: namespace) from a Blender camera animation, optionally while rendering.
- Export one
.xmpper frame (RC-style<xcr:Rotation>,<xcr:Position>, intrinsics). - Export a single Metashape/Agisoft XML (one camera per frame) matching the same animation.
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.Export Metashape XML (Range)writes a single*.xmlwithout rendering.- 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.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.
- 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).