Skip to content

Aardvark Point Clouds Quick Reference

Attila Szabo edited this page Dec 21, 2023 · 5 revisions

Aardvark encompasses libraries for viewing and working with point clouds. This includes parsers for common file formats, out-of-core/on-disk storage for large clouds, filtering and querying and reconstruction facilities, and pretty rendering. This document shows example code, and entry points for customizing your point cloud experience.

File Formats & Store Import

Point data is read from a data source (file, url) and persisted into a store.

Filters & Queries

Point clouds are stored in an Octree-like data structure for fast spatial querying. The node type is IPointCloudNode. Starting from the Root node, the tree is recursively traversed via its Subnodes.

Reconstruction

  • Normal Estimation exists as part of LOD generation. The code can be found here.
  • Linear Regression: The functionality to establish best-fit planes (lines) in 3D (2D) points can be found here.

Rendering

Our rendering is geared towards showing and interacting with many large-scale point clouds.

  • Our commandline importer/viewer tool is available here.
  • Viewer: Our viewer includes graphical effects to make viewing of complicated or uncolored point clouds easier, including surface smoothing, SSAO and anti-aliasing.
  • Scene Graph Node: If using Aardvark.Rendering, our point cloud rendering can be accessed in the SceneGraph Api using Sg.pointSets. The IPointCloudNode is wrapped using PointTreeNode.Create, which is then wrapped in LodTreeInstance (example code here). The visual effects are controlled using a config, example code here.
  • Pixel Picking framebuffer-readback style is enabled via the config's field pickCallback for a pixel position and pixel radius. The definition is here. Additional support for custom attributes is available in the visual picking implementation using the lower level Api and SimplePickTree.
  • Custom per-point Attributes: PointTreeNode.Create allows supplying custom per-point attributes. These show up as per-primitive attribute in the shader under the supplied name, i.e. :
 type CrazyVertex = 
   {
       [<Semantic("MyAttrib")>] myattrib : float32
       [<Color>] c : V4d
       [<Position>] wp : V4d
   }
  • Per-cloud Uniforms: LodTreeInstance allows supplying per-cloud uniforms. These are transferred to the GPU as a storage buffer, and can be accessed via the Aardvark uniforms Api, i.e.
type UniformScope with
    member x.MyUniform : V4d[] = uniform?StorageBuffer?MyUniform
Clone this wiki locally