# Rendering and Optimization Algorithm of Digital City’s 3D Artistic Landscape Based on Virtual Reality

Authors: Zhongbiao Zheng; Yan Zhou
Journal: Wireless Communications and Mobile Computing
 (2022)

---

## Abstract

“Digital city” in a broad sense refers to urban informatization. That is to say, the digital city will gradually realize the informatization of the urban national economy and society by building infrastructure platforms such as broadband multimedia information network and geographic information system, integrating urban information resources, establishing e-government, e-commerce, labor, social insurance, and other information communities, to make the city in an invincible position in the competition of the information age. The virtual reality technology of urban three-dimensional landscape, or the establishment of a virtual city, is an important part of the vast project of digital city construction. This research mainly discusses the rendering and optimization algorithm of digital city 3D artistic landscape based on virtual reality. The article uses image stitching technology. Clean up unnecessary furniture in the CAD floor plan, and try to keep only the wall structure. Export drawings and save as dwg files for 3DMAX modeling. For adjacent overlapping images, the common features of the overlapping parts are determined by image matching, so that the images taken at different shooting positions and different viewing directions with a small angle of intersection are calculated to be unified. Take the photo coordinate system, and then find out the overlapping range of each direction for splicing. In the actual data acquisition process, most of the spatial data such as existing maps are used. It mainly includes topographic maps and the latest planning drawings, as well as planning and design drawings of various residential areas. In addition to determining the specific location of each feature, various maps are used to make a surface image (texture) of an urban area based on these data using Photoshop. The editing of roaming space is the key to realizing 3D panoramic virtual city browsing. Combined with the navigation of 3D panoramic map, using key technologies such as hotspot connection and command button, the 3D panoramic images collected in different places in the city can be effectively integrated into one, assisting with various multimedia elements, such as background music, animated videos, and language commentary, show the true appearance of the virtual city in all directions. Compared with the SURF algorithm, the SIFT algorithm extracts more feature points and more correctly matched point pairs, and the minimum time is 0.524 s. This research will contribute to the construction of the three-dimensional landscape of the digital city.


---

## Body

## 1. Introduction

In today’s society, due to the development and wide application of digital technology, people’s existence has tended to the “virtual reality” mode of “digital survival,” which has profoundly affected various fields including landscape design and construction. In the 21st century, with the rapid development of the electronics industry, it is difficult to meet the needs of customers with pure landscape architectural renderings. Landscape design renderings have gradually been replaced by landscape animations and entered into three-dimensional landscape visualization. The emergence of new things has accelerated the speed of social development and has also affected all aspects of social development. The rapid development of three-dimensional landscape visualization is particularly important. The vigorous development of landscape architecture industry drives the development and progress of three-dimensional architectural expression art.As a highly complex organic system, landscape covers a wide range of content, and other fields or things, including architecture, outdoor installations, etc., sometimes become the landscape itself. Urban landscape design is equivalent to encountering the same scene. Everyone will have their own unique insights and analysis. As the saying goes, “the same scene shows ten different versions.” To sum up, the epitome of a region’s culture can be fully reflected in landscape architecture. If you want to understand a place’s customs, you must understand the history of the development of local landscape art.In the aspect of landscape form creation methods based on the virtual reality concept, this paper links typical landscape creation cases, comprehensively analyzes, and proposes a new cognitive construction of landscape form, and on this basis, sorts out the landscape form generation, topological deformation, and the impact of the virtual reality concept, controlled authoring methods. City, like architecture, is a spatial structure with a larger scale, so the perception process is relatively long. Tian aims to design an immersive 5G virtual reality visualization display system using big data digital city technology. He uses big data digital city technology to design and implement an immersive virtual reality visualization system from the perspective of visual, auditory, and tactile 3D display modes, creating a real and interactive 3D visualization environment for users to have more intuitive visual experience [1]. Flores and Rezende believe that actions to achieve effective urban governance need to focus on citizens, and the role of local government is to find ways to involve citizens in the decision-making process. Among other information technology resources, local governments use social platforms and therefore face the challenge of extracting and classifying information for strategic use. His aim is to analyze Twitter messages and contribute to a strategic digital city. His approach is a case study of a Brazilian city. He analyzes Twitter and evaluates information based on its characteristics, sources, nature, quality, intelligence, and organizational level. His conclusions confirm that Twitter improves transparency and strengthens the bond between local government and citizens [2]. Thies et al. proposed FaceVR, a new image-based approach that enables video teleconferencing in virtual reality based on self-representation. Unlike these model-based approaches, FaceVR uses an image-based technology to implement VR teleconference, resulting in near-photo-realistic output. The key components of FaceVR are a robust algorithm for performing real-time facial movement capture on actors wearing a head-mounted display (HMD) and a new data-driven approach for eye tracking from monocular video. Based on the reenactment of prerecorded stereoscopic videos of non-HMD users, FaceVR reality-rerenders photos in real-time, allowing manual modification of the appearance of faces and eyes [3]. Chen et al. review the latest advances in the full range of video processing pipelines including projection and evaluation. Unlike traditional video, omnidirectional video (also known as panoramic video or 360-degree video) is in a spherical domain and therefore requires specialized tools. For this type of video, each image should be projected onto a two-dimensional plane for encoding and decoding to fit the input of existing video coding systems. Therefore, the coding impact of projection and the accuracy of evaluation methods are very important in this pipeline. He introduced and classified recent research advances, such as different projection methods for video coding, specialized video quality evaluation indicators, and transmission optimization methods. In addition, he also detailed the coding performance under different projection methods [4]. Ratamero et al. believe that the ability to accurately visualize the atomic geometry of interactions between drugs and their protein targets in structural models is crucial for predicting the correct modifications of previously identified inhibitors to produce more effective next-generation drugs. Through the realization of immersive virtual reality (VR), the 3d configuration of atomic geometry in the model can be more accessible and intuitive visualization. While custom commercial VIRTUAL reality kits are available, in this work, he provided a free software pipeline for visualizing protein structures through virtual reality. As an illuminating example, he combined virtual reality visualization with fast algorithms simulating flexible intramolecular movement of proteins to further improve structure-oriented drug design by revealing molecular interactions that might be hidden in static models with less information [5]. A “digital city” is actually a digital revolution relative to the current mass production and consumption system. It includes urban resources, social resources, infrastructure, humanities, economy, and other aspects of the city, is acquired, stored, managed, and reproduced in digital form, and is used to improve urban management efficiency, save resources, protect the environment and sustainable urban development, and provide decision support. Virtual reality technology has obvious advantages in system management, comprehensive analysis, and result prediction, but the application of virtual reality technology in landscape design is not very mature, and the expression of landscape design is not common, so it needs further development and research. The digital landscape space of virtual reality implies a dimension generated by the computer, which is a world composed of the information directly generated by the computer and the information received and fed back by people, which also urges people to reexamine the existing space law.This paper proposes an object-oriented three-dimensional spatial data structure, and on this basis, discusses and applies digital city three-dimensional rendering acceleration technology and collision detection technology to improve the three-dimensional rendering speed of large-scale urban landscapes and enhance users’ immersion in the three-dimensional landscape feel. Using object-oriented development language and open GL three-dimensional graphics function library to achieve the production of digital city three-dimensional landscape. Through the study of the three-dimensional landscape design, breaking the traditional flat representation of the landscape and trying to use the digital three-dimensional architectural representation method to make people have a new understanding of the landscape representation method. The aesthetic connotation of virtual reality concept for landscape creation affects people’s aesthetic standards for landscape. People under the traditional concept image will view its landscape as a work of art, but under the influence of the virtual reality concept, people are more likely to obtain the aesthetic feeling of the landscape from the process of using it as a “user.”


