A simple unity project to view scans created by the open source 3D scanner project
A simple unity project to view scans created by the open source 3D scanner project in first person, including VR support.
Main Viewer | Miniature Viewer |
---|---|
Point_Cloud_Viewer.exe
or Miniature_Point_Cloud_Viewer.exe
.Note: binary
.ply
files parse significantly faster than.csv
Q
& E
to adjust the vertical position of the point cloud so the camera appears to be at head height, and the floor in the scan matches the ground plane. Then walk around inside the scan.ESC
.WASD
: movementMouse
: look aroundQ
& E
: adjust the vertical position of the point cloudZ
& C
: adjust the scale of the point cloud (only available in miniature scene)R
& T
: adjust the yaw rotation of the point cloud (only available in miniature scene)ESC
: exit applicationOnly files with the expected format will open correctly. Attempting to open unexpected files will terminate the unity application. The application expects either .csv
or .ply (binary)
files downloaded from the sweep-3d-scanner
or exported from the Sweep Visualizer
desktop application.
If you want to convert custom data to make a compatible file, create a CSV file where the first line is a header, subsequent rows represent points, and the first 3 columns are X
, Y
and Z
. Optionally, you can include a 4th column called SIGNAL_STRENGTH
. Example file contents shown below.
X,Y,Z
6.7,-124.2,-71.3
6.7,-125.4,-69.2
...
or
X,Y,Z,SIGNAL_STRENGTH
6.7,-124.2,-71.3,199
6.7,-125.4,-69.2,199
...
Standard Assets/Characters
: provides first person character controllerStandaloneFileBrowser
: enables using the native OS dialog to select a csv file, src available here.Scenes/main
:
Scenes/miniature
:
Scripts/CSVReader
:
Vector4
objects.Vector4
represents a point, where the first 3 elements (x,y,z) are position, and the 4th (w) is normalized signal strength.Scripts/PLYReader
:
Vector4
objects.Vector4
represents a point, where the first 3 elements (x,y,z) are position, and the 4th (w) is normalized signal strength.Scripts/PointCloudGenerator
:
.csv
file.Scripts/PointCloud
:
Scripts/AdjustTransform
:
Material/Shader_PointCloud
: Shader code, adapted from here.There is a lot of room for improvement, and submitting a pull request is easy!
So don't hesitate to experiment and modify the code.
To make the process of contributing more efficient, please review the contribution guidelines.