Creating surface meshes

This exercise uses PDAL to create surface meshes. PDAL is able to use a number of meshing filters: https://pdal.io/stages/filters.html#mesh. Three of these are ‘in the box’, without needing plugins compiled. These are 2D Delaunay triangulation, Greedy projection meshing and Poisson surface meshing.

In this exercise we’ll create a Poisson surface mesh - a watertight isosurface - from our input point cloud.

Exercise

We will create mesh models of a building and its surrounds using an entwine data input source.

After running each command, the output .ply file can be viewed in Meshlab or CloudCompare.

Command

Invoke the following command, substituting accordingly, in your Conda Shell:

1
2
3
4
5
pdal translate -i ept://http://act-2015-rgb.s3.amazonaws.com \
 -o ./exercises/analysis/meshing/first-mesh.ply \
 poisson --filters.poisson.depth=16 \
 --readers.ept.bounds="([692738, 692967], [6092255,6092562])" \
 --verbose 4
_images/meshing.png

You can view the mesh in Cloud Compare, you should see something similar to

_images/first-mesh.png

Filtering

If we want to just mesh a building, or just terrain, or both we can apply a range filter based on point classification. These data have ground labelled as class 2, and buildings as 6.

Command

Invoke the following command, substituting accordingly, in your Conda Shell:

1
2
3
4
5
6
7
pdal translate -i ept://http://act-2015-rgb.s3.amazonaws.com \
 -o ./exercises/analysis/meshing/building-exercise.ply \
 range poisson \
 --filters.range.limits="Classification[2:2],Classification[6:6]" \
 --filters.poisson.depth=16 \
 --readers.ept.bounds="([692738, 692967], [6092255,6092562])" \
 --verbose 4
1
2
3
4
5
6
7
pdal translate -i ept://http://act-2015-rgb.s3.amazonaws.com ^
 -o ./exercises/analysis/meshing/building-exercise.ply ^
 range poisson ^
 --filters.range.limits="Classification[2:2],Classification[6:6]" ^
 --filters.poisson.depth=16 ^
 --readers.ept.bounds="([692738, 692967], [6092255,6092562])" ^
 --verbose 4
_images/meshing-buildings.png