## 2. Methods and Experiments

### 2.1. Virtual Reality

Immersion is the immersive feeling that the virtual environment in virtual reality technology brings to people. Immersion is also the main criterion to measure the construction of virtual reality environment, and it is also the main basis for people to get a “sense of conception” in experiencing virtual reality technology. The interactivity of virtual reality allows people to have an active interactive influence with the virtual reality environment and objects. In the virtual reality environment, the viewer is no longer a bystander who passively receives information, but can also participate in it. Autonomy refers to the main characteristics of virtual reality browsing. In the virtual reality environment, users can browse or change the virtual reality environment according to their own intentions.For a large and complex scene, there are both visible polygons that contribute to the human visual perception and those invisible polygons that do not contribute to the visual perception. Visible polygons that contribute to human visual perception may also have different contributions due to the distance from the viewpoint. The accelerated rendering algorithms used in this article mainly include (1) object picking. Every space object has a boundary block. Any boundary block that is not in the field of view does not need to be further processed for the calculation of the screen rendering. These objects are called selected objects. The so-called scope of sight refers to the visible scope of the viewpoint. Any object that falls outside the scope of the field of view does not need to appear in the three-dimensional scene, so it does not need to be processed. (2) Reject the back face. Usually, a polygon defines one side as the front side, and the other side is called the back side. In the operator’s field of view, there are always some planes facing him on the back, and there is no need to deal with it, so the number of polygons can be reduced by about half. In Open GL, there is a special interface function to remove the back face. (3) Level of detail. Assuming that distant objects do not need to show too many details, because the operator cannot distinguish the details of these distant objects, so objects at a certain distance can be represented by fewer polygons without affecting the overall visual quality.The rapid real-time display of graphics depends on a good model data structure. Excellent virtual reality development tools are beneficial to the rapid establishment of models and the realization of rapid real-time display of the landscape. The formula for calculating the terrain elevation of discrete points is as follows [6]:
(1)Fx,y=∑i=1nwifi,(2)wi=hi−p∑j=1nhi−p,(3)Z=∑j=1n1/DipZi∑i=1n1/Dip.The weight formula is as follows [7]:
(4)wi=R−hi/Rhi2∑j=1nR−hj/Rhj2.In the formula,hi represents the distance between the interpolation point and the known point i, and R represents the distance between the interpolation point and the farthest point. The scale space of a two-dimensional gray image is as follows [8]:
(5)Lx,y,σ=Gx,y,σ∗Ix,y,(6)Gx,y,s=12ps2e−x2+y2/2s2.In the formula,Gx,y,σ is the scale variable Gaussian function, Ix,y is the grayscale image of the original image, the symbol ∗ represents the convolution operation, x,y represents the position of the pixel in the image, and σ is the scale space factor. The smaller the value of σ, the smaller the corresponding scale, the more image details are retained. As σ gradually increases, the image is smoothed more and more, leaving only the overview of the image.The two stages of three-dimensional graphics rendering are shown in Figure1. In the first stage, each vertex of the space model object undergoes a coordinate transformation process. In some three-dimensional visualization engines, such as OpenGL, the model object is usually represented by a three-dimensional coordinate system, and the display is a two-dimensional plane, so when drawing three-dimensional graphics, you need to change the three-dimensional coordinates of the objects in the space into two-dimensional coordinates. This is the vertex transformation. The process of vertex transformation includes not only the coordinate conversion of vertices but also the conversion of vertex normals and texture coordinates. After the conversion is completed, different lighting effects need to be applied to the vertices of the object according to the material of the object in the scene and the light source in the scene. The second stage is mainly to construct the vertices after the previous coordinate transformation into basic primitives in the form of points, lines, and surfaces and establish texture mapping. Based on the color value of each vertex, combined with the state value of the rendering device, all pixels are calculated.Figure 1
Two stages of 3D graphics rendering.


### 2.2. Artificial Feature Modeling

The model used in this article is established by the Multigen Creator software man-machine interactively and stored in the Open Flight data format. It takes into account the advantages of the CSG model and the BR model. Most buildings have regular geometric shapes, which can be obtained by simple geometric superposition of regular geometric primitives (cubes, circles, cones, cylinders, planes, etc.); for very irregular buildings, they can be lofted by curved surfaces. Generate an irregular appearance. However, in order to achieve the unified integrated management with the digital terrestrial model TIN data, it is necessary to triangulate each surface of the building. The hierarchical organization structure of the Open Flight format is very conducive to the analysis and query of the spatial information of the building model. For an architectural model, it can be composed of many parts (Object1, Objec2,...), and each part is composed of a series of triangular faces (Face1, Face2,...), so the structure of each architectural model is a pyramid type tree structure. This kind of structure can facilitate the editing, accessing and copying of objects through the step-by-step refinement of the building model.There are two sources for building textures: extraction from aerial images and on-site shooting. Aerial images can only extract architectural top textures and a small amount of side textures, and most of the texture data needs to be captured on the spot. It should be noted that because the graphics card only supports texture data with exponential power of 2, the width and height of the texture image should be adjusted to the exponential power of 2, otherwise, the system needs to sample and resize when the system is running. Thereby increasing system overhead and affecting execution efficiency. The feature point extraction technology is to detect and describe the points in the image that have attribute differences from the neighboring points. The selected feature points should be obvious, easy to extract, and have enough distribution in the image. In order to uniquely identify each feature point and the need of the subsequent feature point matching module, a small neighborhood of it is often selected with the feature point as the center point, and the descriptor vector of the feature point is generated according to a certain measurement method.Remove low contrast (low contrast) candidate feature points [9]:
(7)Dx=D+∂DT∂xx+12xT∂2D∂x2x,(8)x^=−∂2D−1∂x2∂D∂x.Eliminate candidate feature points located at the edge. In order to improve the computational efficiency, instead of solving the eigenvalues of the complex matrix, the ratio is calculated. Suppose the larger eigenvalue of the Hessian matrix isα, the smaller eigenvalue is β, the trace of the matrix is TrH, and the determinant is DetH [10].
(9)H=DxxDxyDxyDyy,(10)TrH=Dxx+Dyy=α+β,(11)DetH=DxxDyy−Dxy2=αβ,(12)ratio=TrH2DetH=α+β2αβ=γβ+β2γ2β.The modulusmx,y and direction θx,y of the gradient of each pixel in the local small neighborhood are as follows [11]:
(13)mx,y=Lx+1,y−Lx−1,y2+Lx,y+1−Lx,y−12,(14)θx,y=arctanLx+1,y−Lx−1,yLx,y+1−Lx,y−1.The integral image is defined as follows [12]:
(15)IΣx,y=∑i=0i≤x∑j=0j≤yIx,y.When the camera rotates around the horizontal axis or the vertical axis during shooting, the captured image sequence encloses a cylindrical surface. At this time, the cylindrical surface can be used to generate a panoramic image, which can simplify the motion model. The virtual panoramic space generation process is shown in Figure2. Similarly, when the camera is shooting at a fixed point, its posture is constantly changing. At this time, a spherical surface can be used to generate a panoramic image. This requires the cylindrical and spherical transformation models of the image, respectively. At the same time, there is also a cube model that is also commonly used to generate panoramic walkthroughs. For the cube model, the transformation relationship between images is relatively simple.Figure 2
Virtual panoramic space generation process.Roaming navigation path setting the existing virtual environment roaming software also provides roaming path setting function, which is somewhat similar to multimedia demonstration and has the function of roaming guidance. The viewer can watch the panorama according to the preset roaming route without clicking the mouse. The difference is that you can interrupt roaming at any time by clicking the mouse and browse according to your own wishes, which is highly interactive. The designer can control the playing time and the playing route of the virtual roaming in advance and can also arrange the route of the whole virtual roaming. The roaming route can be understood as the indication route of the frame, which is similar to the production principle of flash. A roaming route has many frames, and one frame can be set at any position of the timeline. When playing a walkthrough route, frames will appear in a certain chronological order. By setting the roaming route, you can control the time length of each scene and make automatic playback or guidance route. All the characteristics of virtual roaming can be displayed by setting a playback button. Since XML is a general standard, the panorama space organized in this way can also be used by external platforms, and its good expansibility makes it possible to build a larger-scale panorama space.The image stitching algorithm can be used as a virtual scene generated from a panoramic image based on the source data and texture data of the graphics rendering method. Construct digital communities and digital tourist attractions. Image plane splicing technology often requires separate modeling of some important or iconic landscapes when building a three-dimensional model of a city. Most of the image data used in modeling needs to be obtained through close-up photography. In close-range photogrammetry, these landscapes require more than two images to describe either in the length direction or in the height direction. Therefore, image stitching technology is used here. For adjacent overlapping images, the common features of the overlapping parts are determined by image matching. Therefore, the images taken at different shooting positions and different observation directions with a small angle of intersection are calculated to a unified photo coordinate system, and then the overlapping range of each direction is found for stitching.Assuming that the camera is in its normalized position, that is, the camera attitude rotation matrix is the identity matrix, then the optical axis coincides with theZ axis and is perpendicular to the Y axis. The phase space coordinates of a point x,y in the image are x,y,f. Convert such an image to a unit cylindrical surface (the radius of the cylindrical surface is 1), and the points on the cylindrical surface are represented by an angle θ and a height h, namely, [13]
(16)sinθ,cosθ∝x,y,f.Based on this, the conversion formula for mapping the image plane point coordinates to the cylindrical coordinates is [14]
(17)x′=sθ=stan−1xf,(18)y′=sh=syx2+f2,wheres is the zoom factor, for cylindrical stitching, usually s is taken as the focal length of the camera [15].SupposeI1x,y and I2x,y are two gray-scale images with overlapping regions, w1x,y and w2x,y are the weight functions of the pixels corresponding to the overlapping regions in the images I1 and I2, and satisfy w1x,y+w2x,y=1, 0<w1x,y,w2x,y<1, and Ix,y to be the fused composite image. Then, their relationship is as follows [16]:
(19)Ix,y=I1x,y,x,y∈I1,w1x,yI1x,y+w2x,yI2x,y,x,y∈I1∩I2,I2x,y,x,y∈I2.The value of the weight function is as follows [17]:
(20)w1x,y=xr−xixr−xi,w2x,y=1−w1x,y=xi−xlxr−xl.


### 2.3. Hierarchical Grid Model

For urban residential buildings and other buildings, many are divided into several units, and the layout of the rooms on each floor is the same; for buildings such as college student dormitories, some are divided into units, some have only one gate, no units, and there is one inside the building. The corridor runs through and divides the building into two. There are regularly distributed rooms on both sides of the corridor. The layout of rooms on each floor of these two types of buildings generally has symmetry. The method of hierarchical gridding of this building is as follows.Step 1.
First, layer the building according to the number of floors of the building and the height of the building. If the height of the building isH and there are n floors in total, the height of each floor is h=H/n, and the buildings are stratified along the height of the building by h.Step 2.
For each floor of the abovementioned urban residential buildings and similar buildings, it can be divided according to the unit along the long axis of the building (X direction), and then each unit is evenly divided; for many buildings, except for the edge long axis direction (X direction) is divided according to the number of rooms, but also along the short axis direction of the building (Y direction).Step 3.
Combine the above two steps to form a three-dimensional division of the entire building.


### 2.4. Data Acquisition

In the actual data acquisition process, most of the spatial data such as existing maps are used. It mainly includes topographic maps and the latest planning drawings, as well as planning and design drawings of various residential areas. In addition to determining the specific location of each feature, various maps are used to make a surface image (texture) of an urban area based on these data using Photoshop. In the program, use texture technology to paste the produced surface image on the corresponding quadrilateral representing the surface, and then a simple surface is completed.


### 2.5. Model Visualization

Model visualization is to define a certain display range (that is, the display area of the screen), projection matrix, and view matrix according to the steps of displaying three-dimensional graphics in OpenGL to visualize the three-dimensional model.(1)
Building Features. The surface of the building is not a simple plane. If the details of the model are also represented by three-dimensional geometric modeling, the geometric modeling will become extremely complicated, and the number of faces of the model will be large. Increase, affect the visual effect, through the method of texture mapping to simulate these details, can reduce the complexity of model establishment(2)
Road-Like Features. For road-like features, the triangles are divided according to its centerline and width, and then the texture of the road is attached to each triangle(3)
Vegetation Ground Objects. For vegetation ground objects, it is the same as road ground objects, but first draw its divided triangle, and then paste the vegetation texture. For some special vegetation types, it is also necessary to draw its borders. The vegetation boundary can be represented by lines or by narrow and long columnar geometry(4)
Independent Tree-Type Features. For independent tree-type features, draw a rectangle perpendicular to the ground at its ground point according to its height and width, and then paste a transparent texture


### 2.6. Editing of Roaming Space

The editing of roaming space is the key to realizing 3D panoramic virtual city browsing. Combined with the navigation of 3D panoramic map, using key technologies such as hotspot connection and command button, the 3D panoramic images collected in different places in the city can be effectively integrated into one, assisting with various multimedia elements, such as background music, animated videos, and language commentary, show the true appearance of the virtual city in all directions. When viewing a three-dimensional panoramic city, the viewer can experience the real environment information of the observed scene on the one hand. The viewer can walk and watch easily and freely during the browsing process and shuttle between different three-dimensional scenes [18, 19].


## 2.1. Virtual Reality

Immersion is the immersive feeling that the virtual environment in virtual reality technology brings to people. Immersion is also the main criterion to measure the construction of virtual reality environment, and it is also the main basis for people to get a “sense of conception” in experiencing virtual reality technology. The interactivity of virtual reality allows people to have an active interactive influence with the virtual reality environment and objects. In the virtual reality environment, the viewer is no longer a bystander who passively receives information, but can also participate in it. Autonomy refers to the main characteristics of virtual reality browsing. In the virtual reality environment, users can browse or change the virtual reality environment according to their own intentions.For a large and complex scene, there are both visible polygons that contribute to the human visual perception and those invisible polygons that do not contribute to the visual perception. Visible polygons that contribute to human visual perception may also have different contributions due to the distance from the viewpoint. The accelerated rendering algorithms used in this article mainly include (1) object picking. Every space object has a boundary block. Any boundary block that is not in the field of view does not need to be further processed for the calculation of the screen rendering. These objects are called selected objects. The so-called scope of sight refers to the visible scope of the viewpoint. Any object that falls outside the scope of the field of view does not need to appear in the three-dimensional scene, so it does not need to be processed. (2) Reject the back face. Usually, a polygon defines one side as the front side, and the other side is called the back side. In the operator’s field of view, there are always some planes facing him on the back, and there is no need to deal with it, so the number of polygons can be reduced by about half. In Open GL, there is a special interface function to remove the back face. (3) Level of detail. Assuming that distant objects do not need to show too many details, because the operator cannot distinguish the details of these distant objects, so objects at a certain distance can be represented by fewer polygons without affecting the overall visual quality.The rapid real-time display of graphics depends on a good model data structure. Excellent virtual reality development tools are beneficial to the rapid establishment of models and the realization of rapid real-time display of the landscape. The formula for calculating the terrain elevation of discrete points is as follows [6]:
(1)Fx,y=∑i=1nwifi,(2)wi=hi−p∑j=1nhi−p,(3)Z=∑j=1n1/DipZi∑i=1n1/Dip.The weight formula is as follows [7]:
(4)wi=R−hi/Rhi2∑j=1nR−hj/Rhj2.In the formula,hi represents the distance between the interpolation point and the known point i, and R represents the distance between the interpolation point and the farthest point. The scale space of a two-dimensional gray image is as follows [8]:
(5)Lx,y,σ=Gx,y,σ∗Ix,y,(6)Gx,y,s=12ps2e−x2+y2/2s2.In the formula,Gx,y,σ is the scale variable Gaussian function, Ix,y is the grayscale image of the original image, the symbol ∗ represents the convolution operation, x,y represents the position of the pixel in the image, and σ is the scale space factor. The smaller the value of σ, the smaller the corresponding scale, the more image details are retained. As σ gradually increases, the image is smoothed more and more, leaving only the overview of the image.The two stages of three-dimensional graphics rendering are shown in Figure1. In the first stage, each vertex of the space model object undergoes a coordinate transformation process. In some three-dimensional visualization engines, such as OpenGL, the model object is usually represented by a three-dimensional coordinate system, and the display is a two-dimensional plane, so when drawing three-dimensional graphics, you need to change the three-dimensional coordinates of the objects in the space into two-dimensional coordinates. This is the vertex transformation. The process of vertex transformation includes not only the coordinate conversion of vertices but also the conversion of vertex normals and texture coordinates. After the conversion is completed, different lighting effects need to be applied to the vertices of the object according to the material of the object in the scene and the light source in the scene. The second stage is mainly to construct the vertices after the previous coordinate transformation into basic primitives in the form of points, lines, and surfaces and establish texture mapping. Based on the color value of each vertex, combined with the state value of the rendering device, all pixels are calculated.Figure 1
Two stages of 3D graphics rendering.


## 2.2. Artificial Feature Modeling

The model used in this article is established by the Multigen Creator software man-machine interactively and stored in the Open Flight data format. It takes into account the advantages of the CSG model and the BR model. Most buildings have regular geometric shapes, which can be obtained by simple geometric superposition of regular geometric primitives (cubes, circles, cones, cylinders, planes, etc.); for very irregular buildings, they can be lofted by curved surfaces. Generate an irregular appearance. However, in order to achieve the unified integrated management with the digital terrestrial model TIN data, it is necessary to triangulate each surface of the building. The hierarchical organization structure of the Open Flight format is very conducive to the analysis and query of the spatial information of the building model. For an architectural model, it can be composed of many parts (Object1, Objec2,...), and each part is composed of a series of triangular faces (Face1, Face2,...), so the structure of each architectural model is a pyramid type tree structure. This kind of structure can facilitate the editing, accessing and copying of objects through the step-by-step refinement of the building model.There are two sources for building textures: extraction from aerial images and on-site shooting. Aerial images can only extract architectural top textures and a small amount of side textures, and most of the texture data needs to be captured on the spot. It should be noted that because the graphics card only supports texture data with exponential power of 2, the width and height of the texture image should be adjusted to the exponential power of 2, otherwise, the system needs to sample and resize when the system is running. Thereby increasing system overhead and affecting execution efficiency. The feature point extraction technology is to detect and describe the points in the image that have attribute differences from the neighboring points. The selected feature points should be obvious, easy to extract, and have enough distribution in the image. In order to uniquely identify each feature point and the need of the subsequent feature point matching module, a small neighborhood of it is often selected with the feature point as the center point, and the descriptor vector of the feature point is generated according to a certain measurement method.Remove low contrast (low contrast) candidate feature points [9]:
(7)Dx=D+∂DT∂xx+12xT∂2D∂x2x,(8)x^=−∂2D−1∂x2∂D∂x.Eliminate candidate feature points located at the edge. In order to improve the computational efficiency, instead of solving the eigenvalues of the complex matrix, the ratio is calculated. Suppose the larger eigenvalue of the Hessian matrix isα, the smaller eigenvalue is β, the trace of the matrix is TrH, and the determinant is DetH [10].
(9)H=DxxDxyDxyDyy,(10)TrH=Dxx+Dyy=α+β,(11)DetH=DxxDyy−Dxy2=αβ,(12)ratio=TrH2DetH=α+β2αβ=γβ+β2γ2β.The modulusmx,y and direction θx,y of the gradient of each pixel in the local small neighborhood are as follows [11]:
(13)mx,y=Lx+1,y−Lx−1,y2+Lx,y+1−Lx,y−12,(14)θx,y=arctanLx+1,y−Lx−1,yLx,y+1−Lx,y−1.The integral image is defined as follows [12]:
(15)IΣx,y=∑i=0i≤x∑j=0j≤yIx,y.When the camera rotates around the horizontal axis or the vertical axis during shooting, the captured image sequence encloses a cylindrical surface. At this time, the cylindrical surface can be used to generate a panoramic image, which can simplify the motion model. The virtual panoramic space generation process is shown in Figure2. Similarly, when the camera is shooting at a fixed point, its posture is constantly changing. At this time, a spherical surface can be used to generate a panoramic image. This requires the cylindrical and spherical transformation models of the image, respectively. At the same time, there is also a cube model that is also commonly used to generate panoramic walkthroughs. For the cube model, the transformation relationship between images is relatively simple.Figure 2
Virtual panoramic space generation process.Roaming navigation path setting the existing virtual environment roaming software also provides roaming path setting function, which is somewhat similar to multimedia demonstration and has the function of roaming guidance. The viewer can watch the panorama according to the preset roaming route without clicking the mouse. The difference is that you can interrupt roaming at any time by clicking the mouse and browse according to your own wishes, which is highly interactive. The designer can control the playing time and the playing route of the virtual roaming in advance and can also arrange the route of the whole virtual roaming. The roaming route can be understood as the indication route of the frame, which is similar to the production principle of flash. A roaming route has many frames, and one frame can be set at any position of the timeline. When playing a walkthrough route, frames will appear in a certain chronological order. By setting the roaming route, you can control the time length of each scene and make automatic playback or guidance route. All the characteristics of virtual roaming can be displayed by setting a playback button. Since XML is a general standard, the panorama space organized in this way can also be used by external platforms, and its good expansibility makes it possible to build a larger-scale panorama space.The image stitching algorithm can be used as a virtual scene generated from a panoramic image based on the source data and texture data of the graphics rendering method. Construct digital communities and digital tourist attractions. Image plane splicing technology often requires separate modeling of some important or iconic landscapes when building a three-dimensional model of a city. Most of the image data used in modeling needs to be obtained through close-up photography. In close-range photogrammetry, these landscapes require more than two images to describe either in the length direction or in the height direction. Therefore, image stitching technology is used here. For adjacent overlapping images, the common features of the overlapping parts are determined by image matching. Therefore, the images taken at different shooting positions and different observation directions with a small angle of intersection are calculated to a unified photo coordinate system, and then the overlapping range of each direction is found for stitching.Assuming that the camera is in its normalized position, that is, the camera attitude rotation matrix is the identity matrix, then the optical axis coincides with theZ axis and is perpendicular to the Y axis. The phase space coordinates of a point x,y in the image are x,y,f. Convert such an image to a unit cylindrical surface (the radius of the cylindrical surface is 1), and the points on the cylindrical surface are represented by an angle θ and a height h, namely, [13]
(16)sinθ,cosθ∝x,y,f.Based on this, the conversion formula for mapping the image plane point coordinates to the cylindrical coordinates is [14]
(17)x′=sθ=stan−1xf,(18)y′=sh=syx2+f2,wheres is the zoom factor, for cylindrical stitching, usually s is taken as the focal length of the camera [15].SupposeI1x,y and I2x,y are two gray-scale images with overlapping regions, w1x,y and w2x,y are the weight functions of the pixels corresponding to the overlapping regions in the images I1 and I2, and satisfy w1x,y+w2x,y=1, 0<w1x,y,w2x,y<1, and Ix,y to be the fused composite image. Then, their relationship is as follows [16]:
(19)Ix,y=I1x,y,x,y∈I1,w1x,yI1x,y+w2x,yI2x,y,x,y∈I1∩I2,I2x,y,x,y∈I2.The value of the weight function is as follows [17]:
(20)w1x,y=xr−xixr−xi,w2x,y=1−w1x,y=xi−xlxr−xl.


