Presentation is loading. Please wait.

Presentation is loading. Please wait.

A Spatial Data Structure for Fast Poisson-Disk Sample Generation SIGGRAPH 2006 Daniel Dunbar, Greg Humphreys. University of Virginia.

Similar presentations


Presentation on theme: "A Spatial Data Structure for Fast Poisson-Disk Sample Generation SIGGRAPH 2006 Daniel Dunbar, Greg Humphreys. University of Virginia."— Presentation transcript:

1 A Spatial Data Structure for Fast Poisson-Disk Sample Generation SIGGRAPH 2006 Daniel Dunbar, Greg Humphreys. University of Virginia

2 Abstract  Sampling distributions with blue noise characteristics Widely used in computer graphics  Poisson-disk distributions Excellent blue noise characteristics But computationally expensive  We present O(N logN) time dart-throwing method  And Novel and efficient variation of O(N) time and space method

3 Introduction and Background  Almost all problems in computer graphics involve sampling  Sampling distribution can greatly affect the quality of the final result  Blue-noise patterns perform especially well in this setting  High quality sampling patterns are especially important Sampling the image plane in a raytracer  For capture the continuous function  Errors will be apparent to a viewer

4 Poisson-disk distributions  It have excellent blue noise spectra  It mimic the distribution of photoreceptors In a primate eye [Yellot 1983]  But difficult to generate directly  Our O(N logN) algorithm Generating maximal Poisson-disk distributions Variation of this algorithm which runs in linear time and space Very quick : 200,000 points per second

5 Previous Work *  Sampling theory is a well researched area  Deeper roots in the signal processing and information theory literature

6 Previous Work **  [Dippé and Wold 1985] Stochastic sampling in first  [Cook 1986] Analyzed the spectral properties Extols the virtues of Poisson-disk distributions  Since then, many algorithms have been proposed [Ulichney 1988; Shirley 1991; Hiller et al. 2001; Kollig and Keller 2002; Kollig and Keller 2003]

7 Previous Work ***  [Mitchell 1991] O(N 2 ) “best-candidate” algorithm Mimic dart-throwing Termination guaranteed Not guarantee the Poisson-disk property  [McCool and Fiume 1992] Generated high-quality tile sets Introduced the use of Lloyd’s relaxation The tiling process gives easily recognizable one Several schemes have been proposed

8 Previous Work ****  [Cohen et al. 2003] Using Wang tiles to solve this problem Populated a set of Wang tiles with small point distributions  [Lagae and Dutré 2005] For boundary tiles Poisson-disk tiles is presented  [Kopf et al. 2006] Satisfying an arbitrary density function

9 Previous Work *****  [Ostromoukhov et al. 2004] Generates point sets with local blue noise characteristics Clever modification of Penrose tiles Exploiting the tilings’ aperiodic nature When generate many points, the resulting point sets have larger angular anisotropy

10 Previous Work ******  [Jones 2006] O(N logN) time algorithm for generating 2D Poisson- disk Like our technique  Builds a point set incrementally  Store neighboring regions in a balanced tree  Insert points into these regions one by one But implementation more complicated than our algorithm Furthermore, we show a linear time variation of our algorithm

11 Dart-Throwing in O(N logN)  Dart-throwing method Computing Poisson-disk distributions Generating a series of random candidate points Keeping only the first point  Minimum distance 2r Invalidates a disk of radius 2r centered around that point

12 Algorithm strong point  Simple to implement  Extends naturally to any domain

13 Algorithm side effect  The algorithm may not terminate The algorithm is stopped after fixed number failed  Point set is usually not maximal Some regions of the domain may be undersampled  This problem is usually ignored  The algorithm is too slow to use directly A large number of sample points is required Precomputing or tiling them have been proposed

14 Available subdomain  D(x, r) Disk of radius r around a point x  x is point number index  Available subdomain Domain X and existing point set P

15 Efficient dart-throwing key point “Available neighborhood”  Do not need to sample the entire available subdomain Just the annulus between radii 2r and 4r  In any maximal distribution Every point in this annulus must be unavailable At least one point that lies inside the annulus Such annuli must contain at least one point  This region is called available neighborhood  By carefully choosing the representation for this region, implemented in O(N logN) time

16 Representing the Available Neighborhood  The problem can be divided into two parts: Developing a spatial structure for the available region of the annulus Partitioning the available neighborhood  For efficient update of new point insertion  Possible to quick generation random point inside the region

17 Scalloped region  New data structure for these problem  Efficient representing of boolean operation 2D disk  Scalloped sectors Disjoint subset of scalloped region Between angles α 1 and α 2 Bounded by near and far circular arcs  Circular arcs are nonintersecting

18 Scalloped sector (Figure 2)

19 Circular arc representation  Center C, radius r, sign k ∈ {−1, 1}  Distance to circular arc Angle α (d,γ) are the polar coordinates of C

20 Scalloped sector area  g(α): inner bounding arc h(α): outer bounding arc Up to an angle α  Full sector is A(α 2 )

21 Choosing sector and point  Probability of a random point In a scalloped region falling within a particular sector  Sector area / region area  Generation random point within the region Using the sectors’ areas as a probability distribution, randomly choose  Transform uniformly distributed random point to polar coordinate : (ξ 1,ξ 2 ) in [0,1] 2  (d,θ)

22 A −1 evaluation  Do not have a closed equation of A −1  Function A’s property Integral of a function  Non-negative  Zero only at the angular endpoints Monotonically increasing   Therefore invertible  Binary search is sufficient to evaluate A −1 efficiently

