Add opt-in contentless tileset root - #101
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an opt-in --no-root-content CLI switch to omit generating root.b3dm, relying on the existing tiling behavior that produces a legal contentless tileset root (with refine: "ADD" and content: null). This supports workflows that only publish separately reviewed/audited child tiles and want to avoid emitting a redundant whole-model root artifact.
Changes:
- Document
--no-root-contentin the README options table. - Gate
rootSourceObjselection/compression inProgram.csso the tiling stage receivesnullwhen--no-root-contentis set. - Add CLI option parsing tests for
NoRootContent.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| README.md | Documents the new --no-root-content switch and its renderer compatibility tradeoff. |
| Obj2Tiles/Program.cs | Skips root content generation path when NoRootContent is enabled, passing rootSourceObj: null to tiling. |
| Obj2Tiles/Options.cs | Introduces the --no-root-content option on Options. |
| Obj2Tiles.Test/OptionsTests.cs | Adds tests ensuring the new flag defaults to false and parses correctly. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--no-root-contentCLI switch (default remainsfalse)rootSourceObjto the existing tiling path when requested, producing its legal contentlessADDroot and noroot.b3dmMotivation
Privacy-audited and geometry-decimation workflows may intentionally publish only separately accepted child tiles. The automatically generated whole-model root is then a redundant artifact with a distinct release/audit surface. This switch lets those workflows omit it without post-processing
tileset.jsonor deleting output after generation.The option does not crop or validate geometry. It only selects Obj2Tiles' already-supported contentless-root behavior. It is deliberately off by default because some renderers do not descend into children of a contentless root.
Tests
dotnet test Obj2Tiles.Test/Obj2Tiles.Test.csproj -c Release: 82 passeddotnet test Obj2Tiles.Library.Test/Obj2Tiles.Library.Test.csproj -c Release: 135 passed, 1 explicit test skipped--lods 1 --divisions 0 --local --no-root-content: exit 0, noroot.b3dm, rootcontent: null, rootrefine: ADD, child B3DM present