unitycoder / UnityPointCloudViewer

Point Cloud Viewer and Tools for Unity
https://assetstore.unity.com/packages/tools/utilities/point-cloud-viewer-and-tools-16019?aid=1101lGti
128 stars 15 forks source link

maxpoints parameter for conversion tool #107

Closed nvoelzow closed 8 months ago

nvoelzow commented 3 years ago

this would be a handy feature when working with datasets that have big density differences - being able to keep all available points in low-resolution areas while limiting the maximum number of points in high density tiles.

I've tried something similar by modifying the PointCloudViewerTilesDX11 to limit the number of rendered points (just added a min() in the LOD calculation) and this already helps in some cases, but since the data will still be loaded with all points in the tiles, this is a rather wasteful approach...

unitycoder commented 3 years ago

ok that should be simple to add. should do that after the points for that tile have been randomized, so that it drops excess points randomly.

in the meanwhile, small workaround (if want to test how it might look), would be: edit .pcroot file, modify point count for single or multiple tiles there, so then tile loader only loads that amount. (although file still contains all points, if want to make tile .pct and .rgb file sizes smaller, should drop equal amount of bytes from the end, 1 point is 12 bytes)

image

format info https://github.com/unitycoder/UnityPointCloudViewer/wiki/Binary-File-Format-Structure#custom-v3-tiles-pcroot-and-pct-rgb

unitycoder commented 8 months ago

this is available in the next update v2.80 can clamp tile max point count image