Программирование, 2023, № 3, стр. 56-64

ЭФФЕКТИВНАЯ ТЕХНОЛОГИЯ МОДЕЛИРОВАНИЯ В РЕАЛЬНОМ ВРЕМЕНИ ПОВЕРХНОСТИ ПОЛЯ ВЫСОТ НА КОНВЕЙЕРЕ ТРАССИРОВКИ ЛУЧЕЙ

П. Ю. Тимохин a*, М. В. Михайлюк a**

a ФГУ “ФНЦ Научно-исследовательский институт системных исследований РАН”
117218 Москва, Нахимовский просп., 36, к. 1, Россия

* E-mail: webpismo@yahoo.de
** E-mail: mix@niisi.ras.ru

Поступила в редакцию 09.01.2023
После доработки 16.01.2023
Принята к публикации 20.01.2023

Аннотация

В данной статье, на примере поверхности поля высот, предлагается эффективная технология моделирования в реальном времени сложных процедурных объектов на конвейере трассировки лучей (RT-конвейере). Предлагаемая технология не перегружает стадию I-шейдера (шейдера пересечения), а распределяет вычислительную нагрузку между I-шейдером и AH-шейдером (шейдером любого подтвержденного пересечения). Ключевыми нововведениями в технологии являются ранняя отбраковка на стадии I-шейдера ограничивающих параллелепипедов (AABB), отобранных аппаратным блоком RT-конвейера, и концепция “прозрачного AABB”, позволяющая перенести затратное вычисление пересечения луча с процедурным объектом на более позднюю стадию AH-шейдера. Также в работе описан ряд модификаций, сокращающих объем таких вычислений. Предложенная технология была реализована в программном комплексе на языках C++, GLSL и с помощью API Vulkan. Была исследована производительность разработанного решения при различных условиях трассировки лучей на задаче моделирования поверхности детализированного поля высот Пьюджет-Саунд. Полученные результаты подтвердили эффективность разработанной технологии и возможность ее применения в системах виртуального окружения, видеотренажерных комплексах, научной визуализации и др.

