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 ([email protected]).
- pointcloud reader in .bin (single-precision floating-point in binary format) and .ply format
- Kernal Density Estimation (KDE) of the point cloud density on GPU
- Iso-surface construction with Marching-Cube algrithm
- Color-coded based on point cloud density
- Halo Visualization for pointcloud data
- Download Unity Hub. Please refer to sec.1-4 in tutorial if you are a new Unity user.
- Clone the repo with git lfs installed or download the archive https://github.com/LixiangZhao98/PointCloud-Visualization-Tool/archive/refs/heads/master.zip and open the project using Unity (versions equal to/higher than 2019 have been tested). Please refer to sec.6 in tutorial if you don't know how to open an existing project.
- 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 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 your generation functions, please refer to 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
- Place the folder
Asset/PointCloud-Visualization-Tool
in this repo to your Unity projectAsset
folder - Drag the DataObject prefab
Assets\PointCloud-Visualization-Tool\Prefab\DataObject.prefab
into your scene.
- The repo supports to read .bin and .ply data files. Refer to (TODO) 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. - To add data files, you just need to place it to
Assets\PointCloud-Visualization-Tool\data\data
and project identifies and updates the file automatically in runtime. - Write your own function to generate the dataset with an output of
Vector3[]
inAssets\PointCloud-Visualization-Tool\script\dataprocessing\DataGenerator.cs
. Your new function will appear in inspector automatically. Be sure to enableUse_Function_Defined_Yourself
checkbox to select your function in runtime.
Many thanks to the authors of open-source repository: unity-marching-cubes-gpu