Premium apps Part of Renderloom
Point Cloud Tools (PLY, XYZ)
Point cloud statistics, outlier removal, voxel downsampling, normals and RANSAC plane fits.
Try an example: Floor scan with stray points: clean it and fit the floor plane (XYZ) · Sphere: estimate outward normals (vertex-only ASCII PLY) · Thin a coloured grid with 0.25-unit voxels (binary PLY) · Room corner: floor and two walls as three planes
How it works
Upload a PLY, XYZ, CSV or PTS point cloud to measure it — point count, bounding box, centroid, nearest-neighbour spacing and density — and clean it: remove statistical outliers, thin it on a voxel grid and estimate normals from the nearest neighbours. Fit up to five planes (floors, walls, tables) with seeded RANSAC and get each plane’s equation, tilt and inlier report, then download the processed cloud as PLY or XYZ. Runs on the same engine as Renderloom Mesh Lab.
- PLY files are read by the shared Renderloom mesh reader (ASCII and binary, little and big endian); vertex x, y, z, red/green/blue and nx/ny/nz properties are kept, faces are ignored. Text tables accept spaces, commas, semicolons or tabs, an optional header row (x, y, z, r, g, b, nx, ny, nz, intensity) and the PTS point-count line.
- A balanced k-d tree (median split on the widest axis) answers exact k-nearest-neighbour queries. Spacing is the distance to the nearest other point (all points up to 200000, else an even sample of 200000); local surface density is the median of k / (π·r_k²) with k = 8.
- Steps run in a fixed order. Outlier removal: mean distance dᵢ to the k nearest neighbours; points with dᵢ > μ + α·σ are removed. Voxel downsampling: one point per occupied cube (grid anchored at the bounding-box minimum) at the centroid of its points, colours averaged.
- Normals: eigenvector of the smallest eigenvalue of the covariance of the k nearest neighbours (Jacobi eigen decomposition), oriented towards the viewpoint (n·(v − p) ≥ 0) or away from the centroid. Surface variation λ₀/(λ₀+λ₁+λ₂) measures local curvature.
- Planes: RANSAC with a seeded random generator; each hypothesis through three points is scored on an even sample of at most 50000 points, the iteration count adapts to 99 % confidence, and the best plane is refined twice by least squares (PCA) on all its inliers. The default inlier threshold is 2.5 × the median spacing. For several planes the inliers are removed and the search repeats.
Statistics describe the points as given, in the file’s units. The tool does not reconstruct surfaces or meshes. RANSAC is randomised (with a fixed seed, so results repeat); clouds with several similar planes can need more iterations or a tighter threshold.
Sources
- PLY polygon file format (Paul Bourke)
- J. L. Bentley: Multidimensional binary search trees used for associative searching, Commun. ACM 18 (1975) 509–517 (ACM)
- M. A. Fischler, R. C. Bolles: Random sample consensus, Commun. ACM 24 (1981) 381–395 (ACM)
- H. Hoppe et al.: Surface reconstruction from unorganized points, SIGGRAPH 1992 (normals from local PCA) (ACM)
- R. B. Rusu et al.: Towards 3D point cloud based object maps for household environments, Robotics and Autonomous Systems 56 (2008) 927–941 (statistical outlier removal) (Elsevier)
Part of Renderloom
-
Renderloom 3D scene & material studio
Shape a scene. Find its light. Keep every idea editable.
How to measure, clean and fit planes to a point cloud
Read a PLY or XYZ point cloud, get its size, spacing and density, remove stray points, thin it on a voxel grid, estimate normals and fit floors and walls with RANSAC.
What it is for
Lidar scans and photogrammetry exports often arrive as point clouds: millions of x, y, z positions, sometimes with colours and normals. Before using one you want to know how many points it has, how big and how densely sampled it is, and you usually want to clean it. This tool reads ASCII or binary PLY files (with or without faces), XYZ, CSV and PTS tables, and runs a fixed sequence: remove statistical outliers, thin the cloud on a voxel grid, estimate normals and fit up to five planes with RANSAC. You can download the processed cloud as PLY or XYZ.
It measures and cleans; it does not turn the points into a mesh, align several scans or reconstruct a surface.
Worked example
The first example is a 4 m × 3 m floor patch that slopes gently (2 cm per metre along x, −1 cm along y), scanned with 5 mm noise, plus 40 stray points floating above it. The file holds 1240 points with a median nearest-neighbour spacing of 0.0485 and a local surface density of about 99 points per square unit.
With Remove statistical outliers on (8 neighbours, α = 2), the mean neighbour distance is 0.133 with a standard deviation of 0.115, so points further than 0.364 on average from their neighbours go: 38 points are removed. RANSAC then finds the floor with 1200 inliers (99.83 %), an RMS distance of 0.005122 — the 5 mm noise — and a tilt of 1.283° (the true slope is 1.281°).
The room-corner example asks for three planes with a 0.02 threshold and gets the floor (tilt 0.052°) and two walls (89.999° and 89.974°), each with an RMS distance below 3.2 mm. A coloured 12 × 12 × 12 grid with 0.1 spacing thins from 1728 to 125 points with 0.25 voxels, a 5 × 5 × 5 grid of occupied cubes.
How to read the result
The Input cloud table gives the bounding box, centroid and spacing statistics; Processed cloud repeats them after cleaning. The median spacing is the scan resolution and a good guide for voxel sizes and thresholds. Points per unit³ uses the bounding box, which is mostly empty for a scanned surface, so prefer the local surface density for scans.
For each plane you get the equation a·x + b·y + c·z + d = 0 with a unit normal, the inlier count, the RMS and largest inlier distance and the tilt from horizontal. The RMS is a good estimate of the scan noise on flat surfaces. In the preview, plane inliers are drawn in a plane colour.
The Normals table reports flipped normals and the mean surface variation, near 0 on flat areas and larger on edges and curves.
Tips and common mistakes
- Coordinates stay in the file's units. A voxel size of 0.05 means 5 cm only if the cloud is in metres.
- Set the inlier threshold to two or three times the scan noise when you know it; the automatic value (2.5 × median spacing) is generous.
- RANSAC uses a fixed seed, so the same input always gives the same planes. Change the seed to test how stable a fit is.
- Orient normals towards the scanner for single scans, away from the centroid for closed objects.
FAQ
How large can the cloud be?
Up to 60 MB and one million points. Spacing statistics use every point up to 200,000, and an even sample beyond that.
Are colours and normals kept?
Yes. Colours are averaged per voxel and normals re-normalised. Exported PLY files store x, y, z as doubles, so survey coordinates keep full precision.
Why does a six-column file show a warning?
Without a header, six columns can be x y z r g b or x y z nx ny nz. Whole numbers from 0 to 255 are read as colours; add a header row to make it explicit.
Can I do the same in Renderloom?
Yes. Open the file in Renderloom Mesh Lab; each action there runs the same engine on your device.
Guide last updated:
For scripts and AI agents
- JSON API:
POST https://renderloompointcloudtools.usefulweb.site/api/v1/calculate(same calculation as this page) - Interface description: OpenAPI 3.1 · AI guide: llms.txt
- MCP server (Streamable HTTP):
https://renderloompointcloudtools.usefulweb.site/mcp· tool namerenderloom_point_cloud_tools
Example request
curl -s -X POST https://renderloompointcloudtools.usefulweb.site/api/v1/calculate \
-H 'content-type: application/json' \
-d '{…see OpenAPI examples…}'