Skip to content

PointCloud2Mesh

mika edited this page Aug 10, 2023 · 6 revisions

PointCloud2Mesh

Converts point cloud into Unity mesh gameobjects (using point rendering). These meshes can be used in mobile devices, webgl (also Oculus Quest). *but you cannot have many millions of points visible, its too slow. (so need to adjust view distance, and use split 2 grid)

Supported import formats: https://github.com/unitycoder/UnityPointCloudViewer/wiki/Import-Formats#mesh-converter

Settings

image

Point Cloud source file

  • Point Cloud input file that you want to convert into binary point cloud
  • Filename & size is displayed under this field

Import settings

  • Read RGB values : Reads color values (usually expected to be in this order X Y Z R G B)
  • Read intensity value : Reads intensity value (usually expected to be in this order X Y Z I)
  • Read normal values (PLY) : Reads vertex normals and assigns them to output mesh, only supported on PLY format currently
  • Scale values : multiplies XYZ values with given value (for scaling between millimeters / meters etc)
  • Flip Y & Z values : In Unity Y is UP
  • Auto-offset near 0,0,0 : If the first row of your data is for example “10.1192 5.2643 0.5481”, then we’ll use that as an offset value, first point location becomes: X-10.1192=0, Y-5.2643=0, Z-0.5481=0 and later points will have this same offset subtracted from XYZ data, so the cloud will be nearer to 0,0,0 position in scene
  • Add Manual Offset : You can also add manual offset, that value is subtracted from XYZ data

Advanced Settings

  • Add Meshes to current scene : Disable this if you convert heavy clouds (because unity can hang with large amount of meshes), so meshes are saved as assets only (not added to scene automatically)
  • Sort points in X axis : Sorts point by X axis, so that mesh pieces get culled from view better *But not recommended yet, because in some cases the points lose lots of precision when they are sorted(?)
  • Split to Grid: Splits meshes into grid cells, so that they get culled better (try with lods enabled too)
  • Create LODS : Experimental features, creates LOD meshes with less points (but lods are not grouped yet, so it doesn't decrease draw calls.. just less vertices on screen)
  • Decimate points : Removes every Nth point *You should rather use real point cloud filtering tools to create evenly distributed points (like the filters in Catia)

Mesh Output Settings

  • Vertices per mesh : 65000 is the maximum vertices on a single mesh object
  • Mesh material : For meshes, you should use the non-dx11 materials, or you can test any other materials and shaders also. Shader needs to support vertex colors, if you want to see point cloud in colors.