Skip to main content
Log in

Real-time Modeling of Dynamic Terrain Shadows based on Multilevel Ray Casting

  • Published:
Programming and Computer Software Aims and scope Submit manuscript

Abstract

This paper considers the task of real-time modeling of dynamic terrain shadows based on multilevel ray casting. A technology is proposed, where per-pixel detail controlling of synthesizing shadows as well as checking for intersections of sun rays not only with local maxima of terrain height, but also with local minima, are performed. The methods and algorithms implementing the proposed technology on the GPU are described. The proposed solution allows visualization rate for complex landforms, such as gorges and craters, as well as terrain visualization efficiency in viewports of size, less than source height map, to be increased. The developed technology, methods and algorithms were implemented in a software complex, which approbation confirmed the adequacy of the proposed solution to the task concerned. The results obtained can be applied in virtual environment systems, video simulators, scientific visualization, virtual globes, geo-applications, etc.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1.
Fig. 2.
Fig. 3.
Fig. 4.
Fig. 5.
Fig. 6.
Fig. 7.
Fig. 8.

Similar content being viewed by others

REFERENCES

  1. Altunin, A.A., Dolgov, P.P., Zhamaletdinov, N.R., Irodov, E.Yu., and Korennoy, V.S., Application of virtual reality technologies in training cosmonauts for extravehicular activities, Pilotiruemye Polety v Kosmos, 2021, no. 1 (38), pp. 72–88. https://doi.org/10.34131/MSF.21.1.72-88

  2. 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

  3. Piovano, L., Basso, V., Rocci, L., Pasquinelli, M., Bar, C., Marello, M., Vizzi, C., Lucenteforte, M., Brunello, M., Racca, F., Rabaioli, M., Menduni, E., and Cencetti, M., Virtual simulation of hostile environments for space industry: from space missions to territory monitoring, in Virtual Reality – Human Computer Interaction, IntechOpen, 2012, pp. 153–178. doi . https://www.intechopen.com/chapters/38748.https://doi.org/10.5772/51121

    Book  Google Scholar 

  4. Timokhin, P.Yu. and Mikhaylyuk, M.V., The method of height map bit depth compression based on visual significance criterion, Tr. Nauchno-Issled. Inst. Sist. Issled. Russ. Akad. Nauk, 2017, vol. 7, no. 1, pp. 30–35. https://www.niisi.ru/tr/2017_T7_N1.pdf.

    Google Scholar 

  5. Timokhin, P. and Mikhaylyuk, M., Reliable GPU-based methods and algorithms of implementation dynamic relief shadows in virtual environment systems, Proc. 31th Int. Conf. on Computer Graphics and Vision (GraphiCon 2021), Nizhny Novgorod, 2021, vol. 3027, pp. 83–94. https://doi.org/10.20948/graphicon-2021-3027-83-94

  6. Frolov, V.A., Voloboi, A.G., Ershov, S.V., and Galaktionov, V.A., The current state of the methods for calculating global illumination in tasks of realistic computer graphics, Tr. Inst. Sist. Program. Russ. Akad. Nauk, 2021, vol. 33, no. 2, pp. 7–48. doi . https://ispranproceedings.elpub.ru/jour/article/view/1384/1222.https://doi.org/10.15514/ISPRAS-2021-33(2)-1

    Article  Google Scholar 

  7. Brawley, Z. and Tatarchuk, N., Parallax occlusion mapping: self-shadowing, perspective-correct bump mapping using reverse height map tracing, in ShaderX3: Advanced Rendering with DirectX and OpenGL, 1st. ed., Charles River Media, 2004, pp. 135–154.

  8. 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. https://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.42.3443.

  9. Fan, Z., Sun, H., Xu, L., and Lee, K.L., Parallel-split shadow maps for large-scale virtual environments, Proc. 2006 ACM Int. Conf. on Virtual Reality Continuum and Its Applications (VRCIA’06), New York: Association for Computing Machinery, 2006, pp. 311–318. https://doi.org/10.1145/1128923.1128975

  10. Dimitrov, R., Cascaded Shadow Maps, Developer Documentation. NVIDIA Corp. 2007. http://developer.download.nvidia.com/SDK/10/opengl/samples.html#cascaded_shadow_maps.

  11. Bunnell, M. and Pellacini, F., Shadow map antialiasing, in GPU Gems: Programming Techniques, Tips and Tricks for Real-Time Graphics, 1st. ed., Addison-Wesley, 2004, pp. 185–192. https://developer.download.nvidia.com/books/HTML/gpugems/gpugems_ch11.html.

  12. Johnson, G.S., Mark, W.R., and Burns, C.A., The Irregular Z-Buffer and its Application to Shadow Mapping, Department of Computer Sciences and Texas Advanced Computing Center of the University of Texas at Austin, 2004. https://www.cs.utexas.edu/ftp/techreports/tr04-09.pdf.

  13. Lefohn, A.E., Sengupta, S., and Owens, J.D., Resolution-matched shadow maps, ACM Trans. Graph., 2007, vol. 26, no. 4, article 20. https://doi.org/10.1145/1289603.1289611

  14. Rosen, P., Rectilinear texture warping for fast adaptive shadow mapping, Proc. ACM SIGGRAPH Symp. on Interactive 3D Graphics and Games (I3D 2012), Costa Mesa, CA, 2012, pp. 151–158. https://doi.org/10.1145/2159616.2159641

  15. Everitt, C. and Kilgard, M.J., Optimized stencil shadow volumes, Proc. Game Developer Conf., San Jose, 2003. https://www.nvidia.com/docs/IO/8230/GDC2003_ShadowVolumes.pdf.

  16. Laine, S., Split-plane shadow volumes, Proc. of Graphics Hardware, Eurographics Association, 2005, pp. 23–32. doi . https://users.aalto.fi/~laines9/publications/laine2005gh_paper.pdf.https://doi.org/10.1145/1071866.1071870

    Book  Google Scholar 

  17. Stich, M., Wächter, C., and Keller, A., Efficient and robust shadow volumes using hierarchical occlusion culling and geometry shaders, in GPU Gems 3, Addison-Wesley Professional, 2007, pp. 239–256. https://developer.nvidia.com/gpugems/gpugems3/part-ii-light-and-shadows/chapter-11-efficient-and-robust-shadow-volumes-using.

    Google Scholar 

  18. Sintorn, E., Olsson, O., and Assarsson, U., An efficient alias-free shadow algorithm for opaque and transparent objects using per-triangle shadow volumes, ACM Trans. Graph., 2011, vol. 30, no. 6, article 153. doi . http://portal.acm.org/ft_gateway.cfm?id=2024187&type=pdf.https://doi.org/10.1145/2024156.2024187

  19. Fu, Z., Zhang, H., Wang, R., Li, Z., Yang, P., Sheng, B., and Mao, L., Dynamic shadow rendering with shadow volume optimization, Proc. 37th Computer Graphics Int. Conf. Advances in Computer Graphics, (CGI 2020), Geneva, 2020, vol. 12221, pp. 96–106. https://doi.org/10.1007/978-3-030-61864-3_9

  20. Sakalauskas, T., Hybrid terrain shadow ray casting, Proc. 16th Int. Conf. in Central Europe on Computer Graphics, Visualization and Computer Vision (WSCG’2008), Plzen, 2008, pp. 175–182. http://wscg.zcu.cz/wscg2008/Papers_2008/short/!_WSCG2008_Short_final.zip.

  21. Sanzharov, V.V., Gorbonosov, A.I., Frolov, V.A., and Voloboi, A.G., Examination of the Nvidia RTX, Proc. 29th Int. Conf. on Computer Graphics and Vision (GraphiCon’2019), Bryansk, 2019, vol. 2485, pp. 7–12. https://doi.org/10.30987/graphicon-2019-2-7-12

  22. Policarpo, F. and Oliveira, M.M., Relaxed cone stepping for relief mapping, in GPU Gems 3, Addison-Wesley Professional, 2007, pp. 409–428. https://developer.nvidia.com/gpugems/gpugems3/part-iii-rendering/chapter-18-relaxed-cone-stepping-relief-mapping.

    Google Scholar 

  23. Tevs, A., Ihrke, I., and Seidel, H.-P., Maximum mipmaps for fast, accurate, and scalable dynamic height field rendering, Proc. 2008 Symp. on Interactive 3D Graphics and Games (I3D’08), New York, 2008, pp. 183–190. https://doi.org/10.1145/1342250.1342279

  24. Aslandere, T., Flatken, M., and Gerndt, A., A real-time physically based algorithm for hard shadows on dynamic height-fields, Proc. 12th Workshop der GI-Fachgruppe on Virtuelle und ErweiterteRealität, Bonn: Aachen Verlag, 2015, pp. 101–112. https://elib.dlr.de/101497/.

    Google Scholar 

  25. Jung, D., Schrempp, F., and Son, S., Optimally Fast Soft Shadows on Curved Terrain with Dynamic Programming and Maximum Mipmaps, 2020. https://arxiv.org/pdf/2005.06671.pdf.

  26. Lengyel, E., Mathematics for 3D Game Programming and Computer Graphics, 3rd. ed., Boston: Course Technology, 2012.

    MATH  Google Scholar 

  27. Ewins, J.P., Waller, M.D., White, M., and Lister, P.F., MIP-map level selection for texture mapping, IEEE Trans. Visualization Comput. Graph., 1998, vol. 4, no. 4, pp. 317–329. https://doi.org/10.1109/2945.765326

    Article  Google Scholar 

  28. OpenGL Extension. Texture Filter Anisotropic, NVIDIA, 2018. http://www.opengl.org/registry/specs/EXT/ texture_filter_anisotropic.txt.

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

Download references

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

Authors

Corresponding authors

Correspondence to P. Y. Timokhin or M. V. Mikhaylyuk.

Ethics declarations

The authors declare that they have no conflicts of interest.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Timokhin, P.Y., Mikhaylyuk, M.V. Real-time Modeling of Dynamic Terrain Shadows based on Multilevel Ray Casting. Program Comput Soft 48, 190–198 (2022). https://doi.org/10.1134/S0361768822030100

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1134/S0361768822030100

Navigation