TL;DR
- There is no “best” way to encode geometry. Implicit representations define a surface by a condition (easy inside/outside tests, hard to sample). Explicit ones list the points directly (easy to sample, hard inside/outside tests).
- A distance field gives the distance to the surface, the normal and the closest point for free.
- Marching cubes turns a grid of field values into a triangle mesh (lookup table + linear interpolation). It misses sharp features; dual contouring, dual marching cubes and the differentiable FlexiCubes improve on it.
- Poisson surface reconstruction turns an oriented point cloud into a watertight mesh: find the indicator function whose gradient matches the normals, i.e. solve .
- Procrustes gives the optimal similarity transform for known correspondences: translation = centroid difference, rotation from the SVD of the cross-covariance, scale = quotient of sums.
- ICP alternates between finding closest-point correspondences and solving Procrustes. It converges to a local minimum. Point-to-surface distances and gradient-based ICP improve it.
Exam relevance
Confirmed exam task: a museum has a point cloud of a statue and wants a mesh. Draw the pipeline using a signed distance field, and say what happens at training and at inference time. Minimal answer: point cloud → SDF → marching cubes → mesh. See Putting It Together: From a Point Cloud to a Mesh. The learning overview also lists Procrustes (translation, rotation, scale; know the notation).
The lecture has three parts: 5.0 surface reconstruction (representations of geometry), 5.2 Procrustes alignment, and ICP.
Part 1: Representations of Geometry
How Can We Describe Geometry?
Slides 2-12
To model virtual humans we need the kinematics and transformations (→ Lecture 2.2), then the geometry of the shape, and finally materials, lighting and textures for a photorealistic result. This lecture is about geometry.
A simple circle can be described in many ways: implicitly (), linguistically (“unit circle”), explicitly (), tomographically, dynamically, by symmetry, by curvature (), discretely…
Real geometry is much harder: faces, cloth blowing in the wind, splashing water (shapes that break apart and merge again, like a fluid), a whole city with detail at different scales, a dog with long fur (a nightmare with meshes; a volumetric representation is probably better).
No one "best" choice, geometry is hard!
“I hate meshes. I cannot believe how hard this is. Geometry is hard.” (David Baraff, Senior Research Scientist, Pixar Animation Studios)
Many Ways to Digitally Encode Geometry
Slide 13
| Explicit | Implicit |
|---|---|
| point cloud | level set |
| polygon mesh | algebraic surface |
| subdivision, NURBS | L-systems |
| … | … |
Each choice is best suited to a different task or type of geometry. See Implicit and Explicit Representations.
Implicit Representations
Surfaces as an Implicit Function
Slides 14-19
Implicit representation
Points aren’t known directly, but satisfy some relationship. E.g. the unit sphere is all points with . More generally:
The function can be an occupancy indicator (0 outside, 1 inside, see Occupancy Field). The surface is the set of points at a threshold (the boundary):
In graphics, basic primitives (ellipsoids, Gaussian blobs, …) are often combined into complex shapes. In machine learning, the implicit function has no closed form: a neural network approximates it.
A game: I'm thinking of an implicit surface . Find any point on it.
Answer Implicit surfaces make sampling hard.
Hard! You’d have to search or solve the equation.
Another game: . Is the point inside?
Answer , so yes. Just plug it in. Implicit surfaces make inside/outside tests easy.
Algebraic surfaces
Slide 20
The surface is the zero set of a polynomial in (sphere, torus, heart, …). Easy to evaluate and store. But for complicated shapes (a cow, a car) it is very hard to come up with polynomials.
Constructive solid geometry
Slide 21
Build more complicated shapes via Boolean operations: union , intersection , difference . Then chain the expressions into a tree.
Blending distance functions
Slides 22-23
A distance function gives the distance to the closest point on the object. Any two distance functions can be blended, e.g.
The appearance depends on how we combine them.
How do we implement a Boolean union of and ?
Answer .
Just take the minimum:
Whole scenes can be made of pure signed distance functions (Shadertoy). Art with math, but really hard.
Nowadays: neural distance fields
Slide 24
Storing an implicit function in a 3D grid is costly. Today, a neural network is trained to return, for every point in space, its distance to the surface. From this we recover the surface. Example: Neural Distance Fields (Chibane et al., NeurIPS 2020), which also represent open surfaces with an unsigned distance.
Distance Field, Normals and Closest Points
Slide 25
A good representation should make closest points and normals easy to compute. With a distance field this is straightforward:
Distance field
Distance to the surface is the field itself:
The surface normal is the gradient of the function:
Closest points are found trivially:
Why is the gradient the normal?
Along the level set the function does not change value. The gradient points in the direction of maximum change, so it must be orthogonal to the level set curve or surface. Hence the gradient is the normal. The closest point is found by walking the distance against the gradient.
Surface Reconstruction from an Implicit Representation
Slide 26
- Implicit surfaces have nice features (e.g. merging and splitting).
- But complex shapes are hard to describe in closed form.
- Alternative: store a grid of values approximating the function.
- The surface is found where the interpolated values equal zero.
Marching Cubes
Slides 27-31
Level sets are widely used in medical imaging, they are great for volumes. Marching cubes extracts a triangle mesh from them:
Marching cubes algorithm
- Read four slices into memory.
- Scan two slices and create a cube from four neighbors on one slice and four neighbors on the next slice.
- Calculate an index for the cube by comparing the eight density values at the cube vertices with the surface constant (inside or outside: cases).
- Using the index, look up the list of edges from a precalculated table.
- Using the densities at each edge vertex, find the surface-edge intersection via linear interpolation.
- Calculate a unit normal at each cube vertex using central differences. Interpolate the normal to each triangle vertex.
- Output the triangle vertices and vertex normals.


