I have built the ARCore Depth Lab application from Google’s GitHub repository in Unity. The application runs fine, and I have added a new feature to export the point cloud data to a .ply file.
I implemented a writePLY() function that writes each point's (x, y, z) coordinates along with its color values into a .ply file. This function is triggered when I press a UI button.
However, when I open the generated .ply file in MeshLab, I see multiple layers of the same point cloud, which I did not expect. Interestingly, the original ARCore Depth Lab APK does not exhibit this issue when running the point cloud feature.
What I Have Tried: 1)Ensured that writePLY() executes only once per button press. 2)Checked that I am not duplicating points while writing to the .ply file. 3)Verified that I am correctly clearing the previous frame’s point cloud data. 4)Compared my implementation with the original ARCore Depth Lab APK.
My Questions:
- What could be causing multiple layers of the same point cloud to appear in the .ply file?
- How can I ensure that only a single frame of the point cloud is written when I press the button?