Airborne Lidar scanners can be used to obtain large scale point clouds of the earths surface that are a great foundation for creating 3D models of the real world. For my Master Thesis I used free available data from Bezirksregierung Köln to create a textured 3D Model of my university campus using a point-based rendering algorithm with this software.
The Lidar point clouds contain objects that are either not relevant for most 3D Models and are hard to process and they typically have less data density on vertical surfaces, so they need to be preprocessed to get a better result.
I decided to try a surface splatting approach for this project.
Free las, shp and texture data from Bezirksregierung Köln NRW
Additional shp data from OpenStreetMap
Some of the Splatting Algorithms PhongSplatting and AdaSplats
small introduction to most important files
- specify name of las file, gml file, (osm) shp file and texture jpg here
manage rendering, "camera", window and shaders
uses data stored inDataStructure
- move with W, A, S, D, shift, space
- look around with mouse
- F1 toggles rendering of normals and coordinate system
- F2 toggles rendering of splats vs points
- F3 toggles backface culling
- F4 toggles rendering of texture
parse files and process LiDAR data (chapter 3)
gets called inDataStructure
reads and converts all the files
- las -> Point Cloud
- shp -> Polygons
- gml -> Buildings
function preprocessWalls
- convert shp Polygons to Buildings
function filterAndColorPoints
- filters vegetation from point cloud by removing multi return points that don't belong to no osm/shp building
- marks points as wall points for next step
- filters outliers
function insertWalls
- mixes gml and (osm) shp walls
- fills holes in point cloud by inserting additional points on walls from buildings
- removes old wall points afterwards
function readCache
and writeCache
two types of cache:
- one after reading data and processing it in DataIO (point_cache)
- one after splatting (splat_cache)
holds data
uses DataIO to get cached/fresh data
performs AdaSplats if there is no splat_cache
holds data
- point cloud
- texture coordinates
- tangents for splats (points without splat have tangent1 = (0,0,0))
function adaSplats