ICP Alignment
Iterative Closest Point (ICP) automatically registers one dataset onto another — it nudges a source mesh or point cloud into the best rigid fit against a fixed reference. VRGS repeatedly pairs each source point with its nearest point (or surface) on the reference, solves for the rotation and translation that best line the pairs up, applies it, and repeats until the fit stops improving. It is the tool to reach for when two overlapping scans, an SfM model and a lidar cloud, or successive surveys of the same outcrop need to sit in a common coordinate frame.
ICP lives in the Itterative Closest Point panel on the Triangulated Mesh ribbon tab. It works on both triangulated meshes and point clouds, in both the OpenGL and Vulkan 3D views. For a per-button reference see the Triangulated Mesh ribbon.
ICP applies a rigid transform (rotation + translation) — it never changes the size of the source. If the two datasets are at different scales, fix that first with a GCP rescale (see Coarse pre-alignment).
How ICP works
Each iteration does three things:
- Correspondence — for every (sampled) source point, find the closest point or surface on the reference, discarding any pair farther apart than the Max Distance cutoff.
- Solve — compute the single rotation + translation that minimises the paired distances.
- Apply and repeat — move the source and measure the new alignment error (RMS). When the error stops dropping, ICP has converged.
VRGS keeps track of the best alignment it finds along the way, so if later iterations start to drift it reverts to the best pose rather than leaving the source worse off.
Point-to-point vs point-to-plane
The matching mode is chosen per object with the two radio buttons in the panel:
| Mode | What it minimises | Best for |
|---|---|---|
| Point to Point | Distance between each source point and the nearest reference point (classic ICP). | Point clouds and unstructured data. |
| Point to Plane | Distance from each source point to the nearest reference surface (the local plane). Converges faster and slides more freely along smooth surfaces. | Triangulated meshes / surface models. |
As a rule of thumb: use Point to Point when the active object is a point cloud, and Point to Plane when it is a triangulated mesh.
Before you start
ICP refines an already roughly correct alignment — it is not a global search. For a reliable result:
- Load both datasets and make sure they are visible in the 3D view.
- Pre-align them so they start within roughly a model unit and a small rotation of each other. Drag them close by hand, or use the tiepoint/GCP corrections below for a coarse first pass.
- Make sure they overlap — ICP can only match the region the two datasets share. More overlap gives a more stable fit.
The active object (the one selected in the project tree / 3D view) is the source that ICP moves. The reference is every other visible mesh or point cloud of a compatible type, and the source is aligned to each of them in turn. To align A onto B specifically, select A, and hide everything except A and B before running ICP — otherwise A will also be dragged toward whatever else is on screen.
Running an alignment
- Select the dataset you want to move (the source) in the project tree so it is the active object.
- Hide every object except the source and the single dataset you want to align it to (the reference).
- On the Triangulated Mesh tab, in the Itterative Closest Point panel, choose the mode — Point to Point for a cloud, Point to Plane for a mesh.
- Set the parameters (see below). Start with a generous Max Distance for a coarse run, then tighten it for a final pass.
- Click ICP to start. The source converges onto the reference and the alignment RMS error is reported in the messages panel, dropping each iteration.
- Click ICP again at any time to stop early.
Turn on Split View to see the source and reference side by side, or Overlay to draw the reference on top of the source, and enable Show Links to draw a line from each source point to its matched reference point. Long or criss-crossing links mean poor overlap or too large a Max Distance.
Parameters
All ICP settings are stored on the active object, so each dataset remembers its own values.
| Control | Meaning | Default |
|---|---|---|
| Max Distance | The correspondence cutoff, in model units (metres for georeferenced data). Point pairs farther apart than this are ignored, which stops the fit being pulled toward the wrong surface. Use a larger value for a coarse first run and tighten it as the datasets close in. Must be greater than zero. | 1.0 |
| Sampling | Use every Nth source vertex when matching (1, 2, 4, 8, 16, 32, 64, 128). 1 uses every vertex (most accurate); higher values use fewer points so each iteration is faster but coarser — handy for a quick first alignment of a huge dataset. | 1 |
| Percentile | Trimmed-ICP outlier rejection: keep only the closest fraction of correspondences and discard the worst ones as outliers. 100% keeps them all; lower it to make the fit robust to noise, stray points, or partial overlap. | 100% (keep all) |
| Use Tiepoints | Seed the alignment from the centroids of the object's tiepoints instead of from the raw correspondence centroids, anchoring ICP to your manual control. Only available once the object has tiepoints. | Off |
For a large, only-roughly-aligned pair: start with Sampling 8–16, a Max Distance of a few times the point spacing, and Percentile 100%; run ICP. Then drop Sampling back to 1, tighten Max Distance, and (if the data is noisy or only partly overlapping) lower Percentile to around 90–95% for a clean final pass.
Coarse pre-alignment with tiepoints and GCPs
When the two datasets start too far apart for ICP to lock on, give it a coarse manual alignment first. The Corrections group on the same ribbon tab computes a transform from matched control points:
- Use Add Tiepoint and Target to place pairs of matching points — one on the source, one on the corresponding feature on the reference.
- Apply a correction:
| Command | Effect |
|---|---|
| From GCP | Rigid fit (rotation + translation) from the tiepoints/ground-control points — no scaling. |
| From GCP with Scaling | Adds a uniform scale, for datasets captured at different scales. |
| From orientation | Fit from orientation (dip/azimuth) control points. |
| From GCPs and orientation | Combine position and orientation control points in one fit. |
| Rescale From GCP / Anisotropic Rescale GCP | Apply an isotropic or directional scale correction from the tiepoints. |
- Optionally enable Use Tiepoints so ICP keeps honouring those control points, then run ICP to refine.
Checking the result
- RMS error — reported in the messages panel as ICP runs. A steadily falling value that levels off means a good convergence.
- ICP_Diff attribute — after a run, VRGS writes a per-vertex
ICP_Diffattribute holding each source point's distance to the reference in the final pose. Colour the source by it (see Attributes) to get a residual heat-map: low values are a tight fit, high values flag regions that did not align well (poor overlap, moving features, or noise). - Overlay / Split View — compare the source and reference visually before and after.
For a rigorous, signed surface-to-surface comparison of two aligned datasets (rather than ICP's internal residual), use M3C2 comparison.
Undoing an alignment
- Ctrl+Z restores the source's pre-ICP geometry (ICP snapshots it before the run).
- Undo Transform on the ribbon steps back through the transforms applied to the active mesh, so you can peel off the last ICP (or correction) without losing earlier work.
Tips and troubleshooting
- The source jumps toward the wrong dataset. The reference is every other visible object — hide everything except the source and the one dataset you are aligning to.
- ICP barely moves the source, or the RMS will not drop. The datasets probably start too far apart, or Max Distance is too small to find correspondences. Do a coarse tiepoint/GCP correction first, or increase Max Distance for the first run.
- The fit is pulled toward outliers / a non-overlapping region. Lower the Percentile to reject the worst correspondences, and reduce Max Distance once the datasets are close.
ICP P2P: cutoff distance <= 0in the messages. Max Distance must be a positive value — every correspondence is rejected at zero. Set a sensible cutoff and rerun.- The two datasets are different sizes. ICP is rigid and cannot fix scale — use From GCP with Scaling or a Rescale correction first.
- It is slow on a huge dataset. Raise Sampling (e.g. 16 or 32) for the coarse passes, then return it to
1for the final refinement. - The result looks worse than where it started. ICP commits the best pose it found, so this is rare — but if it happens, Ctrl+Z / Undo Transform and retry from a better manual pre-alignment with a tighter Max Distance.
See also
- Attributes — colour a dataset by the
ICP_Diffresidual to inspect the fit. - M3C2 comparison — signed surface-to-surface change detection between aligned datasets.
- SfM User Guide — build the photogrammetric models you will often align with ICP.
- Triangulated Mesh ribbon — full button-by-button reference for the ICP and Corrections panels.