Every representation so far — voxels, NeRF's MLP, a pile of Gaussians — assumed a real 3D scan or a set of camera photos already existed. What if you only have a text prompt, or one photograph, and the "scene" has to be conjured out of nothing?
A generative model's first guess is rarely good. Here every point starts collapsed onto the same spot — the shape's centroid — and gets refined step by step. Step through it: the point cloud fans back out toward the 4 corners it's supposed to represent, and the fidelity bar climbs as it goes.
"Good enough" needs a metric. Chamfer distance scores how well a predicted point set matches a target , symmetrically — it penalizes both a predicted point sitting far from any real surface point, and a real surface point that nothing predicted is near:
Once a shape is refined enough, turning it (or a continuous density field) into an actual mesh means finding where the field crosses zero — the surface. On a 1D slice, that's linear interpolation between two samples of opposite sign:
- — the predicted point set and the target (or vice versa); the two terms make the metric symmetric.
- — a sampled field's value at two adjacent points (negative = outside, positive = inside).
- — where the field crosses zero between those two samples — marching cubes' core 1D building block.
- Coarse guess: all 4 points collapsed onto the centroid (1,1)
Every point is from every one of the target square's 4 corners in both directions: chamfer .
- Halfway refined
Each point has moved halfway to its corner: chamfer drops to exactly — half the coarse score.
- Fully refined: points exactly on the corners
chamfer — every predicted point sits exactly on a real surface point, and vice versa.
Drag continuously instead of jumping between 3 fixed steps. Chamfer distance falls off perfectly linearly here — — because every point is moving in a straight line toward its own target corner at the same rate.
Locating a surface crossing in a 1D density profile sampled at with values (negative = outside, positive = inside):
- Between x=1 (d=-0.2) and x=2 (d=0.6): opposite signs, a real crossing
— the surface passes a quarter of the way from to .
- Between x=0 (d=-1) and x=1 (d=-0.2): same sign, no real crossing
The formula still returns a number ( again, by coincidence of these particular values), but it falls outside the segment — the tell that there's nothing to mesh here, since both samples agree they're outside the shape.
Drag the refinement slider until the point cloud's chamfer distance to the target drops to ≈ 0.5.
Generative 3D pipelines close the loop this whole Part has been building toward: refine a rough guess against a symmetric distance metric until it's faithful enough, then walk its zero level set to extract an actual mesh. The capstone puts every piece from this Part together — camera projection, Gaussian fundamentals, and depth-ordered rasterization — into one working renderer.