## 2.3. Hierarchical Grid Model

For urban residential buildings and other buildings, many are divided into several units, and the layout of the rooms on each floor is the same; for buildings such as college student dormitories, some are divided into units, some have only one gate, no units, and there is one inside the building. The corridor runs through and divides the building into two. There are regularly distributed rooms on both sides of the corridor. The layout of rooms on each floor of these two types of buildings generally has symmetry. The method of hierarchical gridding of this building is as follows.Step 1.
First, layer the building according to the number of floors of the building and the height of the building. If the height of the building isH and there are n floors in total, the height of each floor is h=H/n, and the buildings are stratified along the height of the building by h.Step 2.
For each floor of the abovementioned urban residential buildings and similar buildings, it can be divided according to the unit along the long axis of the building (X direction), and then each unit is evenly divided; for many buildings, except for the edge long axis direction (X direction) is divided according to the number of rooms, but also along the short axis direction of the building (Y direction).Step 3.
Combine the above two steps to form a three-dimensional division of the entire building.


## 2.4. Data Acquisition

In the actual data acquisition process, most of the spatial data such as existing maps are used. It mainly includes topographic maps and the latest planning drawings, as well as planning and design drawings of various residential areas. In addition to determining the specific location of each feature, various maps are used to make a surface image (texture) of an urban area based on these data using Photoshop. In the program, use texture technology to paste the produced surface image on the corresponding quadrilateral representing the surface, and then a simple surface is completed.


## 2.5. Model Visualization

Model visualization is to define a certain display range (that is, the display area of the screen), projection matrix, and view matrix according to the steps of displaying three-dimensional graphics in OpenGL to visualize the three-dimensional model.(1)
Building Features. The surface of the building is not a simple plane. If the details of the model are also represented by three-dimensional geometric modeling, the geometric modeling will become extremely complicated, and the number of faces of the model will be large. Increase, affect the visual effect, through the method of texture mapping to simulate these details, can reduce the complexity of model establishment(2)
Road-Like Features. For road-like features, the triangles are divided according to its centerline and width, and then the texture of the road is attached to each triangle(3)
Vegetation Ground Objects. For vegetation ground objects, it is the same as road ground objects, but first draw its divided triangle, and then paste the vegetation texture. For some special vegetation types, it is also necessary to draw its borders. The vegetation boundary can be represented by lines or by narrow and long columnar geometry(4)
Independent Tree-Type Features. For independent tree-type features, draw a rectangle perpendicular to the ground at its ground point according to its height and width, and then paste a transparent texture


## 2.6. Editing of Roaming Space

The editing of roaming space is the key to realizing 3D panoramic virtual city browsing. Combined with the navigation of 3D panoramic map, using key technologies such as hotspot connection and command button, the 3D panoramic images collected in different places in the city can be effectively integrated into one, assisting with various multimedia elements, such as background music, animated videos, and language commentary, show the true appearance of the virtual city in all directions. When viewing a three-dimensional panoramic city, the viewer can experience the real environment information of the observed scene on the one hand. The viewer can walk and watch easily and freely during the browsing process and shuttle between different three-dimensional scenes [18, 19].


## 3. Results

In order to make the data comparable, the same feature point matching algorithm is used in the experiment to match the feature points extracted by SIFT and SURF. The performance comparison between the two groups of SIFT and SURF is shown in Figure3. From the data in Figure 3, it can be known that compared with the SURF algorithm, the SIFT algorithm extracts more feature points and more correctly matched point pairs, and the minimum time is 0.524 s. The local features of the image remain unchanged for rotation, scaling, and brightness changes and also maintain a certain degree of stability for viewing angle changes, affine transformations, and noise.Figure 3
Performance comparison between two groups of SIFT and SURF.For each primary selected point, a3×3 pixel window is established with this point as the center, and the gray scale covariance matrix of the window is calculated by calculating Robert’s gradient, and the roundness of the error ellipse and the weight of the pixel point are obtained from this, to determine the selected point and the final feature point. Image 8 in the above table is the left image selected for this experiment, and the number of primary selected points is 22 after the experiment. The threshold is 4/5R. The selection of the threshold is shown in Table 1. Threshold selection is the basis of image processing and analysis. Aiming at several common image binarization automatic threshold selection methods, the experimental results are compared and studied by computer simulation. On this basis, a new image binarization algorithm is proposed.Table 1
Threshold selection.
Threshold (number of primary selection points)
1/2R
2/3R
3/4R
4/5R
5/6R
Image 1
118
60
5
37
37
Image 2
101
101
100
13
2
Image 3
88
64
32
20
9
Image 4
138
610
67
275
12
Image 5
931
149
452
98
4
Image 6
174
110
100
42
160
Image 7
355
60
75
37
49
Image 8
118
101
5
13
22Comprehensive application of ArcMap and ArcCatolog in the ArcGIS series to draw campus maps, where the road is drawn as a polygon type, which can not only effectively dig the width of the road but also attach corresponding textures such as asphalt and concrete to the road, which increases the sense of reality. Parking spots, buildings, and grass must also be drawn as polygon types: independent trees and street lights are point types. In order to give different heights to the building, thez attribute must be added to the building and add value when drawing. The required shapefiles are shown in Table 2. These display methods are parking spaces, grasslands, buildings, street lights, and independent trees.Table 2
The required shapefiles.
Serial number
Shapefile name
Type
1
The way
Polygon
2
Parking spot
Polygon
3
Grassland
Polygon
4
Building
Polygon
5
Street lamp
Point
6
Independent tree
PointThe urban-rural digital divide hinders the modernization of rural culture and entertainment. The Internet and other information technologies can bring a variety of multimedia cultural and entertainment services to urban and rural residents. Internet TV, online games, digital media, and entertainment have been widely popularized in cities. However, due to optical cables, wired network base stations, wireless network sites, and data in rural areas, the backwardness of information software and hardware such as exchange platforms has made it difficult for the culture and entertainment in rural areas to keep up with the pace of the times. It can be seen from Table3 that the penetration rate of online music, online literature, and online games among rural residents in 2018-2019 is relatively low, which is more than three times different from that of urban residents. This shows that it is difficult for rural residents to modernize cultural entertainment through online tools. The development of urban and rural digitalization is shown in Table 3.Table 3
Digital development in urban and rural areas.
Years
2018
2019
Resident type
Citizens
Village people
Citizens
Village people
Internet music penetration rate
29.85%
9.45%
37.37%
40.70%
Internet literature penetration rate
16.08%
5.33%
19.04%
22.35%
Online game penetration rate
21.23%
6.81%
30.60%
33.85%Since AutoCAD does not have a topological data structure, if you choose its topological function when converting to other GIS software (such as ARC/INFO), the converted data obtained will change greatly and cannot meet the actual requirements. Therefore, other programs are needed to preprocess these CAD data. A residential land line drawing is transferred from CAD format to Mapinfo, and the table structure has not been modified. It can be seen that if there is no processing, the meaning of these data will be incomprehensible and cannot be operated. The comparison between no treatment and treatment is shown in Figure4.Figure 4
Comparison of no treatment and treatment.Import the above saved .dxf file format data into MapInfo and store it as a table file. After the topological processing of these buildings through the program, the relevant matching information is saved as the field value, and finally, a MIF format file is formed for IMAGGIS used with other software, and the data is converted into graphics as shown in Figure5 (part of the experimental area).Figure 5
After the data is converted to a graph (the picture comes from Baidu).To make the three-dimensional buildings and landforms in the IMAGIS environment reproduce the real digital terrain model, the digital elevation model of the experimental area must first be generated. The specific method of establishing DEM is directly import the contour lines generated in the digital map into the two-dimensional editor of IMAGIS for processing. During the processing, the contour lines must be fully checked for errors. After the preview is correct, select the appropriate interpolation function and grid points to automatically generate the DEM. As long as the data is accurate, the generated DEM will be very realistic; if the aerial photographs are superimposed on the DEM, the display effect will be more realistic. The contour and DEM of the experimental area are shown in Figure6.Figure 6
Contours and DEM of the experimental area.Next, texture mapping is performed on the wall and top of the building. By using the processed texture pictures to map each side of the building, in the actual generated surfaces, they are all as a whole, and an irregular surface is subdivided into multiple regular surfaces for processing. The texture mapping effect is good or bad, and self-connection affects the fidelity of the model. In the process of completing this step, the more meticulous the work done, the more time it will take, and only a compromise can be made on the basis of achieving a certain effect. The texture mapping in the building model is shown in Figure7.Figure 7
Texture mapping in the building model (the picture comes from Baidu).After the model is built and saved, open the scene in the 3D browsing module 3D browser, and you can watch it in any direction, angle, and distance. By setting the flight route, you can record video. The long-range effect and close-range effect of the test area scene are shown in Figure8.Figure 8
The long-range effect and the close-up effect of the test area scene (the picture comes from Baidu).Users will react to the virtual environment they are in based on the knowledge and experience in real life. For example, when a user roams in a virtual environment, there will be many environmental factors that affect his behavior. Special features, specific sounds, color textures, environmental atmosphere, and other factors will cause him to change his course of action. Therefore, in the construction of urban virtual environment, it is necessary to discuss the realism of the scene and the interaction design in combination with the user’s perception and cognitive ability. According to the frequency of use and the amount of information perceived, the importance and characteristics of user perception are shown in Figure9.Figure 9
Importance and characteristics of user perception.The development of digital technology has provided a more effective and convenient method for the selection of urban landscape road routes. The route selection method of landscape roads has been developed from field route selection at the beginning to aerial survey route selection relying on photogrammetry technology and remote sensing technology, and then to the present. The third stage of automated line selection, for example, planning for the northern part of the scenic spot and determining impact factors through various evaluation methods. The impact factors are shown in Table4.Table 4
Impact factors.
Evaluation goal
First-level evaluation factor
Stimulus
Secondary evaluation factor
Weights
Influencing factors of route selection in scenic environment
Terrain
W1
Elevation
W11
Slope
W12
Undulation
W13
Hydrological conditions
W2
Waters
W21
Catchment area
W22
Runoff area
W23
Ecologically sensitive area
W3
—
—
Land use
W4
Status quo road
W41
Reserved facilities
W42Import the relevant data into the GIS software for overlay analysis to get the composite map, and finally, draw and adjust the road network in the design area in the CAD software. The road line selection parameters are shown in Table5.Table 5
Road route selection parameters.
Parameter
Path distance algorithm
Impact factor
Slope, undulation
Grade
32
Hierarchical assignment
Equally divided
Road node
Starting point
2
End point, midpoint
38
Surface grid
Vertical grid
Elevation
Vertical coefficient intersection angle
±28
Slope value
0.033 33The link of public participation in urban landscape reflects the essence of modern landscape planning and design with communication as the starting point. This link is the substantive embodiment of urban landscape planning theory and an important link in the planning and design process. It is important to deal with the relationship between people and the environment. To do a good job in modern urban landscape planning and management, digital landscape technology can be used to improve the design system and improve urban landscape services. Another way for the public to participate in urban landscape planning and design is based on the new media technology of the mobile Internet. New media technology provides a convenient platform for public participation in urban landscapes. In new media technologies, social networks, location services, and mobile terminals are particularly prominent. Nowadays, the most popular social network smart phones and mobile computers and other mobile smart terminals are now the most popular smart devices that are frequently used by the public. Through the satisfaction of the public’s surrounding landscape, a questionnaire survey is conducted in the form of voting on the WeChat public platform, as shown in Figure10.Figure 10
Questionnaire survey conducted in the form of voting on the WeChat public platform.Through the release of different urban landscape design plans, according to the public’s access to each piece of information and trends, the public’s more inclined plans are drawn. Public participation based on social networks greatly expands the ways of public participation, enriches the means of feedback, and also expands the sample of data required by the landscape. The amount of information visits is shown in Figure11.Figure 11
Information access.


