three-geo
three-geo copied to clipboard
How to edit the terrains
I expect a rudimentary example that shows how to post-process the generated terrain.
In particular, I am interested in incrementally updating the terrain using point clouds obtained by remote sensing devices such as RGBD cameras (e.g. https://github.com/tum-vision/fastfusion) or LIDAR.
As an entry point, one can access the underlying terrain data (an array containing the 3D points of the terrain) as follows.
onRgbDem: (meshes) => {
meshes.forEach((mesh) => {
const array = mesh.geometry.attributes.position.array;
});
},
Since each mesh
is a THREE.Mesh
object that's based on THREE.PlaneBufferGeometry
, for more details on the internal structure, refer to
https://threejs.org/docs/#api/en/core/BufferAttribute