Repository navigation
Highlights
- New
--progressoption: machine-readable JSON progress lines on stdout, for tools that run Obj2Tiles and want to show how far a conversion has got (thanks @zalmoxes-laran, #108). - Native macOS Apple Silicon build (
Obj2Tiles-OsxArm64.zip) with its own libktx, so KTX2 encoding works without Rosetta (thanks @zalmoxes-laran, #107). - Faster conversions with lower peak memory: the root tile's textures are written in parallel, and at most one tile per core is converted at a time (4–22% faster than v1.8.1 on the models tested).
Added / Changed
- Added
--progress. Each line is one JSON object:{"stage":"decimation|splitting|root|tiling|packing","done":n,"total":m,"percent":p}. Splitting lines also carry"lod". The last line is always{"stage":"done","percent":100,"elapsed":s}or{"stage":"error","message":"..."}, written after cleanup. The usual log lines are unchanged and never start with{, so a reader keeps only the lines that do. Without--progressthe output is the same as before. - Added the
osx-arm64publish profile and the KTX-Software 4.4.2 Darwin-arm64libktx.dylib.update-libktx.ps1now refreshes all six platforms. - Changed the root tile step: its textures are now read, resized and written in parallel. A texture written smaller is decoded at its output size (a JPEG at a reduced block scale), so a worker no longer holds an 8192 px texture at full size. On ODM models with many large textures this step drops from tens of seconds to about one second. The root textures keep the same size; their pixels can differ slightly because of the reduced-scale decode.
- Changed the Tiling stage to convert at most
Environment.ProcessorCounttiles at a time. Without a limit, the pool threads left over by the parallel root step made the conversions compete for the cores. The limit also followsDOTNET_PROCESSOR_COUNT, so a caller's core budget is respected. - Every tile except
root.b3dmis byte-identical to v1.8.1, and so istileset.json(the order of sibling tiles can change).
Wall time compared with v1.8.1, measured on four ODM models (octree, 3 LODs, 2 divisions, KTX2):
| Model | 32 cores v1.8.1 → v1.9.0 | DOTNET_PROCESSOR_COUNT=8 v1.8.1 → v1.9.0 |
Peak RAM (32 cores) |
|---|---|---|---|
| 323K faces, 66 textures | 26.4 s → 24.2 s | 19.4 s → 18.3 s | 1.0 → 1.0 GB |
| 524K faces, 168 materials | 128 s → 100 s | 142 s → 134 s | 9.0 → 6.1 GB |
| 320K faces, multispectral TIFF | 24.0 s → 21.8 s | — | 4.7 → 3.5 GB |
| 224K faces, 72 textures of 8192 px | 101 s → 97 s | 198 s → 179 s | 10.6 → 10.0 GB |
Fixed
- Fixed failures to create the output folder: they now fail the run like any other error (exit code 1, and an error line with
--progress). - Fixed a failed cleanup of the temporary folders: it is now reported as a cleanup error with exit code 1, instead of an unhandled exception.
Full Changelog: v1.8.1...v1.9.0