Import point clouds
Pixyz Plugin can import points clouds from the .e57, .rcp, .pts, .ptx and .gltf formats.
The import workflow for point clouds is similar as the CAD import workflow, but the import parameters are different. Also, LODs are parameterized from the Model tab directly.
In the Toolbox, click the arrow button next to the Import CAD button to to switch to the Import Point Cloud button, select a file to create a new Point Cloud Importer Scriptable Object
script.
Import parameters for point clouds
Import parameters for point clouds differ from other file formats due to the nature of the data.
Import Metadata
Use this option to import metadata that is contained in the source model (if any). Metadata can carry information such as part numbers, ownership, physical properties, and part type. Any node of the Point Cloud model hierarchy can carry metadata.
Density
Use this option to remove points evenly from the point cloud to achieve a better frame rate in Unity.
If you select Maximum, then Pixyz imports all points from the point cloud.
Segmentation
The segmentation parameter allows users to segment their point clouds intro several cubes of points. A value of 10 for segmentation divides the point cloud in at most 1000 GameObjects (10 x 10 x 10) that are each one tenth of the size of the initial point cloud. This option allows Unity to perform frustrum culling, which is an important optimization step that consists in not rendering objects that aren't visible. If you split the point cloud into several objects, Unity only renders objects that are visible, instead of rendering the whole point cloud every time.
Segmentation is also useful when you combine it with the creation of levels of details (LODs) to create multiple groups of LODs for better performance.
To turn off segmentation, set segmentation to 1
. This value results in a single object.
Create LODs
Create LODs from point clouds.
This process is entirely automatic. The only required input is the maximum number of LODs.
How it works
For each object, Pixyz determines the distance between the camera and the object at which we can consider that the same object that has at most half the number of points renders the same as the source object. This computation takes into account the size of splats, that is, the shader of the point cloud. Then, Pixyz decimates the point cloud based on that distance to reach the target and iterates the process for each LOD.
This process provides these benefits:
- Perfectly smooth transitions between levels of details, that is, no popping
- A predictable cost in system memory (RAM) which can't exceed twice the memory that is required to load the model without LODs (100% + 50% + 25% + 12.5%…)
Warning
The import of a point cloud may be memory-intensive depending on its size. To import a point cloud that has over 100 million points, you need a workstation with at least 32GB of RAM. If not enough memory is available, the import process may be slower or may even crash Unity.
Note
You can't display, in a WebGL viewer, point cloud data that is imported by Pixyz Plugin for Unity, due to a limitation of its shader compilation target. The optimized Pixyz Splats Shader, which is used to render point clouds, uses Shader Compilation Target 4.0. The reason is that we leverage geometry shaders that aren't available on lower targets. The WebGL build supports Shader Compilation Target only up to 3.0.