Mesh merging
When placing the tree on the terrain we want to make sure that the resulting mesh keeps its good property (no self-intersections, no overlapping faces, water-tight, etc.). To ensure it does we’re going to merge the tree mesh with the terrain mesh and check the resulting mesh using the is_valid(bool verbose=false) const function from the CGAL
library.
Additonnaly, to remove the overlapping intersections between the trees and the terrain, we’re going to use the autorefine_triangle_soup() function from the CGAL
library modified to keep our markers. You can see the result with the following example:
![]() |
![]() |
Before |
After |
References
-
[verdie15] Yannick Verdie, Florent Lafarge, Pierre Alliez, "LOD Generation for Urban Scenes", ACM Transactions on Graphics, 34(3): 15, 2015, DOI: 10.1145/2766946
-
[verdie14] Yannick Verdie, Florent Lafarge, "Detecting parametric objects in large scenes by Monte Carlo sampling", International Journal of Computer Vision, 106(1): 57—75, 2014, DOI: 10.1007/s11263-013-0641-0
-
[stava14] O. Stava, S. Pirk, J. Kratt, B. Chen, R. Mech, O. Deussen, B. Benes, "Inverse Procedural Modeling of Trees", Preprint, 2014, Adobe Systems Inc., USA; University of Konstanz, Germany; Shenzhen Institute of Advanced Technology, China; Purdue University, USA.
-
[adtree] Shenglan Du, Roderik Lindenbergh, Hugo Ledoux, Jantien Stoter, Liangliang Nan, "AdTree: Accurate, Detailed, and Automatic Modelling of Laser-Scanned Trees", MDPI, 2019, MDPI: 2072-4292/11/8/942
-
[benes] Bedrich Benes, "Computational Vegetation", Computational Vegetation
-
[cgal] CGAL Development Team, "CGAL User and Reference Manual", CGAL User and Reference Manual
-
[feelpp] Feel Consortium, "Feel", Feel++ Documentation
-
[curl] "curl", curl Homepage
-
[meshlab] MeshLab Developers, "MeshLab", MeshLab Homepage
-
[overpass] OpenStreetMap Contributors, "Overpass API", Overpass API
-
[openstreetmap] "OpenStreetMap", OpenStreetMap Help
-
[img:TreeShade] Yujin Park, Jean-Michel Guldmann, Desheng Liu, "Impacts of tree and building shades on the urban heat island: Combining remote sensing, 3D digital city and spatial regression approaches", 2021, ScienceDirect: Impacts of tree and building shades on the urban heat island
-
[img:NY] Christophe Prud’homme, "New York City mesh", 2023, GitHub: New York City mesh
-
[img:aerialview] Conseil départemental de la Somme, "Aerial thermal view", 2023, Aerial thermal view
-
[img:street_thermography] P. Verchere, "Thermal image of a street in the city", 2023, The Conversation: Thermal image of a street in the city
-
[img:mercator] Bibm@th, "Mercator projection", 2024, Bibm@th: Mercator projection
-
[stl] Wikipedia, "STL (file format) - Wikipedia", 2023, Wikipedia: STL (file format)
-
[cgal_alpha_wrapper] Pierre Alliez, David Cohen-Steiner, Michael Hemmer, Cédric Portaneri, Mael Rouxel-Labbé, "CGAL 5.6.1 - 3D Alpha Wrapping", 2024, CGAL: 3D Alpha Wrapping
-
[cgal_affine_transformation] CGAL Development Team, "CGAL 5.6.1 - 2D and 3D Linear Geometry Kernel", 2024, CGAL: 2D and 3D Linear Geometry Kernel
-
[wgs84] Wikipedia, "World Geodetic System", 2024, Wikipedia: World Geodetic System
-
[wgs84_to_cartesian] Christian Berger, "WGS84toCartesian", 2021, GitHub: WGS84toCartesian
-
[k-nn] Wikipedia, "K-nearest neighbors algorithm", 2024, Wikipedia: K-nearest neighbors algorithm
-
[mercator-proj] Wikipedia, "Mercator projection", 2024, Wikipedia: Mercator projection
-
[sketchup] Wikipedia, "SketchUp", 2024, Wikipedia: SketchUp
-
[json] Wikipedia, "JSON", 2024, Wikipedia: JSON
-
[corefine-compute] CGAL Development Team, "CGAL 5.6.1 - 3D Alpha Shapes", 2024, CGAL: 3D Alpha Shapes
-
[hidalgo2-ubm] HiDALGO2, "Hidalgo2-UBM", 2024, HiDALGO2: Urban Building Model
-
[hidalgo2] HiDALGO2, "HiDALGO2", 2024, HiDALGO2 Homepage
-
[green-deal] European Commission, "European Green Deal", 2024, European Green Deal
-
[delaunay-wiki] Wikipedia, "Delaunay triangulation", 2024, Wikipedia: Delaunay triangulation
-
[hidalgo2-about] HiDALGO2, "About HiDALGO2", 2024, HiDALGO2: About
-
[cemosis] Cemosis, "Cemosis", 2024, Cemosis Homepage
-
[irma] IRMA, "IRMA", 2024, IRMA Homepage
-
[inria] INRIA, "INRIA", 2024, INRIA Homepage
-
[alliez] Pierre Alliez, "Pierre Alliez", 2024, Pierre Alliez Homepage
-
[chabannes] Vincent Chabannes, "Vincent Chabannes", 2024, ResearchGate: Vincent Chabannes
-
[paraview] Kitware, "ParaView", 2024, ParaView Homepage
-
[cgal-master] CGAL Development Team, "CGAL", 2024, CGAL GitHub
-
[overpass-ql] Roland Olbricht, "Overpass QL", 2024, Overpass QL
-
[overpass-turbo] Roland Olbricht, Martin Raifer, "Overpass turbo", 2024, Overpass turbo
-
[exaMA] ExaMA Consortium, "Exa-MA", 2024, Exa-MA: Methods and Algorithms for Exascale
-
[numpex] Numpex Consortium, "Numpex", 2024, Numpex Homepage
-
[gmsh] Christophe Geuzaine, Jean-François Remacle, "Gmsh", 2024, Gmsh Homepage
-
[img:tree-shape] Noriah Othman, Mashitah Mat Isa, Noralizawati Mohamed, Ramly Hasan, "Street Planting Compositions: The Public and Expert Perspectives", 2019, ResearchGate: Street Planting Compositions
-
[prudhomme] Christophe Prud’homme, "Christophe Prud’homme", 2024, ResearchGate: Christophe Prud’homme
-
[auto-refine-triangle-soup] CGAL Development Team, "CGAL 6.0 - Polygon Mesh Processing", 2024, CGAL: Polygon Mesh Processing
-
[cpr] CPR Developers, "Cpp Requests: Curl for People", 2024, GitHub: Cpp Requests
-
[pouvoir-arbre] Tania Landes , "The Conversation: D’où vient le pouvoir rafraîchissant des arbres en ville ?", 2023, The Conversation: D’où vient le pouvoir rafraîchissant des arbres en ville?
-
[science-direct] Yujin Park, Jean-Michel Guldmann, Desheng Liu, "Impacts of tree and building shades on the urban heat island: Combining remote sensing, 3D digital city and spatial regression approaches", 2021, ScienceDirect: Impacts of tree and building shades on the urban heat island
-
[gmsh-geo] Gmsh Developers, "Gmsh .geo file format", 2024, Gmsh .geo file format
-
[highest-plants] New Scientist - Aisling Irwin, "World’s highest plants discovered growing 6km above sea level", 2016, New Scientist: World’s highest plants discovered growing 6km above sea level
-
[raycasting] Wikipedia, "Ray casting", 2024, Wikipedia: Ray casting
-
[bvh] Wikipedia, "Bounding volume hierarchy", 2024, Wikipedia: Bounding volume hierarchy
-
[kd-tree] Wikipedia, "K-d tree", 2024, Wikipedia: K-d tree
-
[async] cplusplus.com, "std::async", 2024, cplusplus.com: std::async
-
[is_valid] CGAL Development Team, "CGAL 5.6.1 - 3D Mesh Generation", 2024, link:https://doc.cgal.org/latest/Surface_mesh/classCGAL_1_1Surface__mesh.html#a14cb5e4c51a02d652ba33bf906f39fc0[CGAL: is_valid()
-
[auto_refine_triangle_soup]] CGAL Development Team, "CGAL 6.0 - Polygon Mesh Processing", 2024, CGAL: autorefine_triangle_soup()
-
[deep_learning] Wikipedia, "Deep learning", 2024, Wikipedia: Deep learning
-
[numpex_exama] Numpex, "Exa-MA PC1", 2024, Numpex: Exa-MA PC1