1 / 48

Adaptively Sampled Distance Fields (ADFs)

Learn about Adaptively Sampled Distance Fields (ADFs), a versatile data structure representing shapes beyond 3D geometry, offering efficient rendering with adaptive sampling and applications in computer graphics.

billiec
Download Presentation

Adaptively Sampled Distance Fields (ADFs)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Adaptively Sampled Distance Fields (ADFs) A General Representation of Shape for Computer Graphics S. Frisken, R. Perry, A. Rockwood, T. Jones Richard Keiser

  2. Contents • Introduction • What are ADFs • Motivation • Why is it a hard problem • Idea and Methods • Distance fields • Octree-based ADFs • Algorithms • Applications • Results • Personal statement

  3. Introduction ... or what it‘s all about

  4. What are ADFs ? • A unifying data structure • Represents shapes • More than just the 3D geometry of physical objects • Shape can have arbitrary dimension and be derived from simulated or measured data. • Represents sharp edges, organic surfaces, semi-transparent substances • Can store auxiliary data in cells • Fundamental graphical data structure

  5. Carving of Fine Detail

  6. Artistic Carving of Fine Detail

  7. Rendering Volume Data • Example : Cocaine molecule volume rendered in a haze of turbulent mist • Color function of mist is based on the distance from the molecule surface • Modulated by a noise function

  8. Shape Representations • Parametric surfaces • Polygons, spline patches, trimmed NURBs • Need associated data structures (B-reps) • Do not represent object interiors or exteriors • Subdivision surfaces • The same disadvantages as parametric surfaces • Implicit surfaces • Defined by an implicit function f(x) = c • Distinguish between interior and exterior • Difficult to define for an arbitrary object

  9. Motivation ... or why it‘s worth listening

  10. Why is it a Hard Problem ? This limitations and problems are addressed by ADFs • Resolution limited by the sampling rate • Large volume size (memory) • Efficiency • Interpolation of the normals of surface points from the sampled data • Expensive and with limited accuracy

  11. Advantages of ADFs • Representing a broad class of forms • Efficient rendering • Efficient and easy use of operations • Locating surface points, performing inside/outside and proximity tests, Boolean operations, blending, closest points, ... • Adaptive sampling -> accuracy • Efficient memory usage

  12. Idea and Methods ... or how it works

  13. Distance Fields • Scalar field that specifies the minimum distance to a shape • At each sample point, store the signed distance to the nearest surface point • Sign indicates inside vs. outside • This sampled distance field is a distance map • Effective representation of shape

  14. Examples • Unit sphere S in R3 • Euclidean signed distance from S :h(x) = 1 - (x2+y2+z2)1/2 • Algebraic signed distance from S :h(x) = 1 - (x2+y2+z2) z P1 h > 0 h < 0 P2 y x r=1

  15. Examples • Implicit form of an object • Euclidean dist. to a parametric surface • distance field computed for a 32 bicubic Bezier patch of the Utah Teapot • Determined by solving the 7th order Bezier equations using the Bezier clipping algorithm

  16. Distance Maps • Vary smoothly across surfaces • Are defined throughout space • Can be reconstructed as the zero-value iso-surface of the distance map • Can locally estimate the surface normal by the gradient of the distance map

  17. Gradient Vectors The distance field varies smoothly across the edge The gradient of the distance field accurately estimates the edge normal

  18. Regularly vs. Adaptiv • Regularly sampled distance fields • Large volume size because fine detail requires dense sampling • Adaptively sampled distance fields • Use adaptive, detail-directed sampling • High sampling rates in regions containing fine detail • Store the sampled data in a hierarchy for fast localization

  19. Octree-based ADFs • One possibility for a hierarchy in 3D • Demonstrate the concepts in 2D (with quadtrees) • Quadtree cell • Contains the sampled distance values of the cell‘s 4 corners • Pointers to parent and child cells

  20. Example of a Quadtree c11 c10 c0 c13 c12 c31 c30 SW NE c2 c32 c33 SE NW c0 c2 c33 c32 c31 c30 c13 c12 c11 c10

  21. 3-color Quadtree vs. ADFs • 3-color quadtree • 3 types of cells: interior, exterior, boundary • Subdivide all boundary cells to a predetermined highest resolution level • ADFs quadtree • Subdivision of boundary cells depends on the distance field • Subdivide only when the distance field within a cell is not well approximated by bilinear interpolation of its corner values

  22. 3-color Quadtree vs. ADFs 3-color quadtree ADFs quadtree 23‘573 cells 1‘713 cells

  23. 2D Spatial Data Structure • Wavelet

  24. Generating ADFs • Function to produce the distance function, h(x) • Continuity, differentiablility and bounded growth advantageous, but not necessary • Many ways to generate an ADFs • E.g. bottom-up approach • E.g. top-down approach

  25. Bottom-up Algorithm • Start with a regularly sampled distance field of finite resolution • Construct a fully populated octree (3D) • Repeat (start with the smallest cells) • Coalesce a group of 8 neighbour cells iff • None of the cells has any child cells • sampled distances of all 8 cells reconstructed from the sample values of their parent • Next level Until no cells are coalesced

  26. Example Buttom-up

  27. Example Buttom-up

  28. Example Buttom-up

  29. Top-down Algorithm • Compute the distance values for the root node • Subdivide ADFs cells recursively according to a subdivision rule • e.g. for representing the iso-surface stop if • the cell is guaranteed to not contain the surface • a specified maximum level is reached • the cell contains the surface but can be interpolated to a specified error tolerance

  30. Top-down Generation Initialize root cell Recursively subdivide

  31. Reconstructing ADFs • Distance values within a cell are reconstructed from the stored 8 corner distance values using trilinear interpolation • Surface normal is equal to the normalized gradient of the distance field

  32. Application: Ray Casting • Determine surface points • Intersection between a ray and the zero-value iso-surface of the ADFs • Linear approximation

  33. Application: Ray Casting • Determine the distance values where the ray enters and exits the cell • Compute the crossing if the two values have different signs

  34. Application: Level of Detail • Truncate the ADF-octree at fixed levels: • During rendering, generation, or to an existing high resolution • Can be used for progressive representation • Truncate cells with little errors • Error stored during top-down generation • Consistent degradation for both smooth and highly curved portions of the surface • Can be used for local refinement

  35. Application: Level of Detail Four LOD models with varying amounts of error rendered from an ADFs octree

  36. Application: Collisions • Collision avoidance in robotics • Using distance fields • Penetration forces in haptics • Accelerate collision detection • Using octrees • LOD

  37. Results ...or what we have reached

  38. Conclusions • Adaptively sampling of the distance field • Efficient use of memory • High frequency components are reconstructed accurately • Storing sampled values in a spatial hierarchy • Efficient reconstruction/localization

  39. Triangles vs. ADFs Error Tolerance Triangle Count ADF Cell Count ADF Sample Count 6.25E-5 3.13E-5 1.56E-5 32‘768 131‘072 2‘097‘152 16‘201 44‘681 131‘913 24‘809 67‘405 165‘847 Comparison of triangle count for a sphere (r=0.4) to ADF size

  40. Conclusions • Distance fields embody considerable information about a shape • Inside vs. outside, gradient and proximity information • Operations on a shape often achieved by operations on its distance field -> more efficient

  41. Conclusions • Separate generation of shapes • Preprocessing : complex and time-consuming methods • Runtime : fast graphical operations • Complex shapes can be processed as quickly as much simpler shapes • Fractals, mathematically sophisticated or carved shapes

  42. Conclusions • ADFs integrate numerous concepts in computer graphics • Representation of geometry and volume data • Broad range of processing operations such as rendering, carving, LOD management, surface offsetting, and proximity testing

  43. Conclusion • 2D editing with boolean difference

  44. Personal Statement ...or the paper under my loup

  45. Last Thoughts • ADFs combine known concepts • Advantages • Distance fields -> flexibility • Octrees -> fast location • Adaptation -> accuracy, memory efficiency

  46. Last Thoughts • Disadvantages • Finding a distance function can be difficult • Bottom-up algorithm requires excessive amount of memory • Top-down algorithm performs expensive octree neighbour searches • Main application area • Complex shapes, shapes with fine details

  47. Last Thoughts • Convincing pictures and comparisons • Idea of ADFs and implementation rather easy • Many advantages • Useful for many fundamental graphical operations • propose ADFs as a fundamental graphical data structure

  48. The End ...or are there any questions ?

More Related