CesiumGS / cesium-unreal

Bringing the 3D geospatial ecosystem to Unreal Engine
https://cesium.com/platform/cesium-for-unreal/
Apache License 2.0
912 stars 290 forks source link

Generate collision meshes for point clouds #1483

Open j9liu opened 1 month ago

j9liu commented 1 month ago

This has come up a few times on the forum, though I haven't had the chance to find all the instances. The most recent one as of this post is here: https://community.cesium.com/t/how-to-make-lidar-scanned-point-cloud-stop-shrinking-when-close/33624/2

It would be nice to find a way to generate physics collisions for point clouds. The Chaos physics system only supports triangle meshes. However, I believe that the LIDAR point cloud plugin is able to generate collision meshes based on the points it contains. Maybe we could adapt what it does? Or, maybe we should do something different? 🤔

azrogers commented 1 month ago

I think we could use a surface reconstruction algorithm, like this library for convex hull generation or this (much more complicated) library to do Poisson surface reconstruction. Then we can just give it to Unreal as the physics mesh!