Modify point cloud directly in browser

Hi!
I have loaded some point cloud data with the PCDloader. It worked well!
Now I would like to modify the point cloud in the browser. For example, I would like to remove point cloud data directly with the mouse, draw boxes around the point cloud, and other similar things.
Do you have any tips for doing this?

Any help/tips/example would be really appreciated!
Thanks!

If you want to add interaction to your point cloud viewer, you definitely need raycasting so you are able to select specific points (e.g. for a remove operation). The following official example demonstrates how to implement this kind of interaction:

https://threejs.org/examples/webgl_interactive_points

Might be a good start to study and build the remaining app logic on top of it.

Thanks for your answer! I will have a look at it!
Do you have some tips/example when it comes to clipping planes and so on?

three.js does support clipping planes and there are a few example demonstrating the API usage:

https://threejs.org/examples/?q=clipping

Maybe these examples from the Collection of examples from discourse.threejs.org are helpful.

https://hofk.de/main/discourse.threejs/2018/Interaction%20with%20Points/Interaction%20with%20Points.html

https://hofk.de/main/discourse.threejs/2018/PointsGroupingCutPlane/PointsGroupingCutPlane.html

https://hofk.de/main/discourse.threejs/2019/PointCloudGegometryModification/PointCloudGegometryModification.html

Links in sourcecode.

1 Like

Thanks for your help! I will try to build something:)

Hi, I was curious to know if you were able to achieve this.