23 Boolean union or difference operation  Subdivide into a small number of new scalloped sectors  A scalloped region maintains a list of its constituent scalloped sectors Replace with individual sectors’ result

24 Boolean operation for difference  Maximum number of new angles are eight 4: intersection with bounding arc 2: tangent line 2: angular endpoints

25 Disjoint set  Efficient sampling requires that all of neighborhoods be disjoint  Ordering relation defined set S can derive new set S ’ S ’ is disjoint set in which intersection are subtracted

26 Disjoint set generation  Available neighborhood of a point p ∈ P  Total available neighborhood

27 (Figure 3) A partial point set and its neighborhood

28 Algorithm Details and Complexity Analysis  Our algorithm A 1 Efficient dart-throwing Begins with randomly chosen single point  Associative map Use during sample generation Candidate points to their associated neighborhoods

29 Processing  A candidate point is randomly chosen Using neighborhood areas as a probability distribution  A random point is added to the point set  The available neighborhood of new point Annulus from radii 2r to 4r with disjoint Search for neighbors are required only in radius 8r  This process continues until no candidate points remain

30 Performance  Finite number of scalloped sectors  Neighbors within a fixed radius  Using uniform grid for neighbor search and update available neighborhoods: O(1) time  Picking an individual scalloped sector and generating a point : O(1) time  Choosing an available neighborhood in balanced tree : O(logN) time  Total complexity : O(N logN) N is number of generated points  The space complexity is O(N)

31 Algorithm A 2  Drop the requirement that area-weighted probability function  New algorithm A 2 runs in linear time  But in practice other factors are dominate the running time Cost of maintaining the sectors Intersecting them with disks Updating data structures

32 Boundary Sampling  Poisson-disk point sets generation in linear time Avoid the complexity of sector operations Available neighborhoods’ radius modification does not change the structure or performance We can take radius r ’ with 2r <r’≤4r

33 Available boundary  Take r ’ with 2r  Available neighborhood collapses to circular arcs  We no longer need to represent scalloped regions  Available boundary is represented as a set of per-point angular ranges

34 Speed up of algorithm  Select the new candidate point with random instead of length of boundary  No longer necessary to explicitly store the neighborhoods  After choose a candidate, compute the intersecting ranges and terminate it  If there is no empty boundary choose next candidate  Only single angular range subtraction needs

35 Algorithm A 3, “boundary sampling”  Simple to implement  Runs in O(N) time  Our implementation Approximately 200 lines of C++ code can generate over 200,000 points per second on a 3 GHz Pentium 4 Figure 1 shows an example

36 Results  We will say about results from the boundary sampling algorithm  Compare them to other methods for computing Poisson-disk distributions

37 VS best tiling schemes  Best tiling schemes Generate point sets very efficiently Although energy and anisotropy spikes associated with any tiling  Our algorithm Comparable to that ones in runtime performance Results is artifact-free Require noprecomputation

38 Analyzing two-dimensional noise distributions  Style of McCool and Fiume  Compute the radial power and anisotropy using the periodogram of a point set  The quality of a distribution depends on distance to low energy annulus  Radial power spectrum is an accurate representation of the pattern along all orientations

39 Blue noise properties preserving  Neither linearized sampling nor boundary sampling significantly change the blue noise properties of the resulting distributions

40 Periodograms  Average of 100 point sets  Radius of 0.02  About 2000 points each  (d) : higher point density Greater magnitude difference Between the low energy annulus Between the peak transition energy

41 VS Ostromoukhov et al.  Our method is significantly more uniform than theirs  Their solution : precomputing Improve only small local regions When the number of points grows it is useless Lookup tables would become quite large

42 Timing results  A 2 is more efficient than A 1 for large numbers of points  Sector subtraction overhead is very big when watch A 3  For small numbers of points, A 2 is bad A 1, making it less efficient than its O(N logN)

43 Conclusion and Future Work  Efficient dart-throwing algorithm  Based on the manipulation of disjoint unions of scalloped sectors  O(N logN) time  Motivates O(N) time & space algorithm  Next is three big future research

44 Sampling on Arbitrary Manifolds  Extended to sample over any manifold with an associated distance metric  Efficient method needs Finding the local neighbors Determining the intersection  Surface of a sphere Distance function is of arcs length Boundary of point is plane intersection circle Sampling can still be done in linear time by dividing the domain into a grid

45 Generating Infinite Point Sets  The number of required points prediction is difficult  Generating points near an arbitrary position is good  This permit Poisson-disk texture basis functions Lagae and Dutr´e’s method [2005]  Existing methods use precomputed tiles to solve this problem

46 Solution with scalloped sectors  By judicious seeding of a pseudorandom number generator  Generation points in arbitrary subsets is possible  Generated point beside neighboring point sets does not violate property  This can make infinite point sets

47 Importance Sampling  Giving an importance function It is possible to derive a non-Euclidean distance metric Our approach would produce locally proportional point set These point sets should have local blue noise properties  Like Ostromoukhov et al. [2004] or Kopf et al [2006]

48 This metric application  Does not have a closed analytic form Therefore the boundary cannot be directly determined  Nonetheless, possible to solve for a piecewise linear approximation Distance metric in the vicinity  Use this represent the local boundary  We hope extend ours to support efficient importance sampling By applying this technique and 5.1 method

49 Intended plan  By applying these results, vary radii of objects  Expect generating complex terrain and environments


Download ppt "A Spatial Data Structure for Fast Poisson-Disk Sample Generation SIGGRAPH 2006 Daniel Dunbar, Greg Humphreys. University of Virginia."

Similar presentations


Ads by Google