Once we have the values of the implicit function at the cube vertices, we only create mesh vertices in the cubes that the lookup table marks as crossing the surface, by interpolating along their edges.
Challenges with marching cubes
- generates one polygon for each portion of the contour
- can only approximate the restriction of the contour
- fails to capture sharp details of the surface
- the generated mesh is difficult to simplify
- extracting the surface becomes challenging for higher grid sizes: a 3D uniform grid has cubic cost in the resolution
Trap
A higher resolution does not make sharp edges exact; it only costs 8 times more per doubling.
Dual Contouring
Slides 32-34
- Can capture sharp edges along the corners of a surface.
- Uses the gradient information at the edge intersections to reproduce polyhedral shapes as well as curved or sharp edges.
- Uses an octree instead of a 3D uniform grid for better efficiency.
- Uses the normals to define a Quadratic Error Function (QEF) for each leaf of the octree (inspired by Extended Marching Cubes):
Dual contouring QEF
: intersections and normals of the contour with the edges of the cube (Hermite data). One vertex is placed per cell: the point that lies as well as possible on all tangent planes ( must be perpendicular to the normal).
Challenges: limited expressivity because of the structured grid; very thin surfaces and features can’t be extracted faithfully (they would need a very fine grid); limited by the amount of surface simplification.
Dual Marching Cubes
Slides 35-36
- Aligns the features of the implicit function with the features of the structured grid, which enables the extraction of sharp features.
- Generates adaptive polygonalizations that are crack-free and topologically manifold.
- Reproduces thin features without excessive subdivision of the octree.
Dual marching cubes QEF
Tangent planes to at sample points over the cell :
The denominator normalizes the contribution of each tangent plane.
| Dual contouring | Dual marching cubes | |
|---|---|---|
| Samples | only on sign-changing edges of the cell | all sample points in and around the cell |
| Sample location | on the surface (edge crossings) | anywhere, typically cube corners |
| Data per sample | position + normal (Hermite data) | field value + gradient |
| QEF minimizes | distance to tangent planes | mismatch between local linear models and the field |
Comparison and FlexiCubes
Slides 37-39
- MC fails to capture sharp features.
- DC captures sharp features, but can produce non-manifold vertices.
- DMC does not introduce non-manifold vertices and generates crack-free adaptive polygonalizations.


