Inspired by the EDL shading technique and SSAO, I implemented a new shader for OpenGL ES designed to enhance the rendering of point clouds. As the shading function rely only on the projected depth, and because the variable gl_FragDepth is missing in OpenGL ES, a workaround was to implement a custom depth buffer using a frameBuffer object.
In practice, the multi-pass rendering is done in 2 steps:
- Create a new frameBuffer and render the scene as usual with this new frameBuffer bound as the active one.
- Bind to the default frameBuffer, then draw a quad that spans the entire screen with the new frameBuffer’s color buffer as its texture.
(See https://learnopengl.com/Advanced-OpenGL/Framebuffers for more details)
This shading functions is available as an experimental feature in Lidar VR Viewer.
My final algorithm is inspired by this one
Comparison of wood / leaves segmentation methods using machine learning
The action of the wind in the branches of cherry trees simulated and modeled with The grove and rendered in Blender
A part of my PhD works is now available in the last release of the open source platform Computree.
This wiki gives an overview of the computational steps implemented.
Departing from traditional tree models made of cylinders (in green), sharper models (in blue) can be computed. Expressed as a continuous surface, they describe the shape better and allow to assess precisely the tree properties.
The 3D samples and the surface model of a tropical tree can be visualize here
Sequence of processing steps: modeling of the terrain surface, detection of the tree stem, then estimation of the tree model.
3D model of a Mangrove tree (Avicennia germinans Copyright A. Olagoke and C. Proisy, 2014, IRD UMR AMAP)
Mesh model of an evergreen sub tropical tree (Erytrophleum fordii) based on SimpleTree.