three-geo icon indicating copy to clipboard operation
three-geo copied to clipboard

How to edit the terrains

Open j-devel opened this issue 6 years ago • 1 comments

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.

j-devel avatar Nov 28 '18 06:11 j-devel

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

j-devel avatar Nov 28 '18 07:11 j-devel