=Paper= {{Paper |id=Vol-2093/paper8 |storemode=property |title=Combined methods for virtual surface treatment of relief |pdfUrl=https://ceur-ws.org/Vol-2093/paper8.pdf |volume=Vol-2093 |authors=Vladimir Shardakov,Parfenov Denis }} ==Combined methods for virtual surface treatment of relief== https://ceur-ws.org/Vol-2093/paper8.pdf
67


Combined methods for virtual surface treatment of relief
           Shardakov V.1[0000-0001-6151-6236] and Parfenov D.1[0000-0002-1146-1270]
                    1
                        Orenburg State University, Ave. Pobedy 13, Russia

       Abstract. This article describes the automation of the process of creating a hy-
       brid model of some portion of the surface of the earth's crust (generation of vir-
       tual landscape topography). Apply the optimal combination of the currently ex-
       isting approaches for adaptive generation of landscape through landscape treat-
       ment of the surface generation based on the combined Voronoi diagram of the
       algorithm of diamond-square. The functional algorithm of landscape genera-
       tion, its advantages and key characteristics are given. The advantages of the
       combined method, its optimization and possibilities are described. The conclu-
       sion shows the results of running the program code was called "the Program for
       processing the combined methods of the virtual surface topography", in which
       you can come to the conclusion that the CPU of the computer has decreased by
       twenty percent, and loading the computer's memory twice. The methods on the
       basis of which the virtual surface treatment is realized are painted and consid-
       ered.

       Keywords: 3D modeling, multimedia, dynamic handling threads, OpenGL,
       landscape generation, detail.

Introduction

Modern programmable graphics systems are able to visualize large spaces in real time
with a high degree of detail and simulate the observed physical processes in the real
world. These achievements are widely used in creating landscapes that require visual-
ization of large spaces of different environments – sky, water, earth, vegetation.
          At the same time, specialists in the field of landscape construction distin-
guish as the main trends of its development - the creation of complex systems cover-
ing all natural complexes necessary for the generation of the landscape.
          Another trend in the development of the landscape is a constant update in-
formation in databases and models of environment generation with the appearance of
information about new situations.
          Also, the expansion of the fields of application of landscapes and their func-
tionality put forward before the developers of training complexes requirements of
standardization and modularity of individual systems of training complexes. The use
of universal modules of landscape construction, methods of information processing
and the use of databases will greatly simplify the development of new landscape
maps.
          Thus, faced with the task of developing models to automate the collection of
and processing of information for natural and climatic complexes, which could be
widely used in the creation of the landscape for a variety of areas of activity.
          Particularly high demands are placed on the realism of the image of the envi-
ronment in the visualization systems for the oil and gas sector of the economy, name-
ly, should be provided:
68

          - sufficiently detailed virtual model of objects and surrounding
          environment (sky, water and land surface);
          - high quality of realism of the generated images;
          - real-time operation that requires an update of the scene visualization at a
rate of at least 30 frames per second;
          - minimization of image change delay in response to
          operator's influence on controls;
          - simulation of weather conditions (rain, snow, fog);
          - high realism;
          - display the scene of large spaces and at the same time high detail of the ap-
proximate objects of the scene.
          Thus, the problem of environment generation is one of the most time-
consuming and requiring significant computational resources in the generation of a
three-dimensional surface relief.

         Related work

         German scientists under the leadership of Miao Yu created an application
that allows you to identify and model the affected areas of the earth's crust caused by
sudden large-scale geological disasters such as earthquakes, floods, volcanoes. The
main purpose of this study is to offer an inexpensive and effective method based on
the virtual construction of a three - dimensional landscape.
         The main idea of the method is to use and transform the data obtained by in-
tegrating satellite images, aerial photography and geographic information system into
three-dimensional models. [1]
         The disadvantage of this development is that this application is adapted only
for mountainous areas, as well as the results are schematic, which complicates the
work with the application.
         The paper [2] describes a method based on the Dijkstra algorithm and the
mixing of layers, which are generated in accordance with individual characteristics.
The method works much faster than many known methods, and, in some cases, is able
to produce results with better quality, but has several disadvantages. They include a
monotone form of slopes belonging to the same profile, and is based on the procedure
of mixing textures, which significantly increases the time of generation of the land-
scape.
         A team of scientists from Japan in article [3] presented an Appendix on au-
tomatic creation of a three-dimensional relief model from key contour polygons by
direct calculations.
         Based on the height-adjusted key contours, the contours are automatically
generated, and thus the 3D elevation models are generated automatically. The pro-
posed system performs physical modeling using a more realistic environment, such as
the automatic creation of a three-dimensional model of the city and placing it on a
three-dimensional terrain.
         This application performs generation of plain terrain for urban development,
which is not quite suitable for our requirements.
69

         After analyzing the work on the subject, the generation of a three-
dimensional landscape, it was chosen two optimal methods, which it was decided to
synthesize together.
         Below we describe what each of the selected methods is responsible for.

         Diagram Voronoi

          The construction of the diagram begins with the location of the key points on
the landscape map. Next, the chart is built on the existing points, and several itera-
tions are performed on it to get rid of too small polygons.
          The structure of the landscape on the Voronoi diagram is reduced to creating
a grid consisting of points shown in fig. 1. Its main property is irregularity, which
allows the landscape based on the diagram not to look angular.




         Fig. 1 – building a landscape based on the chart Voronoi

         After that, the polygons are selected, which are planned to be filled with wa-
ter. The height of the points belonging to the remaining polygons is assigned as a
value equal to the shortest distance to the water. [4-5]

         Algorithm diamond-square

          Next, the diamond-square algorithm is connected in which the heights are set
at the ends of the segment and these heights are divided by a point located in the mid-
dle of a certain Voronoi diagram, which divides the segment into two segments. This
point is shifted by a random variable and then the split and shift for each of the result-
ing sub-segments are repeated. Division will occur as long as the segments will not be
equal to one pixel (see figure 2). It is important to remember that random displace-
70

ments should be proportional to the lengths of the segments on which the partitions
are made. For example, if you split a segment length l-the point in the middle of it
will have a height equal to:

                      h = (hL + hR) / 2 + random(- R * l, R * l);                   (1)

           where hL and hR — heights at the left and right ends of the segment;
           R defines the "roughness" of the resulting polyline and is the main parame-
ter in this algorithm);
           The next step is to divide the whole map into four equal squares. In each of
