Skip to content

Feat/to flame3d - #110

Merged
hi-liang merged 3 commits into
mainfrom
feat/to-flame3d
Oct 7, 2026
Merged

hi-liang merged 3 commits into
mainfrom
feat/to-flame3d

Conversation

@hi-liang

@hi-liang hi-liang commented Oct 7, 2026

Copy link
Copy Markdown
Member
  • Adds export for flame3d pipeline, with some python scripts to workshop the output format
  • Sets all output meshes to include captured vertex colors. If a scan is not colorized, export will colorize first

Every export that includes the mesh (Nerfstudio, OBJ, PLY, USDZ) now
carries per-vertex colors sampled from the captured frames, and never the
save-time normals colors, which are an in-app preview only.

- Exporting a mesh format colorizes any uncolored scan first
  (ScanExportManager.colorizeForExport -> ScanPostprocessor.run with
  colorize, the Color button's pass). All six export/upload call sites
  await it, then read isColored on main for prepareExport.
- prepareExport(vertexColorsFromCapture:) gates colors on isColored and
  defaults to false, so a caller that forgets it ships geometry only.
  Before this, PLY baked colors.bin unconditionally, shipping the normals
  preview for scans never colorized.
- OBJ and the Nerfstudio mesh.obj write `v x y z r g b`
  (MeshConverter.objWithVertexColors); USDZ converts from that colored
  OBJ; PLY takes colors.bin. Colors ship only with exactly one per vertex.
- Colorize already skips person-mask regions (and maskless frames) with
  Privacy Filter on, so no person is baked into the colors.
- Docs: README, REQUIREMENTS, schemas, PRIVACY, APPSTORE, User Guide.
New export format that writes flame3d-core's `polycam` input directly, so a
scan uploads to flame3d with no desktop conversion. Flame3DExport mirrors
tools/scan4d-to-flame3d (the contract and reference implementation):

- keyframes/images: stream frames + hi-res stills at one resolution
  (stills resized to the stream size, intrinsics scaled); cube faces,
  odd-aspect stills and stems without a unique frame number left out,
  since flame3d's SAM3 runs need one resolution and frame-numbered stems.
- keyframes/corrected_cameras: Polycam camera records (raw-frame c2w).
- keyframes/depth: native LiDAR depth, zero maps where a frame has none.
- raw.glb: mesh.obj + captured vertex colors (COLOR_0, linear); the
  export colorizes first like every mesh export.
- mesh_info.json: registration as alignmentTransform.
- Built from the staged Polycam payload, so the privacy passes have run.
- Own store-only zip with entries at the root: the directory zip puts the
  folder on top, and flame3d extracts uploads as-is.

tools: `scan4d_to_flame3d.py --verify` checks any flame3d bundle (layout,
frame sets, sizes, depth, GLB, alignment vs LiDAR) before upload, for
checking the app's export off-device.
@hi-liang
hi-liang merged commit f07de87 into main Oct 7, 2026
3 checks passed
@hi-liang
hi-liang deleted the feat/to-flame3d branch October 9, 2026 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant