skip to main content
article

Perfect spatial hashing

Published:01 July 2006Publication History
Skip Abstract Section

Abstract

We explore using hashing to pack sparse data into a compact table while retaining efficient random access. Specifically, we design a perfect multidimensional hash function -- one that is precomputed on static data to have no hash collisions. Because our hash function makes a single reference to a small offset table, queries always involve exactly two memory accesses and are thus ideally suited for parallel SIMD evaluation on graphics hardware. Whereas prior hashing work strives for pseudorandom mappings, we instead design the hash function to preserve spatial coherence and thereby improve runtime locality of reference. We demonstrate numerous graphics applications including vector images, texture sprites, alpha channel compression, 3D-parameterized textures, 3D painting, simulation, and collision detection.

Skip Supplemental Material Section

Supplemental Material

Low Resolution
High Resolution

References

  1. Benson, D., and Davis, J. 2002. Octree textures. ACM SIGGRAPH, 785--790.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Blythe, D. 2006. The Direct 3D 10 system. ACM SIGGRAPH.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Brain, M., and Tharp, A. 1990. Perfect hashing using sparse matrix packing. Information Systems, 15(3), 281--290.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Cantlay, I. 2005. Mipmap-level measurement. GPU Gems II, 437--449.]]Google ScholarGoogle Scholar
  5. Czech, Z., Havas, G., and Majewski, B. 1997. Perfect hashing. Theoretical Computer Science 182, 1--143.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Debry, D., Gibbs, J., Petty, D., and Robins, N. 2002. Painting and rendering on unparameterized models. ACM SIGGRAPH, 763--768.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Fox, E., Heath, L., Chen, Q., and Daoud, A. 1992. Practical minimal perfect hash functions for large databases. CACM 33(1), 105--121.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Fredman, M., Komlós, J., and Szemerédi, E. 1984. Storing a sparse table with O(1) worst case access time. JACM31(3), 538--544.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Gaede, V., and Günther, O. 1998. Multidimensional access methods. ACM Computing Surveys 30(2), 170--231.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Govindaraju, N., Lin, M., and Manocha, D. 2004. Fast and reliable collision culling using graphics hardware. Proc. of VRST, 2--9.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Ho, Y. 1994. Application of minimal perfect hashing in main memory indexing. Masters Thesis, MIT.]]Google ScholarGoogle Scholar
  12. Kraus, M., and Ertl, T. 2002. Adaptive texture maps. Graphics Hardware, 7--15.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Lefebvre, S., and Neyret, F. 2003. Pattern based procedural textures. Symposium on Interactive 3D Graphics, 203--212.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Lefebvre, S., Hornus, S., and Neyret, F. 2005. Octree textures on the GPU. In GPU Gems II, 595--613.]]Google ScholarGoogle Scholar
  15. Lefohn, A., Kniss, J., Strzodka, R., Sengupta, S., and Owens, J. 2006. Glift: Generic, efficient, random-access GPU data structures. ACM TOG 25(1).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Loop, C., and Blinn, J. 2005. Resolution-independent curve rendering using programmable graphics hardware. SIGGRAPH, 1000--1009.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Mehlhorn, K. 1982. On the program size of perfect and universal hash functions. Symposium on Foundations of Computer Science, 170--175.]]Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Mirtich, B. 1996. Impulse-based dynamic simulation of rigid body systems. PhD Thesis, UC Berkeley.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Östlin, A., and Pagh, R. 2003. Uniform hashing in constant time and linear space. ACM STOC, 622--628.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Qin, Z., McCool, M., and Kaplan, C. 2006. Real-time texture-mapped textured glyphs. Symposium on Interactive 3D Graphics and Games.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Ramanarayanan, G., Bala, K., and Walter, B. 2004. Feature-based textures. Eurographics Symposium on Rendering, 65--73.]]Google ScholarGoogle Scholar
  22. Ray, N., Cavin, X., and Lévy, B. 2005. Vector texture maps on the GPU. Technical Report ALICE-TR-05-003.]]Google ScholarGoogle Scholar
  23. Sager, T. 1985. A polynomial time generator for minimal perfect hash functions. CACM 28(5), 523--532.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Schmidt, J., and Siegel, A. 1990. The spatial complexity of oblivious k-probe hash functions, SIAM Journal on Computing, 19(5), 775--786.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Sen, P., Cammarano, M., and Hanrahan, P. 2003. Shadow silhouette maps. ACM SIGGRAPH, 521--526.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Sen, P. 2004. Silhouette maps for improved texture magnification. Graphics Hardware Symposium, 65--73.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Tarini, M., and Cignoni, P. 2005. Pinchmaps: Textures with customizable discontinuities. Eurographics Conference, 557--568.]]Google ScholarGoogle Scholar
  28. Teschner, M., Heidelberger, B., Müller, M., Pomeranets, D., and Gross, M. 2003. Optimized spatial hashing for collision detection of deformable objects. Proc. VMV, 47--54.]]Google ScholarGoogle Scholar
  29. Tumblin, J., and Choudhury, P. 2004. Bixels: Picture samples with sharp embedded boundaries. Symposium on Rendering, 186--194.]]Google ScholarGoogle Scholar
  30. Winters, V. 1990. Minimal perfect hashing in polynomial time, BIT 30(2), 235--244.]] Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Perfect spatial hashing

            Recommendations

            Comments

            Login options

            Check if you have access through your login credentials or your institution to get full access on this article.

            Sign in

            Full Access

            • Published in

              cover image ACM Transactions on Graphics
              ACM Transactions on Graphics  Volume 25, Issue 3
              July 2006
              742 pages
              ISSN:0730-0301
              EISSN:1557-7368
              DOI:10.1145/1141911
              Issue’s Table of Contents

              Copyright © 2006 ACM

              Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

              Publisher

              Association for Computing Machinery

              New York, NY, United States

              Publication History

              • Published: 1 July 2006
              Published in tog Volume 25, Issue 3

              Permissions

              Request permissions about this article.

              Request Permissions

              Check for updates

              Qualifiers

              • article

            PDF Format

            View or Download as a PDF file.

            PDF

            eReader

            View online with eReader.

            eReader