Skip to content

cli: add --dump-post — raw decoded mesh + PBR volume output for external pipelines - #45

Open
fernandotonon wants to merge 1 commit into
pwilkin:mainfrom
fernandotonon:dump-post
Open

cli: add --dump-post — raw decoded mesh + PBR volume output for external pipelines#45
fernandotonon wants to merge 1 commit into
pwilkin:mainfrom
fernandotonon:dump-post

Conversation

@fernandotonon

Copy link
Copy Markdown

Exposes the existing TRELLIS_DUMP_POST debug dump as a supported CLI flag that writes the file and exits before remesh/decimate/UV/bake/GLB.

--dump-post PATH    write the raw decoded mesh + sparse PBR volume to PATH and
                    exit (skips remesh/decimate/UV/bake/GLB) -- for external
                    post-processing pipelines

Binary layout is exactly the TRELLIS_DUMP_POST one: i32 V,F,Mv,res; f32 verts[V*3]; i32 faces[F*3]; i32 coords[Mv*3]; f32 pbr6[Mv*6] (pbr6 = base_color.rgb, metallic, roughness, alpha in [0,1]); geometry-only runs write Mv=0.

Motivation: downstream DCC tools want to own the game-ready processing — their own weld/simplify budgets, UV unwrap, and multi-channel texture baking — so the finished-GLB path does redundant work and discards the raw representation they need. QtMeshEditor already consumes this flag for its TRELLIS.2 backend (raw dump → its native simplify + bake), which also skips the most expensive stages when only the raw generation is wanted.

Small, self-contained: trellis_args.{h,cpp} + one early-exit block in trellis_cli.cpp. No behavior change when the flag is absent.

🤖 Generated with Claude Code

…nal pipelines

Writes the decoded, hole-filled geometry mesh and the sparse PBR volume it
would be baked from (the exact TRELLIS_DUMP_POST debug layout: i32 V,F,Mv,res;
f32 verts; i32 faces; i32 coords; f32 pbr6) to a file and exits BEFORE
remesh/decimate/UV/bake/GLB.

Motivation: downstream DCC tools (e.g. QtMeshEditor) want to own the
game-ready processing — their own weld/simplify budgets, UV unwrap and
multi-channel texture baking — so the finished-GLB path does redundant work
and discards the raw representation they need. This exposes the existing
debug dump as a supported, documented flag.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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