Non-Manifold Geometry and Mesh Optimization
Identify boundaries, bow-ties, over-shared edges, self-intersections, internal shells, and repair tradeoffs before simplification changes the wrong surface.
Non-manifold geometry is connectivity that does not behave like a locally ordinary surface. An edge shared by three faces, two surface fans touching only at one vertex, or ambiguous inside/outside structure can break assumptions used by simplification, normals, booleans, volume tests, and collision processing.
“Non-manifold” is not synonymous with “visually unusable.” A single open plane is a valid render surface with boundary. Separate clothing layers may intentionally intersect. The pipeline must classify the structure against the asset's job, then repair only what its downstream algorithms require.
Manifold conditions in practical terms#
For a closed 2-manifold triangle surface:
- every edge belongs to exactly 2 faces;
- faces incident to a vertex form one connected fan or disk-like neighborhood;
- consistent orientation provides a coherent inside and outside;
- there are no boundary edges.
For a manifold surface with boundary:
- interior edges have 2 incident faces;
- boundary edges have 1 incident face;
- boundary edges form valid loops or chains under the representation;
- a boundary vertex has a half-disk-like neighborhood.
An edge with 3 or more faces is non-manifold. A vertex connecting two otherwise separate sheets—a bow-tie vertex—has more than one incident fan and is non-manifold even if each edge has at most 2 faces.
These are topological conditions. Self-intersection is a geometric condition: two triangles can cross without sharing topology while the connectivity remains manifold. Both can break downstream operations.
Why simplifiers care#
Edge-collapse algorithms update a local neighborhood and often use a link condition to preserve manifold topology. At a non-manifold edge or bow-tie vertex, the one-ring is ambiguous. A collapse can create duplicate faces, invert sheets, join components, or remove more triangles than expected.
The CGAL surface-mesh simplification package operates on graph concepts and edge collapse with topology requirements. It does not treat arbitrary vertex-pair contraction as a universal repair framework.
Some commercial or DCC decimators accept irregular inputs using heuristics. Acceptance does not prove preservation. Compare component count, boundaries, orientation, and self-intersection before and after.
An automatic pipeline should choose among:
- reject and request repair;
- isolate valid manifold components;
- repair under a documented policy;
- use an algorithm designed for soups or reconstruction;
- simplify with boundaries/components locked;
- continue only for a render-only profile with explicit warnings.
Open boundaries#
A boundary edge has one incident face. Boundaries can represent intentional holes, sheet edges, modular cuts, clothing openings, or reconstruction gaps.
Report boundary loops with length, bounding box, face context, and semantic component. A count alone cannot distinguish a designed window from a tear.
Possible policies:
- preserve and constrain an intentional opening;
- cap a repairable planar hole;
- bridge corresponding loops;
- reconstruct from nearby surface evidence;
- leave an unseen modular boundary;
- route complex or ambiguous gaps to manual repair.
Blind fill-hole operations can cap sleeves, vents, doorways, and the open base of a product shell. Even a mathematically valid cap can produce wrong material, UV, normals, or interior semantics.
If the downstream task needs volume or 3D printing, watertightness is a hard requirement. A web viewer may safely render intentional open sheets with a double-sided material, though performance and shading still need review.
Over-shared edges#
An edge used by 3 faces creates branching surface topology. This often comes from duplicate faces, internal walls attached to an exterior, failed booleans, or CAD part conversion.
Inspect the incident face normals and component roles:
- two identical faces may be duplicates;
- one interior divider may be valid product structure but should be a separate shell;
- three exterior faces can indicate a T-junction or accidental extrusion;
- opposite-oriented duplicates can cancel volume while z-fighting;
- coincident parts may be intentionally separate assemblies.
Repair might delete duplicates, split vertices and edges into separate shells, or rebuild the junction. Choosing the wrong pair of faces changes the surface.
Do not merge by distance first. Welding can turn nearby but separate boundaries into more over-shared edges.
Bow-tie vertices#
At a bow-tie vertex, incident faces form multiple disconnected fans that touch only at the point. This appears when separate parts are welded at one coordinate or after careless cleanup.
The usual topological repair duplicates the vertex so each fan gets its own record. Geometry remains visually coincident, but connectivity becomes separate. Copy all corner attributes correctly; normals, UVs, colors, weights, and material membership may differ.
Determine whether the parts should truly be joined. A continuous solid needs a rebuilt connecting surface, not merely a split point. Two parts that touch at a pivot may be intended separate components.
Count connected face fans per vertex during preflight. One vertex with 6 fans can create unstable local operations even when edge-incidence tests appear clean.
Duplicate and overlapping faces#
Exact duplicate triangles use the same three positions, possibly in different order. Remove true accidental duplicates after comparing material, UV, normal, and semantic data. Opposite-winding duplicates can be harder to spot because they occupy the same plane.
Near-coincident surfaces produce z-fighting. They may be:
- a decal intentionally offset by a tiny amount;
- an inner and outer shell representing thickness;
- duplicate exported components;
- two LODs accidentally visible together;
- coplanar CAD faces from adjacent parts.
Geometry proximity alone cannot decide. Use node names, materials, component hierarchy, and view behavior.
After removal, compare material regions and rendered masks. A “duplicate” face may carry the only visible label.
Self-intersections#
Triangles can intersect away from shared edges. Dense scans, cloth, booleans, and simplification can create these intersections.
Self-intersection affects:
- signed distance and inside/outside tests;
- volume and mass properties;
- voxel and remesh behavior;
- physics and collision;
- boolean operations;
- shadow and transparency order;
- later edge collapses.
Adjacent triangles sharing an edge naturally meet and should be excluded from intersection reports. Coplanar overlap needs a defined classification. Use a bounding-volume hierarchy to prune triangle-pair tests; checking every pair is quadratic.
Repair options include local remeshing, boolean union, separation of components, or volumetric reconstruction. Simple vertex movement can create new intersections nearby. Re-run the test after every repair and simplification stage.
An animated cloth mesh can intersect in some poses even if bind topology is valid. Static repair cannot guarantee animation collision behavior.
Internal shells and hidden geometry#
A render asset can contain screws, support structures, scan backsides, or CAD internals never visible in the product experience. These may be individually manifold yet waste geometry and confuse surface metrics.
Classify visibility with multiple techniques:
- semantic part allowlist;
- ray sampling from approved cameras;
- enclosure tests;
- material and node roles;
- transparency and exploded-view policy;
- shadow and reflection participation;
- interaction and animation requirements.
Deleting geometry merely because it is currently occluded can break an opening animation or AR walk-around. State the viewing and variant policy.
For a permanently opaque sealed appliance, removing 120,000 internal triangles can be safer than decimating its visible outer shell. Preserve the source assembly separately.
Winding and orientation#
Consistent winding lets face normals define inside and outside. Connected closed components can be oriented by propagating adjacency, then checking signed volume for overall direction.
Non-orientable surfaces or branching non-manifold topology cannot receive a globally consistent inside/outside under the ordinary model. Open sheets can be consistently oriented locally but have no enclosed volume.
Negative node scale can make a valid local mesh appear reversed in world space. Evaluate both local index winding and composed transform determinant.
Before flipping a component, verify material sidedness and normal maps. A double-sided material can hide inverted winding in the viewport. The delivery pipeline should not rely on that to make a solid object render.
Degenerate triangles and zero-length edges#
A triangle with repeated indices or collinear positions has zero area. Nearly degenerate triangles produce unstable normals and poor numeric behavior. Zero-length edges can connect duplicate positions with different attributes.
Classify exact topology and geometric tolerance separately. Removing a repeated-index triangle is straightforward. Welding two positions 0.1 millimeters apart may close a deliberate seam on a tiny part.
Use a tolerance related to component scale and source precision. Report how many elements fall into bands, such as below 0.001%, 0.01%, and 0.1% of bounding diagonal. Review the affected regions.
After cleanup, rebuild adjacency and attribute mappings. Deleting a face without pruning unreachable vertices and accessors can leave storage waste.
Repair order matters#
A conservative sequence is:
- preserve source and normalize coordinate interpretation;
- remove non-finite and structurally invalid elements;
- identify exact duplicate faces and vertices without tolerance welding;
- classify components and intentional boundaries;
- split bow-tie fans where separation is intended;
- resolve over-shared edges from semantic evidence;
- repair selected holes and intersections;
- orient components consistently;
- remove approved hidden shells;
- simplify and re-run every topology test.
The sequence changes by asset. Boolean union before deleting internal parts can create a huge complex surface; deleting first may simplify the union. Test on a copy and record deltas.
When volumetric reconstruction is better#
If the input is an unstructured triangle soup with many overlaps, holes, and fragments, local repair can be more expensive and less reliable than sampling a volume and extracting a new surface.
Choose voxel or signed-distance resolution from smallest feature to preserve. A 512-cell axis across a 1-meter object gives about 1.95-millimeter cells. Designed 1-millimeter gaps are at risk.
Reconstruction discards original connectivity, UVs, normals, and often component identity. Plan to unwrap, bake, and transfer materials. It can create a clean watertight shell but is unsuitable when exact mechanical gaps or animation topology must survive.
Compare source and output using surface, silhouette, volume, and feature metrics. Watertight does not mean accurate.
Non-manifold inputs for render-only delivery#
glTF can represent triangle primitives without enforcing a manifold surface. A valid renderer can display open or disconnected triangles. If the asset does not need booleans, volume, collision, or manifold-only simplification, some topology findings may be acceptable.
Still require:
- finite attributes and valid accessor ranges;
- intentional winding and sidedness;
- no accidental duplicates or z-fighting;
- stable normals and tangents;
- compatible transparency;
- reasonable bounds;
- target-runtime rendering;
- documented limitations.
Do not run a manifold-assuming simplifier simply because the final format accepts triangle soup.
Report topology as evidence#
Produce counts and visual overlays for:
- boundary edges and loops;
- edges with more than 2 faces;
- vertices with multiple incident fans;
- exact and near duplicate faces;
- degenerate triangles;
- connected components by face count and volume;
- self-intersection pairs or regions;
- inconsistent orientation;
- isolated vertices and edges;
- suspected internal shells.
Include before/after differences for repair and simplification. A result with 0 non-manifold edges but 14 missing intended holes is not a success.
Keep stable identifiers for repaired regions so a reviewer can jump from each count to the exact source and output faces. Aggregate totals without spatial evidence make repair decisions needlessly opaque.
For example, a report with 12 boundary loops, 3 components, and 40 triangles in intersection regions gives reviewers actionable scope and a clearer acceptance gate than one red warning icon.
Decision checklist#
- The downstream operation's manifold requirements are documented.
- Boundaries are classified by semantic intent.
- Edge-incidence and vertex-fan tests both run.
- Self-intersection is tested separately from topology.
- Duplicate removal compares attributes and materials.
- Near-weld tolerances follow scale and source precision.
- Internal components are removed only under a viewing and behavior policy.
- Orientation accounts for negative transforms.
- Repairs run on copies with count and visual deltas.
- Volumetric reconstruction includes feature-resolution analysis.
- Simplification reruns topology and intersection tests.
- Render-only exceptions remain explicit in the asset report.
Sources and further reading#
- CGAL: polygon mesh processing repair functions
- CGAL: triangulated surface mesh simplification
- Blender Manual: selecting non-manifold geometry
- Blender Manual: mesh cleanup
- Khronos glTF 2.0 specification: meshes
Non-manifold geometry is a structural diagnosis, not an automatic repair instruction. Classify why the topology exists, choose an algorithm whose assumptions match it, and prove that any repair preserves the features the asset is supposed to deliver.