-
Notifications
You must be signed in to change notification settings - Fork 15
Quickstart
mika edited this page May 30, 2023
·
12 revisions
- Import PointcloudViewer plugin into your Project (from Asset Store window, or from Package Manager in the more recent Unity versions)
- From v2.50 forward, you need to enable "[x] Allow Unsafe", from Player Settings (Edit/Project settings/Player..)
- Check the scenes in folder "Assets/PointCloudTools/Demos/PointCloudViewer/Scenes/"
- For the V3 scenes, you can download sample materials from https://www.dropbox.com/s/em7s0lzum61d774/tilesample.zip?dl=1 (unzip under /Assets/StreamingAssets/.tilesample/ folder)
- Open Unity Project
- In the Project Window, create new folder like IMPORT/ (*or can be named anything else also, this will contain raw point cloud files, that you want to remove later)
- Using Windows Explorer, Drag & Drop your point cloud files into this folder (you can do this inside Unity, or outside Unity by going into that folder)
- Example: Import folder in Projects window, with point cloud file dropped in (In Unity)
- Example: Import folder in Assets folder, with point cloud file dropped in (viewer in Explorer)
- Tips: I'd recommend using some special folder naming, that is ignored from GIT/version control systems, so that your huge point cloud files are not saved to version control_
- Select Window/PointCloudTools/Convert PointCloud to Binary (DX11)
- Drag&Drop your point cloud file from Project window (for example from your Assets/IMPORT/ folder) into the "Point Cloud source file" field
- Example: Drag & Dropping file from Project into converter window
- Adjust Converter settings, at least select correct import format from the dropdown menu
- *Recommended: Enable "[x] Use V2 .ucpc Format", it is faster to load than original v1 .bin format
- More info about settings PointCloud2Binary settings
- Click "Convert to Binary" button
- Set output folder (Usually StreamingAssets/ so that its included in the build) and set filename (for example "test.ucpc"), wait for conversion to finish
- Now open example scene "PointCloudTools/Demos/PointCloudViewer/Scenes/PointCloud-BinaryLoaderV2.scene"
- Select "@BinaryViewer" gameobject from the Scene Hierarchy window
- Inspector: Type your converted filename into BinarySourceFile field (if its inside StreamingAssets/ you don't need to enter full path like c:\projects\stuff\viewer\assets\StreamingAssets\myfile.ucpc, instead just put "myfile.ucpc" and the plugin will check if that file exists inside StreamingAssets/ folder)
- Use the default "PointCloudColorSizeDX11v2.mat" material if you have RGB data, or "PointCloudColorsTintDX11" if you don't have RGB data
- Hit Play to run the scene, cloud should appear in the view (use WASD keys+Mouse to fly)
- You can now delete the original cloud file and IMPORT folder if you no longer want to convert them again
- Window/PointCloudTools/Convert PointCloud to Unity Meshes
- Drag&Drop your point cloud file from Project window into the "Point Cloud source file" field
- Adjust settings. More info about PointCloud2Mesh settings
- Assign material, for example "PointCloudColorsMesh" (if you have RGB data) or "PointCloudSingleColorMesh" if you don't have RGB data
- Click "Convert to meshes" button
- Select output folder, wait for conversion..done
- Meshes are also added to the current open scene
- For LAZ you should use external converter, its better: https://github.com/unitycoder/UnityPointCloudViewer/wiki/Commandline-Tools