Background
What if we want to build a nice topology around a pointcloud similar to mesh retopology? Let’s think about it.
Method
Tangent field
- Direction field. We can surely estimate the 4-rosy field for each vertex based on a KNN graph.
- Singularity vertex. For each point and it’s tangent plane, we project points, locally triangulate, and count the rosys (if not 4, it’s a singularity).
- Singularity region. We can possibly merge singular vertices.
Patch Segmentation
Path tracing.
Path tracing is do-able. We build a motor-cycle graph (vertices-direction connection), and dijkstra algorithm to compute loop for any sampled vertex-direction pair.
Rounds
Once we have the path tracing kernel, the main algorithm can work including the recursive patch segmentation, loop selection. However, several problem exists.
- How shall we partition points into patches given paths?
- How shall we verify the validity/quality of a patch as a point cloud?
Core algorithm
KNN Split
The core challenge for partitioning the patch is that non-manifold KNN topology. Once we have the path, we need to split the graph seriously. For each graph edge, we make a normal plane with certain thickness, and any graph edge passing the plane should be removed. After that, we are able to partition the graph into subgraphs as patches.
We actually can make an annotation to pseudo-split the edge (by recording its splitting path). When a novel path go through the cutted edge, we are able to determine the intersection (orthogonal path) or reject it (tangential path).
Path elements
Sharp edges. Seems that it is viable via CGAL, section 14. Then, paths can be traced along sharp features to get sharp edge paths through KNN.
Boundary edges. If a vertex is really at the boundary, there is no neighbor along one of the 4-rosy direction.
Corners Boundary corners can be determined by line segment simplification.
Intersections Intersections of orthogonal paths can be detected via KNN split.
Patch criterion
Topology, homeomorphic to a disk
Valance, 3-6 By maintaining the path elements, counting corners is trivial.
Convex, No left/U-turn By measuring the angle between paths, we are able to determine the convexity.
Valance Match By counting internal singularity regions, we are able to verify the valance match.
Length concerns It can be estimated by projecting paths through directions and accumulate lengths.
Data structure
Points
1 | Point { |
Adjancency
1 | PointAdj { |
1 | OrientPointAdj { |
1 | Path{ |
Patch
1 | Patch { |
Algorithm
Tangent Field
1 | Input Point.p. |
Motor-cycle graph
1 | Split each point into 4. |
Sharp-boundary Initialization
- Detect sharp points using CGAL.
- OrientPointAdj without forward edges are considered boundaries in original points.
- Trace motocycle graphs along sharp points to form sharp paths (find longest paths, remove branches.)
- Trace boundary points in the original graph, and map the path to motor-cycle graph. (might introduce new connections inside node with orthogonal directions.)
(3 and 4) By tracing the route, we need to filter noise to ensure a clean graph. Other tangential paths should be removed. Paths can be traced by iteratively finding the longest paths (which should be robust), and remove overlapped tangential paths. We also remove very thin paths. Now, every path is simply a sequence of oriented point ids.
- Record path ids to edges that intersect paths, and confirm path-path intersection, potentially add new points into the path.
- building path structure with intersections as end_idxs that splits arcs.
- Partition the region by region growing.
- Update status for all patches.
Rounds
- non-convex corners are connected to each other build novel paths. Followed by 5-6-7-8.
- non-convex corners are connected to edges to build novel paths. Followed by 5-6-7-8. (Great! Now everything is convex!)
- Random internal sampling. Sort them, and If valid, preserve it Followed by 5-6-7-8.
- Edge sampling. Sort them, and If valid, preserve it Followed by 5-6-7-8.
- Recursively do 9-12 for invalid subpatches.
Patch status
The major difficulty is about computing genus for a patch with unstructured point cloud.