390 likes | 655 Views
gHull : A Three-dimensional Convex Hull Algorithm for Graphics Hardware. Mingcen GAO National University of Singapore. Outline. About convex hull Central Idea The algorithm Challenges Implementation Experiment result Conclusion. Outline. About convex hull. About convex hull.
E N D
gHull: A Three-dimensional Convex Hull Algorithm for Graphics Hardware Mingcen GAO National University of Singapore
Outline • About convex hull • Central Idea • The algorithm • Challenges • Implementation • Experiment result • Conclusion Outline
About convex hull About convex hull
Convex hull algorithms • Incremental algorithm • Gift wrap algorithm • Divide and conquer algorithm • QuickHull Why is QuickHull the best? Every round the algorithm finds the most “outside” vertex to quickly construct the hull, removing those “inside” vertices. About convex hull
Outline • About convex hull • Central Idea • The algorithm • Challenges • Implementation • Experiment result • Conclusion Outline
Central Idea 1. Directly ignore those “inside” vertices Central Idea
Central Idea 2. Quickly construct initial stars which are similar as the final results Central Idea
Central Idea 3. Repair the stars into the convex hull in parallel Central Idea
Central Idea Further thinking… The Voronoi regions of points on the convex hull reach infinity Central Idea
Outline • About convex hull • Central Idea • The algorithm • Challenges • Implementation • Experiment result • Conclusion Outline
The Algorithm • Voronoi Construction • Star Identification • Hull Approximation • Point Addition • Hull Completion • Use a cube to wrap the point set • Project all points onto 6 sides with their weights • Compute the Voronoi diagram in sides. (e.g. PBA) The Algorithm
The Algorithm • Voronoi Construction • Star Identification • Hull Approximation • Point Addition • Hull Completion • Scan the texture on sides • Using the information on sides, construct initial stars The Algorithm
The Algorithm • Voronoi Construction • Star Identification • Hull Approximation • Point Addition • Hull Completion • Scan the texture on sides • Using the information on sides, construct initial stars The Algorithm
The Algorithm • Voronoi Construction • Star Identification • Hull Approximation • Point Addition • Hull Completion After Star Identification, we get a set of stars, whose Shape is approximate to the convex hull. Those very“inside” points are ignored. The Algorithm
The Algorithm • Voronoi Construction • Star Identification • Hull Approximation • Point Addition • Hull Completion • Use parallel star splaying algorithm • Get the first version of convex hull, allowing some • extreme points lost. (see the reasons in Challenges) The Algorithm
The Algorithm • Voronoi Construction • Star Identification • Hull Approximation • Point Addition • Hull Completion • Check all points which are not on the convex hull • From each direction, render the colorful convex hull • Use depth value to test whether a point is outside The Algorithm
The Algorithm • Voronoi Construction • Star Identification • Hull Approximation • Point Addition • Hull Completion • For the missed point, construct its star • Use parallel star splaying algorithm again The Algorithm
Outline • About convex hull • Central Idea • The algorithm • Challenges • Implementation • Experiment result • Conclusion Outline
Challenges This problem is the result of using a finite cube to find the Voronoi cells that are unbounded. Some non-extreme vertices are captured because their Voronoi cells can extend beyond the cube. The problem is more severe for cube and thin box cases. To reduce this problem, we can use a bigger cube, while scaling the point set to a small volume in the center. Challenges
Challenges This problem occurs when multiple points are shifted to the same grid point. Since one grid point can only hold one point, we potentially miss many extreme vertices, especially for thin sphere and thin box cases. By efficiently locating a nearby face for each point outside during Phase 4, we construct a very good star for that point, thus reducing the influence of this problem. Challenges
Challenges Over-approximating problem This problem occurs when the points are shifted into digital space. In certain cases, when points are distributed near the surface of a cube axis-aligned with the cube, many points that are not extreme vertices are shifted outside and are legitimately captured in Phase 1, particularly for cube and thin box cases. This is a disadvantage of gHull, and is only slightly resolved by increasing the size of the cube. Challenges
Outline • About convex hull • Central Idea • The algorithm • Challenges • Implementation • Experiment result • Conclusion Outline
Implementation Parallel Star Splaying Implementation
Implementation Data Structure Implementation
Implementation Checking round Each thread creates at most 4 virtual insertion Implementation
Implementation Insertion round new stars new edges Implementation
Implementation Splaying procedure in GPU Checking round Insertion round Checking round Insertion round Implementation
Outline • About convex hull • Central Idea • The algorithm • Challenges • Implementation • Experiment result • Conclusion Outline
Experiment Result Voronoi Construction Experiment Result
Experiment Result Star Identification Experiment Result
Experiment Result Final Results Experiment Result
Experiment Result Comparison between gHull and QuickHull • gHull: • Compiled using CUDA 3.1 toolkit • Run on a single NVIDIA GTX 460 Fermi graphics card with 2GB of video memory • QuickHull: • Compilde using Microsoft Visual Studio 2008 with all optimizations enabled • Run on a PC with an Intel i7 930 2.8Ghz, 6GB DDR3 memory Experiment Result
Experiment Result Running time of gHull (left) and its speed up over QuickHull (right) on different test cases Experiment Result
Experiment Result Running time of gHull (left) and its speed up over QuickHull (right) while fixing the number of extreme vertices, h, and varying the total number of points, n. Experiment Result
Experiment Result Running time of gHull (left) and its speed up over QuickHull (right) while fixing the total number of points, n, and varying the number of extreme vertices, h. Experiment Result
Outline • About convex hull • Central Idea • The algorithm • Implementation • Challenges • Experiment result • Conclusion Outline
Conclusion • A purely parallel 3D convex hull algorithm designed for GPU. • Only using orientation check, gHull guarantees the robustness of the result. • gHull running on an NVIDIA GTX 460 Fermi GPU outperforms Quick-Hull running on an Intel i7 2.8Ghz by a factor of 3x to 10x, with millions of input points. Conclusion
Star Splaying algorithm Star Splaying algorithm
Star Splaying algorithm Checking <v,w> is to splay the star of v with information from w Star Splaying algorithm