FlexiCubes (flexible iso-surface extraction): the classical methods are non-differentiable. If a neural network predicts the surface, we can’t supervise directly on the extracted mesh. FlexiCubes is an iso-surface representation designed for optimizing an unknown mesh w.r.t. geometric, visual or even physical objectives. It adds carefully chosen parameters that locally adjust the extracted mesh geometry and connectivity. They are updated together with the scalar field via automatic differentiation.
Trap
FlexiCubes is not “a faster marching cubes”. Its point is that it is differentiable.
Level Sets: Storage and Pros & Cons
Slides 40-41
Although a level set gives much more explicit control over the shape (like a texture), it
- runs into problems of aliasing (unlike closed-form expressions)
- induces storage for 3D surface extraction
- can save space by only storing a narrow band around the surface
Implicit representations: pros and cons
Pros:
- the description can be very compact (e.g. a polynomial)
- easy to determine if a point is in the shape (just plug it in!)
- other queries may also be easy (e.g. distance to the surface)
- for simple shapes, exact description, no sampling error
- easy to handle changes in topology (e.g. fluid)
Cons:
- expensive to find all points in the shape (e.g. for drawing)
- very difficult to model complex shapes
Explicit Representations
”Explicit” Representations of Geometry
Slides 42-48
Explicit representation
All points are given directly. E.g. the points on the sphere are for and . More generally:
(There might be many of these maps, e.g. one per triangle.)
Examples: triangle meshes, polygon meshes, subdivision surfaces, NURBS, point clouds.
A game: my surface is . Give me some points on it.
Answer . Explicit surfaces make sampling easy.
Just plug in any values
My surface is the torus . Is the point inside?
Answer Explicit surfaces make inside/outside tests hard.
…No! But you can’t just plug it in.
Conclusion
Some representations work better than others, it depends on the task!
| Implicit | Explicit | |
|---|---|---|
| Inside/outside test | easy (plug in) | hard |
| Sampling points | hard | easy (plug in ) |
Point Clouds
Slide 49
- Easiest representation: a list of points , often augmented with normals.
- Easily represents any kind of geometry.
- Easy to draw a dense cloud ( point per pixel).
- Hard to interpolate under-sampled regions.
- Hard to do processing, simulation, …
Point clouds are the output of many 3D scanners and reconstruction methods (SfM, MVS). See Point Cloud.
From Points to Surfaces: Poisson Surface Reconstruction
Slides 50-54
Why do we need surface reconstruction?
- Point clouds are discrete and unordered: no connectivity or topology.
- Downstream tasks (rendering, simulation, 3D printing) need a continuous surface.
- Goal: a method that is global, robust to noise, and produces watertight meshes.
- Key idea: recast surface reconstruction as solving a Poisson equation.
Reconstructing a surface from a point cloud is underdetermined. Given an oriented point cloud, we look for an indicator function (1 inside, 0 outside). Its gradient is zero almost everywhere (the indicator is constant almost everywhere), except near the surface, where it equals the inward surface normal. So the oriented point samples can be viewed as samples of the gradient of the indicator function.
Poisson surface reconstruction (Kazhdan et al., 2006)
Given an oriented point cloud with points and outward normals , find with
Step 1: interpolate the normals into a vector field with a convolutional kernel , in a box containing the points:
Step 2: find the function whose gradient best matches :
This variational problem is equivalent to the Poisson equation
solved by discretization with the finite element method on an octree and a purpose-built multigrid algorithm.
Screened PSR (Kazhdan and Hoppe, 2013) adds a term that pulls the function to zero at the input points:
(Screened) Poisson Reconstruction
Slides 55-60
- It can extract the surface from oriented point clouds.
- Screened PSR efficiently implements sparsity constraints and captures the details of the surface better.
- Screened PSR uses an efficient octree and multigrid algorithm to reduce the time complexity.
However, these methods only output the likeliest surface given the points and their assumed prior. In reality there could be infinitely many surfaces for the same set of points with normals.
In the comparison, Poisson reconstruction (and to a lesser extent SSD) over-smooths the data, wavelet reconstruction has derivative discontinuities, and screened Poisson fits the samples faithfully without introducing noise.
Neural Stochastic Screened PSR (Sellan and Jacobson, SIGGRAPH Asia 2023) goes a step further: it models the posterior distribution (a Gaussian) over all possible reconstructions. Mean and covariance of the implicit field are parameterized with neural networks and optimized with gradient-based methods on losses derived from the variational Poisson equation. This allows statistical queries: the probability that a point is inside the shape, , or on the surface. In theory it strictly generalizes PSR; in practice its volumetric smoothness prior avoids overfitting. It can even suggest where to scan next.
Trap
PSR does not interpolate the points exactly, it smooths (over-smoothing). Screened PSR still needs normals: the gradient term remains.
Polygon Meshes
Slides 61-64
- Store vertices and polygons (most often triangles or quads).
- Easier processing and simulation, adaptive sampling.
- More complicated data structures, irregular neighborhoods.
- Lightweight and easy to manipulate. Problem: topology!
Triangle mesh:
- vertices as triples of coordinates
- triangles as triples of vertex indices (e.g. a tetrahedron: 4 vertices, 4 triangles)
- points inside a triangle via barycentric interpolation: with ,
Mesh normals
Option 1, one normal per face:
Option 2, interpolate the incident face normals at each vertex, then use barycentric interpolation inside the triangle:
Distance queries and closest points:
- Smooth parametric surface: evaluation , normals . The closest surface point to is the with (the difference is parallel to the normal).
- Mesh: find the closest triangle, then the closest point in that triangle. Use a kd-tree or AABB tree to find the closest triangles.
See Mesh.
Subdivision
Slides 65-68
An alternative starting point for curves and surfaces:
- Start with a “control curve”.
- Repeatedly split, and take a weighted average to get new positions.
- For a careful choice of averaging rule, this approaches a nice limit curve, often exactly the same curve as well-known spline schemes!
Is subdivision an explicit or an implicit representation?
Answer Explicit (Slide 67). There is no level set; the points are generated directly from the control cage (even though we don't know them in closed form before subdividing).
Subdivision surfaces:
- Start with a coarse polygon mesh (“control cage”), subdivide each element, update the vertices via local averaging.
- Many possible rules: Catmull-Clark (quads), Loop (triangles), …
- Common issues: interpolating or approximating (does the limit surface pass through the control points?), continuity at vertices (where more or fewer than 4 patches meet).
- Easier than splines for modeling; harder to evaluate pointwise.
- Widely used in practice: one of the first uses in animation was Pixar’s short film Geri’s Game. Tony DeRose, Michael Kass and Tien Truong received an Academy Award for their work on subdivision surfaces. In computer vision, e.g. What shapes are dolphins? (Cashman & Fitzgibbon).
Part 2: Procrustes Alignment
Aligning Point Clouds to a Common Frame
Slides 70-72, 86-99
Motivation: to learn a model of human pose and shape (like SMPL, ), we scan a lot of people in lots of poses. To learn a model we need correspondences between all these scans and a template. That needs non-rigid articulated registration; the first step is rigid alignment.
A mesh is (faces and vertices). How can we transform the set of points ?
Combined: , or in homogeneous coordinates
Procrustes alignment problem
Given two point sets and with known correspondences, find scale, rotation and translation:
Name: Procrustes is a bandit from Greek mythology who made his victims fit his bed by stretching their limbs or cutting them off (“he who stretches”).
Optimization Problem and SVD Recap
Slides 73-74
Is it linear or quadratic in the parameters? Quadratic in and , but must stay a rotation. It still has a closed-form solution, with the SVD:
Warning
The of the SVD is not the vertex matrix!
Procrustes Solution
Slide 75
Procrustes alignment steps
Matrices of points , , centered versions (centroid subtracted).
Rotation: SVD of the point cross-covariance
Scale: a quotient of eigenvalue sums
Translation: the centroid difference
( here are the centroids.)
Sign of t
Slide 75 writes , but the derivation on Slide 78 gives . The derivation is right: with , the centroids must map onto each other.
Trap
Procrustes does not find correspondences. They are its input.
Proof
Slides 76-84
Derivation: translation (Slides 77-78)
Remove the terms that don’t depend on . With the centroids , :
So given and , we can compute the translation.
Derivation: rotation (Slides 79-83)
Subtract the centroids (, ) to get a simpler expression, subject to :
The optimal rotation does not depend on the scale:
What kind of matrix is ? Orthogonal. What kind is ? Diagonal (non-negative). So the inner product is maximal when equals the identity:
Derivation: scale (Slide 84)
Optimize the scale given the rotation:
Used: 1) the trace is invariant to cyclic shifts, 2) , , 3) the trace equals the sum of eigenvalues for square matrices.
Note
In practice one also checks : if it is , the result is a reflection, and the sign of the last column of is flipped. This is not on the slides.
Part 3: Iterative Closest Point (ICP)
What Is Missing?
Slides 117-126
Given correspondences, Procrustes finds the optimal rigid alignment. Problems:
- How do we find the correspondences between shapes?
- How do we align shapes non-rigidly?
Two tools: ICP optimizes alignment and correspondences together; continuous optimization handles general deformations.
The optimization is over the transform and the correspondences . With the closest point to the target shape point (and containing translation, rotation and isotropic scale):
Solution: Iteratively Find Correspondences
Slides 127-138
What if we estimate the correspondences? Alternate between the two:
Alternation
Given the current best transformation, which are the closest correspondences?
Given the current best correspondences, which is the best transformation? (solved with Procrustes)
Walkthrough on the slides: start with a neutral initialization (initializing to align the centroids should work better!), make up reasonable correspondences (closest points), solve for the best transformation with Procrustes, apply it, and iterate until the shapes overlap.