the available squares, the value in one of the corners is known.
           The point in the middle is obtained by averaging the heights of all 4 angular
points, and each Central point on the side of a large square — by averaging a pair of
points lying at the ends of the corresponding side. For the best effect, you can set the
noise factor — that is, randomly move the center point up or down. This operation
can be repeated until then, until you get the best kind for the received sub-squares
(fig. 2). [6-7]




        Fig. 2-Algorithm of splitting a segment by a point in the middle into two
sub-segments

         Combine approaches for adaptive generation of landscape.

         One of the main points when combining a chart Voronoi and the diamond-
square algorithm is to remember (and write to the cache the necessary data) all the
elevation values that have been calculated. This allows you to shorten the computa-
tional processor a few times.
71

          The next step is to determine whether the triangle point is the center of one
of the large, squares, and what is the size of this shape. Calculate the least significant
bit, which is not zero for any of the coordinates-this is the desired size of the shape. In
order to determine whether the shape was a triangle — check that both coordinates
were exposed to this bit. Both coordinates are zero-indexed.
          After analyzing the work of the program, we obtain that the landscape length
of 100x100 km, there was a decrease in the load on the processor of the system unit
by about 20%, and the use of computer memory of about 50%. The results were
measured by the standard Windows "Task Manager" tool.




Fig. 4 – the Load on the CPU % when running landscape generation without the use
of the combined method of virtual processing of the terrain surface (red diagram) and
after application of the combined method of virtual processing of the terrain surface
(blue graph)




         Fig. 5-Load on the computer memory in gigabytes during landscape genera-
tion without the use of the combined method of virtual surface treatment of relief
(yellow diagram) and after the use of the combined method of virtual surface treat-
ment of relief (green diagram)
         Thus, assessing the overall result of the developed program obtained an in-
crease in processor performance and reduced memory costs from 20 to 50% com-
72

pared to the standard algorithms used, which is very effective at large dimensions of
the landscape and relief details.
          The obtained results confirm the feasibility of using the developed algorithm
for the implementation of the software product and its application in practice.
          For the experimental study, we used the educational data center of the Oren-
burg state University. Used the device includes four core processor Intel Core i5 4440
processor with a frequency of 3.1 GHz, 16 GB RAM frequency 1600 MHz, graphics
card NVIDIA GeForce GTX 960 memory 4GB, hard disk 1 TB, drive DVD±RW\
Windows 10, keyboard, mouse, 23-inch monitor with a resolution of 1920x1080. The
result of the program testing is shown in fig. 6.




         Fig. 6 – Results of the program

         Conclusion

          The resulting algorithm combined methods of virtual processing of the ter-
rain surface based on the Voronoi diagram and the algorithm of diamond-square when
the virtual surface treatment relief for artificially generated landscapes have helped to
reduce the load on the system block of the computer and as a consequence to reduce
the economic costs for the enterprises OOO "Algoritm" JSC "Metalliz". Applying the
most realistic results, which allow to obtain the diamond-square algorithm and
Voronoi diagram, both high performance of the system and good image quality with a
strong approximation and at a strong distance are obtained.

References

1) Miao Yu Application of virtual earth in 3D terrain modeling to visual analysis of
large-scale geological disasters in mountainous areas / Yu Miao, Huang Yu, Xu
Qiang, Guo Peng, Dai Zili // Springer Berlin Heidelberg, p. 7. (2016)
2) Golubev Kirill Dijkstra-based Terrain Generation Using Advanced Weight Func-
tions / Procedia Computer Science Volume 101, pp. 152-160. (2016)
3) Sugihara Kenichi Automatic Generation of a 3D Terrain Model by Straight Skele-
ton Computation / Kenichi Sugihara, Takahiro Murase // CGDIP '17 Proceedings of
73

the 2017 International Conference on Computer Graphics and Digital Image Pro-
cessing, No. 4 Prague, Czech Republic — July 02 - 04, 2017, p. 7. (2017)
4) Shreiner Dave Performance OpenGL: Platform Independent Techniques / Dave
Shreiner // SIGGRAPH 2001 course, p. 15. (2001)
5) Segal M. The OpenGL. Graphics System. / M. Segal, K. Akeley // USA: Silicon
Graphics, Ins, 382 p. (2004)
6) Bolodurina, I., Parfenov, D. Approaches to the effective use of limited computing
resources in multimedia applications in the educational institutions // 2015 5th Inter-
national Workshop on Computer Science and Engineering: Information Processing
and Control Engineering, WCSE 2015-IPCE. (2015)
7) Bolodurina, I., Parfenov, D., Shukhman, A. Approach to the effective controlling
cloud computing resources in data centers for providing multimedia services // 2015
International Siberian Conference on Control and Communications, SIBCON 2015 –
Proceedings 7147170. (2015)