-
Notifications
You must be signed in to change notification settings - Fork 6
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.
Point data is read from a data source (file, url) and persisted into a store.
-
File format parsing: Aardvark.Algodat contains libraries to parse common point cloud file formats in a lazy/stream-like fashion:
-
E57 parser (implemented here) retrieves points from an e57 file in close adherence to the spec. File contents can be accessed via
Aardvark.Data.E57.ASTM_E57
. Example usage here. More in-depth e57 parsing here. -
ply parser (implemented here) Uses Ply.Net open ply files and parses
vertex
point data and attributes. Example usage here. Comprehensive ply vertex data parsing here. - Las(Zip) parser (implemented here) parses points and various attributes from Las(-Zip) formats. Example usage here. Full-featured importer here.
- Custom formats are supplied via the
Chunk
datatype (usage here). Definition and supported attributes here.
-
E57 parser (implemented here) retrieves points from an e57 file in close adherence to the spec. File contents can be accessed via
-
Importing: All file parsers produce
Chunk
s, which are persisted to aStore
. During import, points are arranged in spatial subdivision datastructure, are given Level of Detail representation, and receive estimated Normals (if not present). References to on-disk data are stored inPersistentRef<T>
. - Our commandline importer/viewer tool is available here.
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.
-
Filters create an immutable copy of a tree defining "inside" and "outside" points. Example use here. Spatial filters include Sphere3d, Box3d, Hulls3d, Prism3d. Non-spatial filters include Classification, Intensity. Custom filters are implemented with the
IFilter
interface. - Queries enumerate points from the current (filtered) point cloud. Example use here. Geometric queries include Box3d, Ray3d, V3d, Hull3d and other queries are AllPoints, Cells, Grid, ViewFrustum. Custom queries are supplied with these functions.
- Delete actively erases points from a store. The call is here.
- 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.
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
. TheIPointCloudNode
is wrapped usingPointTreeNode.Create
, which is then wrapped inLodTreeInstance
(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 andSimplePickTree
. -
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