The ICP Algorithm
Slides 139-143
Iterative Closest Point (ICP)
- Initialize (typically better than 0: align the centroids)
- Compute correspondences according to the current best transform:
- Compute the optimal transformation with Procrustes:
- Terminate if converged (error below a threshold), otherwise iterate.
- Converges to local minima.
flowchart LR
I["Initialize f⁰<br/>(align centroids)"] --> C["Closest points<br/>(correspondences)"]
C --> P["Procrustes:<br/>best s, R, t"]
P --> A["Apply transform"]
A --> T{"Converged?"}
T -- "no" --> C
T -- "yes" --> D["Done<br/>(local minimum)"]
Trap
ICP finds only a local minimum, not the global optimum. A bad initialization gives a wrong alignment.
Is ICP the Best We Can Do?
Slides 144-150
Computing closest points:
- Brute force is (for every point, check every point).
- Tree-based methods (e.g. kd-tree) have an average complexity of per query.
- Random point sampling also reduces the running time.


ICP: tips to avoid local minima
- Always find correspondences from target to source (proper data term).
- Outliers → robust cost functions.
- Use additional information (e.g. normals).
- Compute the transformation from greedy subsets of points: RANSAC.
A much better objective: point-to-surface distance. Instead of the distance to the closest vertex of the target mesh (point-to-point), use the distance to the closest point on the surface (point-to-surface). The point-to-point closest vertex can be far away from the real closest surface point.


