Sara McMains UC Berkeley Computer-Aided Design and Manufacturing Laboratory: GPU-accelerated Hausdorff Distance Computation for Freeforms Sara McMains UC Berkeley
Outline Numerical Iteration Algorithm Bounding-Box Algorithm Introduction Numerical Iteration Algorithm Results 16 April 2019
Directed Hausdorff Distance Measure of similarity from one geometric object to another Asymmetric Can be extended to 3D surfaces and meshes [Alt et al., Barton et al., Elber & Grandine, Tang et al., Guthe et al.] Computes maximum deviation from one set to another Applications include shape matching, penetration depth, mesh optimization, etc. From A to B 16 April 2019
Outline Numerical Iteration Algorithm Bounding-Box Algorithm Introduction Numerical Iteration Algorithm Results 16 April 2019
BB Algorithm Overview Surface bounding-boxes Build bounding-box hierarchies Bottom-up Traverse hierarchy top-down & cull bounding-box pairs Compute min-max distance ranges Perform culling of bounding-box pairs at each level Compute HD for unculled sub-patches Finest level of hierarchy SA SB 16 April 2019
Min-Max Distance Ranges Between BB-Pairs Surface SB = Distance Range ∞ Max Min Surface SA Min/Max distance ranges 16 April 2019
Culling Tests Surface SB Min/Max distance matrix Surface SA Perform culling of bounding-box pairs based on the distance ranges Surface SB Surface SA In our CUDA implementation, we store it as a 2D array to increase the maximum number of BBox pairs Min/Max distance matrix 16 April 2019
Bounding Box Hierarchy B Bounding Box Hierarchy A Hierarchy Traversal Extend culling tests to each level of AABB hierarchy E F I J G H K L M N Q R O P S T A B A B C D Efficiently group together the non-culled bounding-box pairs for GPU execution C D Example starting at base level Bounding Box Hierarchy B Create next level address array 4 5 8 9 6 7 10 11 12 13 16 17 14 18 19 1 1 2 3 2 3 Bounding Box Hierarchy A 4F 4S 5E 5F 5T 9F 7R 12H 13G 17F 14F 18G 17J 17N 18J 18N 19P 0A 0B 0C 0D 1A 1B 1C 1D 2A 2B 2C 2D 3A 3B 3C 3D 0A 0B 0C 0D 1A 1B 1C 1D 2A 2B 2C 2D 3A 3B 3C 3D 0A 0D 1A 2A 2C 3A 3B 3C Cull Bounding-box Pairs Address Array 16 April 2019
GPU Indirection int arrayIndex = arrayIndexData[index]; float arrayVal; if (arrayIndex >= 0) { arrayVal = arrayData[arrayIndex]; } //// process arrayVal //// int arrayIndex = arrayIndexData[index]; bool arrayValInit = true; if (arrayIndex < 0) { arrayIndex = 0; arrayValInit = false; } float arrayVal = arrayData[arrayIndex]; if (arrayValInit) //// process arrayVal //// 16 April 2019
Outline Numerical Iteration Algorithm Bounding-Box Algorithm Introduction Numerical Iteration Algorithm Results 16 April 2019
Numerical Iteration Algorithm Split surface SB into Bezier patches (less branching) Sample points on surface SA Surface SB From each point on surface SA For each Bezier patch Find the closest point in the patch using numerical iteration Ping-pong Bezier patches to find closest point on surface SB Thrust reduction to find Hausdorff (max) distance Surface SA 16 April 2019
Projection and Numerical Iteration Find closest control point Evaluate (u,v) point corresponding to this control point Find parameterized tangent plane Find projection of the point to the tangent plane Use the parameterization of the projection point to find new (u,v) point Stop iteration when distance between two consecutive projection points is less than the stopping distance k du kdu 16 April 2019
Outline Numerical Iteration Algorithm Bounding-Box Algorithm Introduction Numerical Iteration Algorithm Results 16 April 2019
Bounding-Box Method Timing Position Position 16 April 2019
Timing Comparison 16 April 2019
Bounding-Box Method Failure Cases 16 April 2019
Future Work Bounding-box method Numerical Iteration method Time dependent on positions of the surfaces Slow or fails for certain cases such as offset surfaces Numerical Iteration method Often slower particularly for surfaces with many knots Constant computation time for different positions Future directions Hybrid method for Hausdorff distance computations if offset surfaces are detected Multi-level method for Hausdorff distances of objects consisting of multiple surfaces 16 April 2019
Conclusions Interactively compute Hausdorff distances Dynamic deformable surfaces Novel hierarchical culling tests Novel iterative solver 16 April 2019
Acknowledgements Adarsh Krishnamurthy Iddo Hanniel SolidWorks NSF
Questions? 16 April 2019
16 April 2019
Accuracy 16 April 2019
Theoretical Bounds Based on K, curvature based maximum deviation for each surface Curved Surface Linear Approximation h(A,ΔB) a1 a3 a2 b1 b3 b2 h(A,B) Bounds between the actual HD and the HD between the triangular linear approximation of the surface HD bounded by KA +KB h(ΔA, ΔB) h(A, ΔB) ΔB b1 b2 a1 a2 ΔA KA 16 April 2019
Outline Numerical Iteration Algorithm Bounding-Box Algorithm Introduction Numerical Iteration Algorithm Results 16 April 2019