Importing Point Clouds
The Pixyz Plugin for Unity can import e57, rcp, pts and ptx Point Clouds.
To import a point cloud, the workflow is the same as for importing any other model type (see importing a model)
Import Settings for Point Clouds
The import settings are however a bit different due to the nature of the data.
First, the segmentation parameter allows the user to segmentize his point cloud intro several cubes of points. A segmentation of 10 means that the point cloud will be divided in at most 1000 (10x10x10) GameObjects that are each 1/10th of the size of the original point cloud. This option allows Unity to do frustrum culling, an important optimization that consists in not rendering objects that are not visible. By having the point cloud split into several objets, Unity will only render objets that are visible, instead of rendering the whole point cloud every time.
It is also useful when combine with the Create LODs setting to create multiple groups of LODs for better performances.
To disable segmentation, use a segmentation of 1 (a single object).
Point Cloud Density
This option will remove points evenly in the point cloud to achieve a better framerate in Unity.
When Maximum is selected, Pixyz will import all points of the point cloud.
The Pixyz Plugin for Unity can create LODs for point clouds.
This process is entirely automatic and doesn't require any input from the user appart from specifying the maximum number of LODs.
How does it work ?
For each object, Pixyz will determine the distance between the camera and the object at which we can consider that the same object with at most half the number of points will render the same as the original object. This computation takes into account the size of splats (the point cloud's shader). Then, we decimate the point cloud based on that distance to reach the target and simply repeat the process again and again for each level of detail.
This way, we have :
- Perfectly smooth transitions between levels of details (no popping)
- A predictable cost in system memory (RAM) which can't exceed 2 times the memory required to load the model without LODs (100%+50%+25%+12.5%+...)
WARNING Importing a point cloud can be memory intensive depending on its size. For point clouds with more than 100 milion points, a workstation with at least 32gb of RAM is required. If the not enough memory is available, the import process may be slower or even crash Unity.
NOTE Point Clouds data imported by Pixyz Plugin can't get displayed in WebGL viewer due to a limitation of its shader compilation target. Our optimized Pixyz Splats Shader used to render Point Clouds use the Shader Compilation Target 4.0. (since we leverage Geometries shaders that are not available on lower Target). WebGL build only supports shader Compilation Target up to 3.0.