Gradient-Based ICP
Slides 151-166
Procrustes gives the optimal rigid transformation and scale for given correspondences. What if the deformation model is not rigid? Can we generalize ICP to non-rigid deformation?
Instead of the optimal transformation, we only compute a transform that reduces the error: a descent step, by linearizing the energy (the Jacobian of the distance-based energy).
- If is a rigid transformation, we can solve this with Procrustes.
- If is a general non-linear function: gradient descent .
- For least squares there is a better method: Gauss-Newton based methods.
Gradient-based ICP
- Energy:
- Consider the correspondences fixed in each iteration :
- Compute the gradient of the energy around the current estimate:
- Apply a step (gradient descent, dogleg, LM, BFGS, …): , for example
- Terminate if converged, otherwise iterate (go to step 2).
The gradient is the derivative of the sum of squared distances w.r.t. the parameters of . Each derivative is easy, but nobody wants to write them all down: chain rule and automatic differentiation. Write the energy as if it was numpy code; it becomes an expression tree with Jacobians available at each step.
Why gradient-based ICP?
- The formulation is much more generic: the energy can include other terms, more parameters, etc.
- Lots of software for solving the least squares problem (cvx, Ceres, …).
- However, for general deformation models the energy is non-convex. The optimization can get trapped in local minima.
Take-home message
- Procrustes is optimal for rigid alignment problems with known correspondences.
- For other problems, compute correspondences and solve for the best transformation iteratively with ICP.
Putting It Together: From a Point Cloud to a Mesh
The exam scenario: a museum has a point cloud of a statue (200 points) and wants a mesh, using a signed distance field. This page covers the classical tools; the learned SDF (DeepSDF, neural implicits) follows in Lecture 6.1.
flowchart LR
P["Point cloud<br/>(+ normals)"] --> F["Implicit field<br/>SDF / indicator<br/>(PSR, or a network)"]
F --> G["Evaluate on a grid"]
G --> M["Marching cubes<br/>(level set f = 0)"]
M --> O["Triangle mesh"]
| Step | What it needs | Notes |
|---|---|---|
| Point cloud → implicit field | oriented normals for PSR; for a learned SDF, a trained network | inside/outside comes from the normals (PSR) or is learned |
| Field → grid | evaluate at grid vertices | cubic cost in the resolution |
| Grid → mesh | marching cubes on the zero level set | sharp features lost; dual contouring / DMC are better; FlexiCubes if it has to be differentiable |
Training vs. inference (for a learned SDF)
Training: a network learns to predict the signed distance (or occupancy) of 3D query points from data where the ground truth distances are known (needs watertight shapes). Inference: encode the new point cloud, query the network on a dense grid, run marching cubes on the zero level set to get the mesh.
Why can't we compute a signed distance directly from the raw point cloud?
Answer sign needs inside and outside, which a raw, unordered point cloud does not define (no connectivity, possibly holes). PSR gets inside/outside from the normals; a learned method gets it from training data with watertight ground truth. An unsigned distance (like NDF) does not need it.
The
Self-Test
What is the difference between implicit and explicit representations? Which tasks does each make easy?
Answer ; inside/outside tests are easy (plug in), sampling is hard. Explicit: points are given directly, ; sampling is easy, inside/outside tests are hard.
Implicit: points satisfy a relationship
How do you get the normal and the closest surface point from a distance field?
Answer (the gradient is orthogonal to the level set). Closest point .
Normal
How do you implement the union of two distance functions?
Answer .
Describe marching cubes and its weaknesses.
Answer
Build cubes from two slices, compute an 8-bit index from the inside/outside signs of the corners, look up the edge list in a precalculated table, place vertices on the edges by linear interpolation, compute normals by central differences, output triangles. Weaknesses: misses sharp features, only approximates the contour, hard to simplify, cubic cost in the resolution.
What does dual contouring do better, and what does it need?
Answer . It needs Hermite data (edge intersections + normals) and uses an octree. It can produce non-manifold vertices; DMC avoids that.
It captures sharp edges and corners by placing one vertex per cell that minimizes the QEF
Why FlexiCubes?
Answer
Classical extraction is non-differentiable, so a network can’t be supervised on the extracted mesh. FlexiCubes adds parameters that are optimized with the field via automatic differentiation.
Explain Poisson surface reconstruction.
Answer , find whose gradient best matches (), which is the Poisson equation , solved on an octree with multigrid. Extract the surface (e.g. marching cubes). Screened PSR adds .
Oriented points are samples of the gradient of the indicator function. Interpolate the normals into a vector field
Is subdivision explicit or implicit?
Answer
Explicit.
Give the Procrustes solution for , , .
Answer , , , (centroids).
With centered point matrices:
Why is optimal?
Answer equals maximizing . is orthogonal and diagonal with non-negative entries, so the maximum is at .
Minimizing
Describe ICP. What does it converge to?
Answer
Initialize (align centroids), then alternate: closest-point correspondences for the current transform, optimal transform with Procrustes, apply, until the error is below a threshold. It converges to a local minimum.
How can ICP be improved?
Answer ), correspondences from target to source, robust cost functions against outliers, normals, RANSAC, point-to-surface instead of point-to-point distances, and gradient-based ICP (Gauss-Newton, autodiff) for non-rigid deformation models.
kd-trees for closest points (
Related
- Previous: Lecture 4: Stereo and Depth Estimation · Next: Lecture 6.1: Neural Fields · Course: Overview
- Concepts: Implicit and Explicit Representations, Signed Distance Function, Occupancy Field, Marching Cubes, Poisson Surface Reconstruction, Point Cloud, Mesh, Procrustes Alignment, Iterative Closest Point, Rotation Matrix, RANSAC
- Oriented patches from multi-view stereopsis are meshed with Poisson reconstruction (Lecture 4).