How to Measure Visual Error After 3D Simplification
Combine geometric distance, normals, silhouettes, rendered-image metrics, camera coverage, animation, and human review into a repeatable acceptance test.
A 70% triangle reduction is a resource result, not a quality result. To decide whether a simplified model is acceptable, measure how its surface and rendered appearance differ from the approved source under the conditions where users will see it.
No single number is sufficient. Geometric distance misses material and normal-map failures. Pixel metrics depend on cameras and lighting. Maximum error can be dominated by one stray source fragment. Human review can be inconsistent. A strong evaluation combines independent measures and keeps their fixtures fixed.
Start with the acceptance question#
Write what the candidate must preserve:
- physical dimensions within a tolerance;
- outer contour across allowed views;
- named holes and thin features;
- surface distance for technical accuracy;
- broad and grazing-angle shading;
- texture and material alignment;
- deformation through required poses;
- stable LOD transitions;
- runtime and delivery budgets.
A decorative background rock may accept 5-millimeter local error when it occupies 80 pixels. A 1-meter product configurator may reject a 1-millimeter shift in a mating surface. A face model can be perceptually sensitive to smaller errors around the eyes than larger errors on the back of the head.
Set thresholds by asset class and camera role before viewing candidates. Otherwise the threshold tends to move toward whichever output is already available.
Ensure the models share a coordinate frame#
Distance comparison is meaningless if source and candidate use different transforms. Apply or compose node transforms into a common analysis frame. Verify:
- same units;
- same handedness and axes;
- same origin and pivot;
- same intended rigid transform;
- no negative-scale reflection;
- matching animation pose;
- matching morph weights.
Compare bounds first. If the source height is 1.000 meters and candidate height is 0.980 meters, a 2% scale error can dominate every point distance. That may be a pipeline bug rather than simplification.
Do not independently normalize each model to a unit box for the final measurement. That hides shrinkage, translation, and proportion change. Normalization is useful only when the error definition explicitly calls for it.
Directed point-to-surface distance#
Sample points on source surface A. For each point, find the closest point on candidate surface B. Record distances. This is directed A-to-B error.
It answers whether source features have nearby candidate surface. It does not detect extra candidate geometry far from the source because no sample begins there. Reverse the direction—sample B and query A—to detect that side.
For each direction, report:
- mean distance;
- root mean square distance;
- median;
- p90, p95, and p99;
- maximum;
- signed distance where inside/outside is well defined;
- spatial location of worst samples.
Mean can hide a localized failure. Maximum can be dominated by one artifact. Percentiles plus a worst-error visualization provide a fuller picture.
Use a triangle acceleration structure such as a bounding-volume hierarchy for nearest-surface queries. Nearest vertex is not enough: a point can be far from every candidate vertex while lying exactly on a large candidate triangle.
Sampling the surface correctly#
Uniformly sampling vertices biases toward regions with dense topology. A scan may have 100 times more vertices in noisy areas than on broad panels. Sample triangles proportional to area instead.
To sample uniformly within a triangle, choose random variables r1 and r2 in 0–1, use square root of r1 in the barycentric construction, and interpolate the vertices. Naively choosing two barycentric values and clipping them creates bias.
Choose sample count based on feature scale, not one universal number. For a 2-square-meter surface, 1 million samples average 500,000 samples per square meter, but random distribution can still miss a very thin wire. Add deterministic samples on:
- boundaries;
- sharp creases;
- named landmarks;
- thin components;
- high-curvature regions;
- material borders;
- known problem locations.
Run with increasing counts until p95 and maximum-near-landmark values stabilize. Save the random seed for reproducibility.
Hausdorff and Chamfer-style summaries#
The symmetric Hausdorff distance is the maximum of the two directed maximum closest-point distances. It captures the worst separation between surfaces. Exact computation is difficult for general triangle meshes; sampled estimates can miss narrow extrema.
Chamfer distance commonly aggregates average or squared nearest-neighbor distances in both directions. Definitions vary across libraries. State whether samples are points or surfaces, how they are weighted, whether distance is squared, and how directions combine.
Hausdorff-like maximum is valuable for a strict envelope. Chamfer-like average is useful for broad similarity. Neither says whether the error is visible from an approved camera.
The CGAL Polygon Mesh Processing package provides distance and related geometry-processing facilities. Follow the exact API definition and precision guarantees used in a report.
Signed distance and volume#
For a closed consistently oriented manifold, signed distance distinguishes inward shrinkage from outward expansion. This matters for fit, collision, and volume.
Compare:
- total signed volume;
- percentage volume change;
- inward and outward distance percentiles;
- cross sections through critical regions;
- wall thickness where relevant.
If a closed 1.0-cubic-meter source becomes 0.94 cubic meters, volume decreased 6% even if local average distance appears small. That can reveal systematic shrinkage.
Signed distance is unreliable on open, self-intersecting, or inconsistently wound meshes. Report topology prerequisites rather than emitting authoritative signs on invalid input.
Volume preservation is not always desirable. Removing scan noise can reduce volume slightly while improving the intended shape. Use it as one signal.
Normal deviation#
At corresponding sampled surface points, compare unit normals. Angular error is arccos of the clamped dot product.
Report geometric face or interpolated source normals separately from delivered vertex normals. Geometric normal error reveals shape orientation; custom-normal error reveals shading changes.
A candidate can have submillimeter positional error and a 20-degree normal deviation on a broad reflective panel. Under diffuse light it looks acceptable; under a sharp environment highlight it waves.
Store:
- mean and p95 angular deviation;
- percentage above 5, 10, and 20 degrees;
- maximum outside degenerate regions;
- heat maps on the candidate;
- results at boundaries and hard edges separately.
Do not interpolate across intended hard-normal discontinuities when establishing correspondence.
Curvature and feature-line error#
Curvature highlights where shape bends. Simplification often smooths weak ridges before producing large point distance. Estimate curvature consistently on source and candidate, then compare along corresponding regions.
For explicit CAD or artist feature lines, measure polyline distance, junction movement, length change, and connectivity. Named landmarks can carry individual tolerances:
- hinge center within 0.2 millimeters;
- rim radius within 0.5 millimeters;
- logo outline within 1 pixel at the detail camera;
- antenna tip within 2 millimeters;
- eye corner within 0.25 millimeters.
Semantic constraints turn vague visual importance into testable gates.
Automatic curvature estimates are sensitive to mesh sampling and noise. Smooth or fit at a documented scale. Comparing raw curvature on a noisy scan with a cleaned candidate can incorrectly penalize removal of noise.
Silhouette error#
Render binary masks from identical cameras. Compare boundary distance, intersection over union, differing pixel count, connected components, and holes.
Use both orthographic-like diagnostic views and production perspective. A 1-millimeter displacement at 0.5 meters can project to several pixels; at 5 meters it may be invisible.
For each camera, record:
- model screen height;
- maximum contour distance in pixels;
- p95 contour distance;
- mask intersection over union;
- source-only and candidate-only pixel counts;
- number of silhouette components and holes.
Keep camera framing fixed from the source. Auto-fitting the candidate hides changes in bounds.
Render a continuous camera path too. Static samples can miss a contour feature that appears only between directions. Temporal overlays expose popping and edge crawl.
Rendered image comparisons#
Render source and candidate with controlled passes:
- unlit mask;
- depth;
- world or view normals;
- neutral diffuse material;
- glossy material under moving light;
- UV checker;
- production material under neutral environment;
- production camera and lighting.
Each pass isolates a cause. A production beauty image alone mixes geometry, normals, textures, exposure, antialiasing, and tone mapping.
Pixel metrics include mean absolute error, root mean square error, peak signal-to-noise ratio, structural similarity, edge-map difference, and perceptual-model scores. Implementations and color spaces vary. Compare linear HDR buffers for lighting error and final display-referred images for user-visible difference when both matter.
Align images exactly. Disable random temporal jitter or fix seeds. Lock exposure, tone mapping, environment orientation, shadow samples, and antialiasing. A one-pixel camera shift can dominate the metric.
Mask metrics and small features#
Intersection over union equals overlap area divided by union area. If a large object mask contains 500,000 pixels and a 100-pixel antenna disappears, IoU remains near 0.9998. The metric says almost perfect while identity changes.
Add component-aware tests:
- require named thin features to remain;
- compare skeleton or centerline length;
- measure each connected mask component;
- weight regions of interest;
- report maximum local boundary error;
- render close crops around landmarks.
Never accept a global average without localized gates.
Texture and material correspondence#
Geometry can pass while UVs or material regions fail. Render an indexed UV grid and material-ID colors. Compare:
- UV displacement in delivered texels;
- flipped UV triangle count;
- overlap outside approved mirrored regions;
- texel-density change;
- material-region area and connectivity;
- tangent-basis error;
- color and roughness output under fixed light.
A UV shift of 0.001 is about 4.096 texels on a 4096 image. State error in texels and pixels rather than normalized coordinates only.
Normal-map validation needs final tangents. Render a flat normal map first; any shading variation indicates basis or normals before production texture detail enters.
Animated error#
Bind-pose comparison cannot validate a skinned candidate. Select poses that maximize bending, twist, stretch, and contact. Sample animation clips at meaningful events and a regular interval.
For each pose, compare:
- surface and silhouette metrics;
- joint-adjacent volume;
- landmark trajectories;
- penetration and gaps;
- normal and tangent behavior;
- attachment alignment.
If a 10-second clip runs at 30 frames per second, reviewing all 300 frames may be feasible automatically. Human review can focus on frames with highest metric, contacts, and pose extrema.
Weights can be simplified or quantized, so distinguish topology error from skinning-data error with controlled candidates.
LOD transition error#
An LOD candidate is evaluated at its largest intended projected size, not maximum source zoom. Render the frame before and after the switch plus any cross-fade.
Measure:
- contour displacement at threshold;
- optical flow or pixel change caused solely by switch;
- material and exposure change;
- pivot or bound shift;
- temporal ghosting during fade;
- frame-time spike and double-render cost.
A candidate can fail as LOD1 at 500 pixels and pass at 180 pixels. The error result should determine its threshold rather than discarding it entirely.
Normalize without losing real scale#
Relative geometric error helps compare differently sized assets. Divide absolute error by a documented scale such as bounding-box diagonal, bounding sphere radius, or longest axis.
If absolute p95 error is 2 millimeters and box diagonal is 2 meters, relative error is 0.1%. The same relative value on a 2-centimeter part is 0.02 millimeters.
Store both. Absolute units matter for fit and world scale; relative values help class-wide rules. Bounding diagonal can be distorted by one outlier vertex, so validate bounds and consider semantic reference dimensions.
Screen error already incorporates view and scale but is tied to a camera policy.
Heat maps and worst-case review#
Numbers without locations are hard to act on. Color the candidate by directed distance, normal error, UV error, or collapse cost. Mark the top 20 samples and list their semantic component.
Clip color scale at a meaningful threshold rather than auto-ranging every candidate. If green always means below 0.5 millimeters and red above 2 millimeters, images compare across builds.
Inspect false positives:
- source floaters not intended to survive;
- hidden interior surfaces;
- correspondence jumping between thin layers;
- invalid source normals;
- transparent elements omitted from an opaque mask;
- background or camera mismatch.
Fix the test or document an exclusion; do not quietly ignore the worst point.
Build a composite acceptance, not one mystery score#
A weighted score such as 0.4 geometry + 0.3 silhouette + 0.3 image can rank candidates, but it hides hard failures. Use gates first:
- no topological invalidity;
- no missing named components;
- maximum landmark tolerance;
- p95 surface limit;
- contour pixel limit;
- UV and normal requirements;
- runtime budget.
Then rank passing candidates by size, triangles, runtime, or a documented score. A tiny file with a missing handle should not win because its average error is low.
Keep metrics separate in the report so reviewers can understand tradeoffs.
Reproducible evaluation pipeline#
- Hash source and candidate artifacts.
- Validate units, transforms, topology, and attributes.
- Load stored camera, light, material, pose, and random-seed fixtures.
- Run bidirectional area-weighted surface sampling.
- calculate distance, normal, feature, and volume measures.
- render diagnostic and production passes.
- calculate contour, pixel, UV, and temporal measures.
- generate heat maps and worst-location crops.
- apply hard gates and rank passing candidates.
- archive report, images, tool versions, and decision.
Run the source against itself when building the system. Nonzero results reveal raster nondeterminism, correspondence bugs, or fixture drift.
Quality report checklist#
- Source and candidate share a verified world coordinate frame.
- Surface samples are area-weighted and use a fixed seed.
- Both source-to-candidate and candidate-to-source directions run.
- Mean, percentiles, maximum, and spatial locations are retained.
- Signed and volume metrics run only on valid closed surfaces.
- Normal and feature errors have separate outputs.
- Cameras are fixed and cover the permitted viewing envelope.
- Silhouette tests include local components and landmarks.
- Diagnostic render passes isolate geometry, shading, UV, and material.
- Animation and LOD transitions are evaluated temporally.
- Absolute, relative, and screen-space units are all labeled.
- Hard quality gates precede resource ranking.
Sources and further reading#
- CGAL: Polygon Mesh Processing
- CGAL: surface mesh simplification and envelope filters
- meshoptimizer simplification API and error reporting
- Khronos glTF Asset Auditor
- scikit-image documentation: image metrics
Visual error is a collection of failures viewed through different lenses. Measure surface distance, contours, shading, attributes, motion, and the final image; localize the worst differences; and let explicit gates decide which resource savings are safe to ship.