displaz icon indicating copy to clipboard operation
displaz copied to clipboard

Keep points on GPU where possible

Open c42f opened this issue 10 years ago • 3 comments

No idea how difficult this will be in the presence of point clouds which actually don't fit on the GPU - need some caching strategy in that case. Not even sure about the performance implications; needs experimentation.

c42f avatar Aug 22 '13 11:08 c42f

If space can be "chunked" into uniform-sized 3D rectangles - have a separate thread concerned about keeping the most relevant chunks loaded into GPU memory. Not sure that an octree is necessary unless the point density varies to an extreme extent.

nigels-com avatar Jun 07 '15 01:06 nigels-com

In the current design, there's an octree for holding the points and I've found this quite useful compared to the previous fixed tile size, since the density of points can vary by a lot if you compare areas with noisy outliers to the main scan (also, if you have scan data from multiple sources).

Points are held in the octree leaves, with the underlying point array reordered so that all points in a leaf are consecutive in the array and can be passed to the GPU in a single chunk. The target leaf size is currently very large (100000 points) to amortize the cost of metadata computation and API overhead across a large number of points.

The system uses incremental rendering when the camera stops, with subsequent frames filling in the remaining points so you don't miss anything (it's a technical tool rather than a game, so waiting to see the full data is reasonable, if not ideal).

c42f avatar Jun 07 '15 03:06 c42f

Wait you're not drawing the points with VAOs and vertex data sourced from BufferObjects?