Abstract
In this paper, based on height field surface example, an efficient technology of real-time modeling of complex procedural objects on the ray tracing pipeline (RT-pipeline) is proposed. The proposed technology doesn’t overload the I-shader stage (intersection shader), but distributes the computational load between the I-shader and the AH-shader (any-hit shader). The key innovations of the technology are the early rejection at the I-shader stage of the bounding boxes (AABBs) extracted by the RT-pipeline hardware unit, and the “transparent AABB” concept which allows transferring costly computing of the “ray-procedural object” intersection to a later AH-shader stage. The paper also describes a number of modifications that reduce the amount of such calculations. The proposed technology was implemented in a software complex in C++, GLSL and using the Vulkan API. The performance of the developed solution was studied under various ray tracing conditions on the task of modeling the surface of a detailed Puget Sound height field. The obtained results confirmed efficiency of the developed technology and the possibility of its application in virtual environment systems, simulators, scientific visualization, etc.
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1134%2FS0361768823030064/MediaObjects/11086_2023_3734_Fig1_HTML.png)
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1134%2FS0361768823030064/MediaObjects/11086_2023_3734_Fig2_HTML.png)
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1134%2FS0361768823030064/MediaObjects/11086_2023_3734_Fig3_HTML.png)
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1134%2FS0361768823030064/MediaObjects/11086_2023_3734_Fig4_HTML.png)
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1134%2FS0361768823030064/MediaObjects/11086_2023_3734_Fig5_HTML.png)
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1134%2FS0361768823030064/MediaObjects/11086_2023_3734_Fig6_HTML.png)
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1134%2FS0361768823030064/MediaObjects/11086_2023_3734_Fig7_HTML.png)
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1134%2FS0361768823030064/MediaObjects/11086_2023_3734_Fig8_HTML.png)
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1134%2FS0361768823030064/MediaObjects/11086_2023_3734_Fig9_HTML.png)
Similar content being viewed by others
Notes
To implement this, we set the transparency flag gl_RayFlagsNoOpaqueEXT when calling the traceRayEXT function of generating the ray r at the RG-shader stage. This allows the AH-shader stage to be enabled (by default it is disabled in the RT-pipeline) and the BVH-tree traversal loop to be continued along the branch “No”, coming from the unit “Opaque object?”, after passing the I-shader stage (see Fig. 3).
We are grateful to Professor John H. Reppy from the University of Chicago (Department of Computer Science) for his assistance in providing access to a detailed version of the Puget Sound height grid [38].
REFERENCES
NVIDIA Ada GPU Architecture, NVIDIA Corporation, 2022. https://images.nvidia.com/aem-dam/Solutions/ geforce/ada/nvidia-ada-gpu-architecture.pdf.
Sanzharov, V.V., Frolov, V.A., and Galaktionov, V.A., Survey of Nvidia RTX technology, Program. Comput. Software, 2020, vol. 46, no. 4, pp. 297–304. https://doi.org/10.1134/S0361768820030068
Salmon, J. and McIntosh-Smith, S., Exploiting hardware-accelerated ray tracing for Monte Carlo particle transport with OpenMC, Proc. IEEE/ACM Conf. on Performance Modeling, Benchmarking and Simulation of High Performance Computer Systems (PMBS), Denver, 2019, pp. 19–29. https://doi.org/10.1109/PMBS49563.2019.000082019
Komarov, E.A., Zhdanov, D.D., and Zhdanov, A.D., Caustic illuminance calculation with directx raytracing, Program. Comput. Software, 2022, vol. 48, no. 3, pp. 172–180. https://doi.org/10.1134/S0361768822030069
Timokhin, P.Yu. and Mikhaylyuk, M.V., Real-time rendering of detailed height fields using hardware-based ray tracing acceleration, Proc. GraphiCon, Ryazan, 2022, pp. 124–135. https://doi.org/10.20948/graphicon-2022-124-135
Han, J., Introduction to Computer Graphics with OpenGL E, 1st ed., Boca Raton: CRC Press, 2018.
Mikhailyuk, M.V., Maltsev, A.V., Timokhin, P.Yu., Strashnov, E.V., Kryuchkov, B.I., and Usov, V.M., The VirSim virtual environment system for the simulation complexes of cosmonaut training, Pilotiruemye Polety v Kosmos, 2020, no. 4 (37), pp. 72–95. https://doi.org/10.34131/MSF.20.4.72-95
Hongxiang, R., Yicheng, J., and Liling, C., Real-time rendering of ocean in marine simulator, Proc. 7th Int. Conf. on System Simulation and Scientific Computing, Bei**g, 2008, pp. 1133–1136. https://doi.org/10.1109/ASC-ICSC.2008.4675536
Pajarola, R. and Gobbetti, E., Survey of semi-regular multiresolution models for interactive terrain rendering, Visual Comput., 2007, vol. 23, no. 8, pp. 583–605. https://doi.org/10.1007/s00371-007-0163-2
Li, S., Zheng, C., Wang, R., Huo, Y., Zheng, W., Lin, H., and Bao, H., Multi-resolution terrain rendering using summed-area tables, Comput. Graphics, 2021, vol. 95, pp. 130–140. https://doi.org/10.1016/j.cag.2021.02.003
Timokhin, P.Yu. and Mikhaylyuk, M.V., Computer modeling and visualization of accurate terrain shadows in virtual environment system, Sci. Visualization, 2022, vol. 14, no. 2, pp. 77–87. https://doi.org/10.26583/sv.14.2.07
Cornel, D., Horvath, Z., and Waser, J., An attempt of adaptive heightfield rendering with complex interpolants using ray casting, Tech. Rep., 2022, pp. 1–9. https://doi.org/10.48550/ar**v.2201.10887
Frolov, V.A., Voloboy, A.G., Ershov, S.V., and Galaktionov, V.A., Light transport in realistic rendering: state-of-the-art simulation methods, Program. Comput. Software, 2021, vol. 47, no. 4, pp. 298–326. https://doi.org/10.1134/S0361768821040034
Parker, S., Shirley, P., Livnat, Y., Hansen, C., and Sloan, P.-P., Interactive ray tracing for isosurface rendering, Proc. IEEE Conf. on Visualization, VIZ’98, London, 1998, pp. 233–238. https://doi.org/10.1109/VISUAL.1998.745713
Brawley, Z. and Tatarchuk, N., Parallax occlusion map**: self-shadowing, perspective-correct bump map** using reverse height map tracing, in ShaderX3: Advanced Rendering with DirectX and OpenGL, 1st ed., Charles River Media, 2004, pp. 135–154.
Tatarchuk, N., Dynamic parallax occlusion map** with approximate soft shadows, Proc. ACM Symp. on Interactive 3D Graphics and Games (I3D’06), Redwood City, CA, 2006, pp. 63–69. https://doi.org/10.1145/1111411.1111423
Policarpo, F., Oliveira, M.M., and Comba, J.L.D., Real-time relief map** on arbitrary polygonal surfaces, Proc. ACM Symp. on Interactive 3D Graphics and Games (I3D’05), Washington, 2005, pp. 155–162. https://doi.org/10.1145/1053427.1053453
Ammann, L., Genevaux, O., and Dischler, J.-M., Hybrid rendering of dynamic heightfields using ray-casting and mesh rasterization, Proc. Graphics Interface Conf., GI’10, Canadian Information Processing Society, 2010, pp. 161–168. https://doi.org/10.5555/1839214.1839243
Policarpo, F. and Oliveira, M.M., Relaxed cone step** for relief map**, GPU Gems 3, Addison-Wesley Professional, 2007, pp. 409–428. https://developer.nvidia.com/gpugems/gpugems3/part-iii-rendering/chapter-18-relaxed-cone-step**-relief-map**.
Baboud, L., Eisemann, E., and Seidel, H.-P., Precomputed safety shapes for efficient and accurate height-field rendering, IEEE Trans. Visualization Comput. Graphics, 2012, vol. 18, no. 11, pp. 1811–1823. https://doi.org/10.1109/TVCG.2011.281
Tevs, A., Ihrke, I., and Seidel, H.-P., Maximum mipmaps for fast, accurate, and scalable dynamic height field rendering, Proc. Symp. on Interactive 3D Graphics and Games (I3D’08), New York, 2008. https://doi.org/10.1145/1342250.1342279
Dick, C., Krüger, J.H., and Westermann, R., GPU ray-casting for scalable terrain rendering, Proc. Eurographics’09, Munich, 2009, pp. 43–50. https://doi.org/10.2312/ega.20091007
Lee, E.-S., Lee, J.-H., and Shin, B.-S., A bimodal empty space skip** of ray casting for terrain data, J. Supercomput., 2016, vol. 72, no. 7, pp. 2579–2593. https://doi.org/10.1007/s11227-015-1522-9
Aslandere, T., Flatken, M., and Gerndt, A., A real-time physically based algorithm for hard shadows on dynamic height-fields, in Proc. 12th Workshop der GI-Fachgruppe on Virtuelle und Erweiterte Realität, Bonn: Aachen Verlag, 2015, pp. 101–112. https://elib.dlr.de/101497/.
Dübel, S., Middendorf, L., Haubelt, C., and Schumann, H., A flexible architecture for ray tracing terrain heightfields, Proc. Int. Summerschool on Visual Computing, Rostock, 2015, pp. 3–22.
Silvestre, A., Pereira, J., and Costa, V., A real-time terrain ray-tracing engine, Proc. Int. Conf. on Graphics and Interaction (ICGI), Wrocław, 2018, pp. 1–8. https://doi.org/10.1109/ITCGI.2018.8602735.
Rusch, M., Bickford, N., and Subtil, N., Introduction to vulkan ray tracing, in Ray Tracing Gems II, NVIDIA, 2021, pp. 213–255. https://doi.org/10.1007/978-1-4842-7185-8_16
Thonat, T., Beaune, F., Sun, X., Carr, N., and Boubekeur, T., Tessellation-free displacement map** for ray tracing, ACM Trans. Graphics, 2021, vol. 40, no. 6, art. 282, pp. 1–16. https://doi.org/10.1145/3478513.3480535
Silva, V., Novello, T., Lopes, H., and Velho, L., Real-time rendering of complex fractals, n Ray Tracing Gems II, NVIDIA, 2021, pp. 529–544. https://doi.org/10.1007/978-1-4842-7185-8_33
Brüll, F., Fast transparency and billboard ray tracing with rtx hardware, Master Thesis, Clausthal Univ. of Technology, 2020. https://doi.org/10.13140/RG.2.2.14692.19842
NVIDIA Vulkan Ray Tracing Tutorials. Intersection Shader – Tutorial, 2020-2022. https://github.com/nvpro-samples/vk_raytracing_tutorial_KHR/tree/master/ray_tracing_intersection.
The Khronos Vulkan Working Group, Vulkan 1.3.238 – A Specification (with all Registered Vulkan Extensions), 2022. https://www.khronos.org/registry/vulkan/specs/1.3-extensions/pdf/vkspec.pdf.
Majercik, A., Crassin, C., Shirley, P., and McGuire, M., A ray-box intersection algorithm and efficient dynamic Voxel rendering, J. Comput. Graphics Tech., 2018, vol. 7, no. 3, pp. 66–82. https://www.jcgt.org/published/0007/03/04/paper-lowres.pdf.
NVIDIA Vulkan Ray Tracing Tutorials. https://github.com/nvpro-samples/vk_raytracing_tutorial_NV/tree/master/ray_tracing_intersection/shaders/raytrace.rint.
Reshetov, A., Cool patches: a geometric approach to ray/bilinear patch intersections, in Ray Tracing Gems, Apress Berkeley, CA, 2019, pp. 95–109.
Amanatides, J. and Woo, A., A fast voxel traversal algorithm for ray tracing, Proc. 8th European Computer Graphics Conf. and Exhibition Eurographics’87, Amsterdam, 1987, pp 3–10.
Large Geometric Models Archive, Georgia Institute of Technology. https://www.cc.gatech.edu/projects/large_models/.
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.
Funding
The publication is made within the state task of Federal State Institution “Scientific Research Institute for System Analysis of the Russian Academy of Sciences” on “Carrying out basic scientific researches (47 GP)” on topic no. FNEF-2022-0012 “Virtual environment systems: technologies, methods and algorithms of mathematical modeling and visualization. 0580-2022-0012”.
Author information
Authors and Affiliations
Corresponding authors
Ethics declarations
The authors declare that they have no conflicts of interest.
Rights and permissions
About this article
Cite this article
Timokhin, P.Y., Mikhaylyuk, M.V. An Efficient Technology of Real-Time Modeling of Height Field Surface on the Ray Tracing Pipeline. Program Comput Soft 49, 178–186 (2023). https://doi.org/10.1134/S0361768823030064
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1134/S0361768823030064