diff --git a/tools/3dtrees_potree/3dtrees_potree.xml b/tools/3dtrees_potree/3dtrees_potree.xml index cb391af510..b86d835d83 100644 --- a/tools/3dtrees_potree/3dtrees_potree.xml +++ b/tools/3dtrees_potree/3dtrees_potree.xml @@ -1,7 +1,7 @@ Convert LAS/LAZ point clouds to Potree octree format for web visualization - 1.0.2 + 1.1.0 0 @@ -18,7 +18,7 @@ --encoding '$encoding' --method '$method' --chunk-method '$chunk_method' - #if $attributes + #if $attributes and str($special_coloring.enabled) != 'true' --attributes '$attributes' #end if #if $grid_size and int($grid_size) > 0 @@ -28,6 +28,16 @@ $keep_chunks $no_chunking $no_indexing + #if str($special_coloring.enabled) == 'true' + --special-coloring + --special-coloring-palette '$special_coloring.palette' + --special-coloring-n-colors '$special_coloring.n_colors' + --special-coloring-n-neighbors '$special_coloring.n_neighbors' + --special-coloring-instance-attribute '$special_coloring.instance_attribute' + --special-coloring-ground-id '$special_coloring.ground_id' + --special-coloring-ground-color '$special_coloring.ground_color' + $special_coloring.sidecar_json + #end if $generate_page #if $title --title '$title' @@ -60,13 +70,35 @@ - - ^[a-zA-Z,]+$ + + ^[a-zA-Z0-9_,]+$ + + + + + + + + ^(sky|sea|cozy|fairy|winter|rainbow|pastel|candy|boring|#?[0-9A-Fa-f]{6}(,#?[0-9A-Fa-f]{6})*)$ + + + + + ^[A-Za-z0-9_]+$ + + + + ^#[0-9A-Fa-f]{6}$ + + + + + ^[A-Za-z0-9 .,_:-]+$ @@ -80,6 +112,7 @@ + @@ -119,6 +152,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -133,6 +196,7 @@ This tool converts LAS/LAZ point cloud files to the Potree octree format for eff 3. **Flexible sampling methods**: Choose between Poisson, Poisson Average, or Random sampling 4. **Web-ready output**: Generates files that can be directly served for Potree viewer visualization 5. **Optional web page generation**: Can generate a ready-to-use HTML viewer page +6. **Special instance coloring**: Optionally adds a display-only ``coloring_id`` attribute from ``PredInstance`` while preserving original RGB ----- @@ -147,6 +211,14 @@ This tool converts LAS/LAZ point cloud files to the Potree octree format for eff - **Keep Chunks**: Preserve temporary chunk files after conversion - **No Chunking**: Disable the chunking phase - **No Indexing**: Disable the indexing phase +- **Special Coloring**: Add a ``coloring_id`` point attribute for neighbor-aware instance colors. +- **Special Coloring Palette**: Built-in palette name (sky, sea, cozy, fairy, winter, rainbow, pastel, candy, boring) or custom comma-separated ``#RRGGBB`` colors +- **Special Coloring Color Count**: Number of non-ground coloring IDs +- **Special Coloring Neighbors**: Number of nearest instance centroids considered when avoiding nearby color reuse +- **Special Coloring Instance Attribute**: Point attribute containing instance IDs, default ``PredInstance`` +- **Special Coloring Ground Instance ID**: Instance ID treated as ground/background, default ``0``. Negative instance IDs are also treated as background. +- **Special Coloring Ground Color**: Ground/background color as ``#RRGGBB`` +- **Write Special Coloring JSON**: Write ``special_coloring_mapping.json`` and patch generated Potree HTML viewers to use the sidecar colors. - **Generate Page**: Create a web viewer page with the specified name - **Viewer Title**: Optional title shown in the generated viewer page @@ -160,6 +232,7 @@ The tool produces a collection containing: - **hierarchy** (binary): Binary file containing the octree hierarchy - **octree** (binary): Binary file containing the point data - **log** (text): Conversion log file +- **special_coloring_mapping** (JSON, optional): Mapping from ``coloring_id`` to colors and from ``PredInstance`` to ``coloring_id`` when Write Special Coloring JSON is enabled When **Generate Page** is specified (e.g., "viewer"): diff --git a/tools/3dtrees_potree/test-data/mikro_segmented.laz b/tools/3dtrees_potree/test-data/mikro_segmented.laz new file mode 100644 index 0000000000..c43a0407bf Binary files /dev/null and b/tools/3dtrees_potree/test-data/mikro_segmented.laz differ