Loading PCD Files in Unity
Loading Point Cloud Data (PCD) files into Unity can be challenging and often requires a paid solution. In this project, we've utilized the Pcx repository available on GitHub. However, it's important to note that Pcx is primarily designed to work with .ply
files. We recommend using CloudCompare to convert .pcd
files to .ply
.
Conversion Process in CloudCompare
The first challenge of importing a PCD file into Unity is correcting the dimensions. You must apply the following transformation in the opening window when you import your file in CloudCompare.
Note : Sometimes, you may not find a similar opening. In this case, first save your model as a PLY file using CloudCompare, then load the PLY file again and continue with the steps below.
When loading a PCD file into CloudCompare, pay close attention to the XYZ transformations, as illustrated below:
Ensure that you accurately fill out the input fields based on your data:
After configuring the transformations, save the file in the .ply
binary format.
Integrating .PLY Files into Unity
To use the converted .ply
files in Unity, you will first need to install PCX. Begin by locating the manifest.json
file in the Unity project’s Packages
folder.
Note : After importing the model into Unity, you need to set the X scale to -1, so the model aligns exactly in the correct position.
Once PCX is installed, you can drag and drop the .ply
files into your Unity environment. However, for optimal performance, it is advisable to clean up previously added project files. This practice ensures a smoother engine performance and enhances the quality and placement of 3D models prior to conducting simulation tests.