Список литературы

  1. NVIDIA Ada GPU Architecture // NVIDIA Corporation. 2022. https://images.nvidia.com/aem-dam/Solutions/ geforce/ada/nvidia-ada-gpu-architecture.pdf

  2. Sanzharov V.V., Frolov V.A., Galaktionov V.A. Survey of Nvidia RTX Technology // Programming and Computer Software. 2020. V. 46. № 4. P. 297–304. https://doi.org/10.1134/S0361768820030068

  3. Salmon J., McIntosh-Smith S. Exploiting Hardware-Accelerated Ray Tracing for Monte Carlo Particle Transport with OpenMC // 2019 IEEE/ACM Performance Modeling, Benchmarking and Simulation of High Performance Computer Systems (PMBS). 2019. P. 19–29. https://doi.org/10.1109/PMBS49563.2019.00008

  4. Komarov E.A., Zhdanov D.D., Zhdanov A.D. Caustic Illuminance Calculation with DirectX Raytracing // Programming and Computer Software. 2022. V. 48. № 3. P. 172–180. https://doi.org/10.1134/S0361768822030069

  5. Тимохин П.Ю., Михайлюк М.В. Рендеринг детализированных полей высот в реальном времени с использованием аппаратного ускорения трассировки лучей // GraphiСon 2022: труды 32-й Международной конференции по компьютерной графике и машинному зрению (Рязань, 19–22 сентября 2022 г.). 2022. С. 124–135. https://doi.org/10.20948/graphicon-2022-124-135.

  6. Han J. Introduction to Computer Graphics with OpenGL ES. 1st. ed. Boca Raton, CRC Press, 2018.

  7. Михайлюк М.В., Мальцев А.В., Тимохин П.Ю., Страшнов Е.В., Крючков Б.И., Усов В.М. Система виртуального окружения VirSim для имитационно-тренажерных комплексов подготовки космонавтов // Пилотируемые полеты в космос. 2020. № 4 (37). С. 72–95. https://doi.org/10.34131/MSF.20.4.72-95

  8. Hongxiang R., Yicheng J., Liling C. Real-time Rendering of Ocean in Marine Simulator // 2008 Asia Simulation Conference – 7th International Conference on System Simulation and Scientific Computing. 2008. P. 1133–1136. https://doi.org/10.1109/ASC-ICSC.2008.4675536.

  9. Pajarola R., Gobbetti E. Survey of semi-regular multiresolution models for interactive terrain rendering // The Visual Computer. 2007. V. 23. № 8. P. 583–605. https://doi.org/10.1007/s00371-007-0163-2

  10. Li S., Zheng C., Wang R., Huo Y., Zheng W., Lin H., Bao H. Multi-resolution terrain rendering using summed-area tables // Computers & Graphics. 2021. V. 95. P. 130–140. https://doi.org/10.1016/j.cag.2021.02.003

  11. Timokhin P.Yu., Mikhaylyuk M.V. Computer Modeling and Visualization of Accurate Terrain Shadows in Virtual Environment System // Scientific Visualization. 2022. V. 14. № 2. P. 77–87. https://doi.org/10.26583/sv.14.2.07

  12. Cornel D., Horváth Z., Waser J. An Attempt of Adaptive Heightfield Rendering with Complex Interpolants Using Ray Casting // Technical Report. arXiv:2201.10887v1. 2022. P. 1–9. https://doi.org/10.48550/arXiv.2201.10887.

  13. Frolov V.A., Voloboy A.G., Ershov S.V., Galaktionov V.A. Light Transport in Realistic Rendering: State-of-the-Art Simulation Methods // Programming and Computer Software. 2021. V. 47. № 4. P. 298–326. https://doi.org/10.1134/S0361768821040034

  14. Parker S., Shirley P., Livnat Y., Hansen C., Sloan P.-P. Interactive Ray Tracing for Isosurface Rendering // VIZ’98: proceedings of the IEEE Visualization 98. 1998. P. 233–238. https://doi.org/10.1109/VISUAL.1998.745713

  15. Brawley Z., Tatarchuk N. Parallax Occlusion Mapping: Self-Shadowing, Perspective-Correct Bump Mapping Using Reverse Height Map Tracing // ShaderX3: Advanced Rendering with DirectX and OpenGL. 1st. ed. Charles River Media. 2004. P. 135–154.

  16. Tatarchuk N. Dynamic Parallax Occlusion Mapping with Approximate Soft Shadows // ACM Symposium on Interactive 3D Graphics and Games (I3D '06). 2006. P. 63–69. https://doi.org/10.1145/1111411.1111423.

  17. Policarpo F., Oliveira M.M., Comba J.L.D. Real-Time Relief Mapping on Arbitrary Polygonal Surfaces // I3D ‘05: proceedings of the 2005 Symposium on Interactive 3D Graphics and Games. 2005. P. 155–162. https://doi.org/10.1145/1053427.1053453.

  18. Ammann L., Génevaux O., Dischler J.-M. Hybrid Rendering of Dynamic Heightfields using Ray-Casting and Mesh Rasterization // GI ’10: proceedings of Graphics Interface Conference 2010, Canadian Information Processing Society. 2010. P. 161–168. https://dl.acm.org/doi/10.5555/1839214.1839243.

  19. Policarpo F., Oliveira M.M. Relaxed Cone Stepping for Relief Mapping // GPU Gems 3. Addison-Wesley Professional. 2007. P. 409–428. https://developer.nvidia.com/gpugems/gpugems3/part-iii-rendering/chapter-18-relaxed-cone-stepping-relief-mapping.

  20. Baboud L., Eisemann E., Seidel H.-P. Precomputed Safety Shapes for Efficient and Accurate Height-Field Rendering // IEEE Transactions on Visualization and Computer Graphics. 2012. V. 18. № 11. P. 1811–1823. https://doi.org/10.1109/TVCG.2011.281

  21. Tevs A., Ihrke I., Seidel H.-P. Maximum Mipmaps for Fast, Accurate, and Scalable Dynamic Height Field Rendering // Proceedings of the 2008 Symposium on Interactive 3D Graphics and Games (I3D’08). New York. 2008. P. 183–190. https://doi.org/10.1145/1342250.1342279.

  22. Dick C., Krüger J.H., Westermann R. GPU Ray-Casting for Scalable Terrain Rendering // Eurographics ’09, 2009. P. 43–50. https://doi.org/10.2312/ega.20091007

  23. Lee E.-S., Lee J.-H., Shin B.-S. A bimodal empty space skipping of ray casting for terrain data // The Journal of Supercomputing. 2016. V. 72. № 7. P. 2579–2593. https://doi.org/10.1007/s11227-015-1522-9

  24. Aslandere T., Flatken M., Gerndt A. A Real-Time Physically Based Algorithm for Hard Shadows on Dynamic Height-Fields // Proceedings of 12. Workshop der GI-Fachgruppe on Virtuelle und Erweiterte Realität, Aachen Verlag, Bonn. 2015. P. 101–112. https://elib.dlr.de/101497/.

  25. Dübel S., Middendorf L., Haubelt C., Schumann H. A Flexible Architecture for Ray Tracing Terrain Heightfields // Proceedings of the International Summerschool on Visual Computing, Rostock, Germany, 2015. P. 3–22.

  26. Silvestre A., Pereira J., Costa V. A Real-Time Terrain Ray-Tracing Engine // 2018 International Conference on Graphics and Interaction (ICGI), 2018. P. 1–8. https://doi.org/10.1109/ITCGI.2018.8602735.

  27. Rusch M., Bickford N., Subtil N. Introduction to Vulkan Ray Tracing // Ray Tracing Gems II. NVIDIA. 2021. P. 213–255. https://doi.org/10.1007/978-1-4842-7185-8_16

  28. Thonat T., Beaune F., Sun X., Carr N., Boubekeur T. Tessellation-free displacement mapping for ray tracing // ACM Transactions on Graphics. 2021. Vol. 40. No. 6. Article 282. P. 1–16. https://doi.org/10.1145/3478513.3480535.

  29. Silva V., Novello T., Lopes H., Velho L. Real-Time Rendering of Complex Fractals // Ray Tracing Gems II. NVIDIA. 2021. P. 529–544. https://doi.org/10.1007/978-1-4842-7185-8_33

  30. Brüll F. Fast Transparency and Billboard Ray Tracing with RTX Hardware // Master thesis. Clausthal University of  Technology. 2020. 81 p. https://doi.org/10.13140/RG.2.2.14692.19842.

  31. NVIDIA Vulkan Ray Tracing Tutorials. Intersection Shader – Tutorial. 2020–2022. https://github.com/nvpro-samples/vk_raytracing_tutorial_KHR/tree/master/ray_tracing_intersection.

  32. Vulkan 1.3.238 – A Specification (with all registered Vulkan extensions) // The Khronos Vulkan Working Group. 2022. https://www.khronos.org/registry/vulkan/specs/1.3-extensions/pdf/vkspec.pdf.

  33. Majercik A., Crassin C., Shirley P., McGuire M. A Ray-Box Intersection Algorithm and Efficient Dynamic Voxel Rendering // Journal of Computer Graphics Techniques. 2018. V. 7. № 3. P. 66–82. ISSN 2331-7418. https://www.jcgt.org/published/0007/03/04/paper-lowres.pdf.

  34. NVIDIA Vulkan Ray Tracing Tutorials. https://github.com/nvpro-samples/vk_raytracing_tutorial_NV/tree/master/ray_tracing_intersection/ shaders/raytrace.rint.

  35. Reshetov A. Cool Patches: A Geometric Approach to Ray/Bilinear Patch Intersections // Ray Tracing Gems. 2019. P. 95–109.

  36. Amanatides J., Woo A. A Fast Voxel Traversal Algorithm for Ray Tracing // Eurographics ’87: Proceedings of the 8th European Computer Graphics Conference and Exhibition, Amsterdam, 1987. P. 3–10.

  37. Large Geometric Models Archive // Georgia Institute of Technology. https://www.cc.gatech.edu/projects/large_models/.

  38. Puget Sound test map // The University of Chicago. https://www.classes.cs.uchicago.edu/archive/2015/fall/23700-1/final-project/puget-sound/index.html.

Дополнительные материалы отсутствуют.