## 4. Discussion

The existing city 3D roaming software is equipped with an interactive map. When the user is roaming in the scene, the mouse or keyboard guides the line of sight to rotate left and right. The pointer of the compass provided by the system will rotate synchronously to indicate the current flight direction. It allows the viewer to clearly know where and where they are browsing. The user can see the route taken during roaming and flying in the navigation chart and can also set the starting point of the flight, import the flight path, and restore the global scope and other functions. The map effect not only makes the virtual tour more vivid and fulfilling but also realizes the interactive operation between the user and the virtual tour, which breaks through the dull and monotonous interface of traditional panoramic browsing. Designers can also add their favorite maps to the virtual tour, adding rich colors to the tour [20].According to the nature of the key streets, different color atmospheres are used to highlight the characteristics of the block, and the key landmark buildings are modeled in more detail to form the characteristic atmosphere of the street. Different streets must have their own characteristics, the user’s movement from one block to another, this block must have its own characteristics, have the conditions to attract people, and users will want to move more. For example, for commercial pedestrian streets, there are generally many large department stores, ancient buildings, ancient churches, and squares. The store pays great attention to aesthetics. Generally, there are special personnel to design the windows and layout, so its street scene is more beautiful and has commercial characteristics. Making full use of these real-life photos can create a good business atmosphere. Provide sufficient viewing space and key greening for key landmark buildings, strengthen texture, attract users to visit, and appropriately omit secondary buildings. These buildings occupy the main position and need to provide people with enough viewing space to make people’s line of sight relatively wide [21, 22].Photogrammetry mainly constructs three-dimensional models through stereo pairs, computer graphics mainly describes three-dimensional landscapes through geometric models, and virtual reality uses plenoptic functions to achieve scene restoration and construction. The research on how to construct a three-dimensional scene from multimeasurement or nonmeasurement single image and then realize three-dimensional modeling is not very in-depth. This research is to conduct research on these issues, and the following results have been obtained. The current situation of urban 3D modeling has been analyzed and studied from the two fields of photogrammetry and virtual reality. The basic methods and algorithms of 3D landscape modeling indicate the importance of its application. For larger urban areas, a single panoramic photo that can describe the overall picture of the area is first constructed, and then the existing photogrammetric image matching methods are comprehensively analyzed using a three-dimensional modeling method based on the combination of graphics and images, and based on different standard classifies matching methods and combines the characteristics of digital close-range photogrammetry and adopts a feature-based overall matching scheme. In the plane image stitching algorithm, a feature-based overall matching scheme is adopted [23].In the digital age, with the popularity of the Internet, the speed of information dissemination has increased exponentially, and people’s lives are becoming more and more digital. Under the conditions of the Internet, the dissemination of information is no longer restricted by the media, and the dissemination of information is becoming more and more simplified. The exchange of information has undergone revolutionary changes, and its prosperity is unprecedented. The rapid development of digital technology has brought subversive changes in many areas of people’s production and life, and its influence in the landscape design industry is also obvious. Therefore, it is required to study the method of combining virtual reality technology with traditional landscape design methods and combine the actual operation process to apply it to the actual landscape creation [24, 25].


## 5. Conclusion

With the widespread demand for digital city construction, it has become an inevitable trend to increase research on virtual city construction. This article uses commercial software combined with secondary development in the VC environment to provide a three-dimensional model of urban space in virtual city construction. The construction and realization of urban virtual roaming are studied, which solves the three-dimensional creation of basic models in the city and realizes the real-time roaming problem of large-scale terrain scenes. In terms of interaction design, there are few related researches. The existing solutions only provide more interactive methods in technology. However, not many scholars or institutions consider the interaction design of virtual scenes from a human perspective. With the rapid development of virtual reality technology, the authenticity of virtual scenes has become a topic of general concern. How to realize the simulation construction of large-scale urban scenes is worthy of in-depth study.



---

*Source: 8258565-2022-04-14.xml*