The method of photon maps allows to efficiently calculate caustic illumination but requires the use of accelerating spatial partitioning structures to store photonic maps, provide quick access to them, and accelerate the collection of illumination. In this paper, we propose to use a combined accelerating structure based on an octree and hash tables. The structure itself represents an octree consisting of multiple levels of hash tables. This structure makes it possible to obtain a high space partitioning adaptability achieved by using tree structure, while providing quick access to the cells of the structure by utilizing the regular hash table structure. The use of hash tables allows access to the cells of the structure arbitrarily speeding up the search and traversal of cells and photons inside the structure. Unlike other regular structures, hash tables allow to exclude empty cells from storing in memory. Using a tree structure allows to further reduce the memory requirement and ensure the adaptability of space partitioning. The paper proposes an algorithm for generating a combined accelerating structure based on a dynamic analysis of the generating structure. As well as algorithms for finding cells and traversing them with a ray, which allow using this structure to accelerate the photon map method when calculating surface and volume light scattering. SIMD operations are used to speed up the hash tables collision resolution. Efficiency comparison of the photon map method using the proposed accelerated structure and similar tree like structures shows the acceleration of the proposed solution for multi-thread computation.
|