Kernel density estimation algorithm for point cloud visualization in Unity3D.
Any pull requests and issues are welcome. If you have any questions about the project or the data, please feel free to email me (Lixiang.Zhao17@student.xjtlu.edu.cn).
- Import/export and visualize the point cloud data in bin/ply/pcd/txt format
- Define your point cloud data with mathematical equation easily
- Kernal Density Estimation (KDE) of the point cloud density on GPU
- Iso-surface construction with Marching-Cube algorithm
- Color-coded based on point cloud density
- Halo Visualization for point cloud data
Unity version >=2019
- 2025/1/12: Fix bug of KDE computation with shared group memory (the program will be broke on some machine)
- 2025/1/16: Enable import/export pcd/ply/txt files
- Clone the repo using command following, or download the archive directly
git clone git@github.com:LixiangZhao98/PointCloud-Visualization-Tool.git
- Open the project using Unity (versions >= 2019). If you are new to Unity, refer to sec.1-4 in tutorial for Unity setup and sec.6 to open a project.
- Drag the DataObject prefab
Assets\PointCloud-Visualization-Tool\Prefab\DataObject.prefab
into your scene.
- Run the demo in
Assets/PointCloud-Visualization-Tool/Scenes/PointCloudVisualization.unity
- To switch the dataset, click the DataObject in hierarchy and change variable
datasets in project
in the inspector window. - Enable
Use_Function_Defined_Yourself
to use the function defined by yourself to generate the data. - To add new data files or write mathematical equations of data, please refer to the Data section in the following.
- Run the demo in
Assets/PointCloud-Visualization-Tool/Scenes/KernelDensityEstimation.unity
- The density estimation results are shown by iso-surface reconstruction (MarchingCube) and color encoding from blue (low density) to red (high density).
- To change MarchingCube threshold, unfold the DataObject in hierarchy, click
MarchingCube
and adjust the variableMC Threshold
in the inspector window.
- Run the demo in
Assets/PointCloud-Visualization-Tool/Scenes/Halo.unity
- This is a replication of halo visualization (10.1109/TVCG.2009.138) in Unity
- The repo supports to read bin/ply/pcd/txt data files. To add data files, you just need to place it to
Assets\PointCloud-Visualization-Tool\data\data
, and the project identifies the file automatically. - To write your own mathematical equation of data, you need (1) go to
Assets\PointCloud-Visualization-Tool\script\dataprocessing\DataGenerator.cs
, (2) add a new function with an output type ofVector3[]
(for instance, static public CubicArea(){}), (3) enableUse_Function_Defined_Yourself
and then you can find CubicArea in Drop-down boxCustomized Dataset
. - Refer to Pointcloud Dataset for more data.
- If you want to use the .bin data outside this project, first you need to convert them to
single-precision floating-point
format. Three single-precision floats consist a 3D coordinate of one point.
Many thanks to the authors of open-source repository: unity-marching-cubes-gpu