Optimization of Texture Rendering of 3D Building Model Based on Vertex Importance

: In 3D building models, a large number of texture maps with different sizes increase the number of model data loading and drawing batches, which greatly reduces the drawing efficiency of the model. Therefore, this paper proposes a texture set mapping method based on vertex importance. Firstly, based on the 2D space boxing algorithm, the texture maps are merged and a series of Mipmap texture maps are generated, and then the vertex curvature, texture variability and location information of each vertex are calculated, normalized, and weighted to get the importance of each vertex, and then finally, different Mipmap-level textures are remapped according to the importance of the vertices. The experiment proves that the algorithm in this paper can reduce the amount of texture data on the one hand, and avoid the rendering pressure brought by the still large amount of data after merging on the other hand, so as to improve the rendering efficiency of the model.


INTRODUCTION
Currently, the rendering optimization of texture data mainly includes texture compression and texture merging, and the existing texture merging tools rely on manual experience, with a low degree of automation, and a large limitation of application (Liu Tianyi, 2023).For example, NVIDIA's texture tools, Autodesk's 3DMax software's UVW-UnWrap tool, and so on.The above texture merging tools more or less need manual intervention and experience in using them, and cannot realize the whole automation, which is obviously not suitable for the batch processing of texture data of large-scale 3D city models.Xuefeng Dai (2015) proposed an automatic multi-texture merging method based on greedy and annealing algorithms; Qing Zhu (2021) proposed a two-dimensional spatial crating algorithm to optimize the redundant textures during texture merging; Bao X(2020) proposed a method to simplify the texture data and compression management using fractal quadtree, and used fractal texture compression to create a multi-resolution texture data structure with a quadtree structure, so that the 3D models of buildings to achieve dynamic visualization at different scales; Zhang (2021) introduced a size-adaptive texture atlas method without loss of accuracy and addition of extra storage space; Jae-Ho N (2023) An improved ETC2 coding technique for real-time, high-quality texture compression ; Guillaume L (2019) provided some methods to evaluate the quality of texture compression.Among them, texture compression algorithms are complex and degrade texture quality, and for models in large scenes with merged textures, the amount of data is still large.In computer vision, Mipmap texture is widely used, Wang Zhenni ( 2019    3. When the horizontal direction is filled or the remaining space can no longer be filled, fill in the vertical direction in turn.Loop through the remaining texture maps to find a texture map that exactly matches the width of the remaining space in the vertical axis direction, or if none exists, fill them in order of height and area size until the set of texture maps is filled completely or can no longer be filled; 4. If there are remaining texture maps, create another texture map set and repeat steps 1, 2, and 3.

METHOD
After the texture merging is completed, the texture coordinates of each vertex will also be changed, and the new texture coordinates corresponding to each vertex in the texture atlas need to be recalculated (Wang, 2021).The new texture coordinates can be calculated by the following formula:  In HSV color space, hue (hue) takes values in the range [0, 360) degrees.Since hue is a cyclic value, its periodicity is also considered.The hue calculation formula is as follows (Zohra H, 2015): In order to eliminate the unit differences between different features, the normalization process can transform these three different units of data into relatively consistent ranges, as exemplified by the normalization of vertex curvature: The International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences, Volume XLVIII-2-2024 ISPRS TC II Mid-term Symposium "The Role of Photogrammetry for a Sustainable World", 11-14 June 2024, Las Vegas, Nevada, USA 3. The texture corresponding to each group is remapped onto the mesh according to the vertex importance, and the higher the value of the vertex importance, the higher resolution texture map is mapped for that vertex, as shown in Figure 5.The International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences, Volume XLVIII-2-2024 ISPRS TC II Mid-term Symposium "The Role of Photogrammetry for a Sustainable World", 11-14 June 2024, Las Vegas, Nevada, USA and visualization effect, and compare the method of this paper with the traditional method of texture optimization, and verify the superiority of this paper's algorithm through analysis.
In terms of the amount of texture data, it can be seen from Table 1 that only merging or compressing textures can reduce the amount of texture data by more.And in this paper, all texture maps are firstly merged into one texture atlas based on the 2D boxing algorithm, and then a series of Mipmap texture maps are generated based on the texture atlas, although this process will increase the extra storage space, the overall amount of texture data is reduced due to the merging process of the original texture maps.

Table 1.Comparison of texture data volume
In terms of loading and rendering efficiency, it can be seen from Table 2 and Figure    In terms of visualization effect, the overall visualization effect of the three methods is almost the same, but in terms of specific details, as can be seen from Figure 9, the rendering effect of this paper's method is slightly worse than that of the merging-only method in the center position of Model1, but the effect of this paper's method is much better in terms of compression effect.In Model2, in the part of the building façade where the vertices are protruding, the rendering effect of this paper is the same as that of the ) maintains its fast map generation speed advantage based on seamless Mipmap filtering without The International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences, Volume XLVIII-2-2024 ISPRS TC II Mid-term Symposium "The Role of Photogrammetry for a Sustainable World", 11-14 June 2024, Las Vegas, Nevada, USA compromising the map generation speed advantage; Sungkil L (2009) nonlinear interpolation of mipmap images generated from pinhole images to achieve depth of field effect.In the process of texture mapping, texture offset and misalignment often exist on the model surface, Cheng Yan(2023) constrains the positions generated by the texture seams to mitigate the misalignment on both sides of the seams, and Yongkai Y(2019) introduces coded markers as control points to assist texture mapping in order to avoid the dependence on the texture features and geometric model.Mipmap texture is a texture image containing a series of texture images, each of which is a low-resolution representation of the previous one, with the height and width of each level of the image being half the size of the previous one.This paper draws on this idea and proposes a method for mapping different levels of Mipmap textures based on vertex importance, in order to address the problem of rendering pressure caused by the still large amount of data after merging.Firstly, the texture maps are merged into a texture atlas based on the 2D space boxing algorithm, and then vertex curvature, texture variability and vertex distance from the model centroid are computed, normalized, and weighted to obtain vertex importance.In computer vision, textures with different Mipmap levels are dynamically displayed according to the viewing angle distance to improve the rendering efficiency.In this paper, different levels of Mipmap textures are mapped based on vertex importance to improve the rendering speed.The remainder of this paper is organized as follows.In Section 2 , a texture map merging method based on the 2D space boxing algorithm is described in detail, and different levels of Mipmap textures are mapped by calculating the importance of vertices.The experimental results are presented in Section 3 are presented and discussed and analyzed.Finally, the experimental results are presented and discussed and analyzed in Section 4 in which the paper is briefly summarized.

Figure 1
Figure 1 shows the process of merging texture maps into texture atlases and generating Mipmap textures, as well as the process of remapping Mipmap textures onto a mesh based on vertex importance.The method in this paper can be roughly divided into the following four steps: 1.All texture maps are merged into a texture atlas according to the 2D space boxing algorithm; 2. Generate a series of Mipmap textures, discarding the less visually appealing Mipmap textures; 3. Vertex curvature, texture variability, and vertex distance are calculated, normalized, and weighted to obtain vertex importance; 4. Group all vertices and remap the texture maps of each group onto the original mesh based on vertex importance.

Figure 1 .
Figure 1.Flowchart of the method of this paper

Figure 2 .
Figure 2. Schematic diagram of texture mergingThe specific algorithm flow is as follows:1.Sort all texture maps according to height from largest to smallest and define the set of texture maps as R={W, H}; 4) Where u, v = the original texture coordinates a = width of the original texture/width of the merged texture c = height of the original texture/height of the merged texture b, d = horizontal coordinates, vertical coordinates of the lower left corner of the merged texture in the coordinate system of the original texture As shown in Figure 3, for all the texture mapsets after merging, a corresponding series of Mipmap textures are generated, and the Mipmap textures with poor visual effects are discarded, which on the one hand avoids the visual effects from being affected too much, and on the other hand also reduces the texture map loading batches and improves the rendering efficiency.

Figure
Figure 3. Mipmap texture map , G, and B = the RGB values of the pixels in the texture map.The color difference (cod) between the vertex and other vertices in a ring field is then calculated based on the hue: closer the vertices are to the center of the model, the easier it is to draw attention to them throughout the 3D building model.The coordinates (X,Y,Z) of the vertex at the center of the model can be defined as: distance (dis) from each vertex to the center. 2 avoid the disadvantages of subjective assignment, this paper uses the entropy weight method (Li Zhanshan, 2022) to calculate the weights of each indicator after normalization with the following steps: 1.There are three indicators in this paper, which form the original data matrix below: 2. Since the units of measurement of the indicators are not uniform, they need to be standardized before they can be used to calculate the composite indicators, thus solving the problem of homogenization of the values of the different qualitative indicators.In addition, positive and negative indicators have different meanings (the higher the value of a positive indicator, the better, and the lower the value of a negative indicator, the better), so different algorithms are needed to standardize the data for positive and negative indicators: Remap the merged texture atlas with the Mipmap texture onto the mesh based on vertex importance as follows: 1.Based on the mapping relationship between the texture coordinates corresponding to each texture atlas and the coordinates of each vertex, all the vertices are divided into large groups, with the number of groups = the number of texture atlases; 2. The vertices of each large group are sorted in descending order of vertex importance, and then divided equally into groups, with the number of groups = the number of Mipmap textures retained in each texture atlas + 1;

Figure 6 .
Figure 6.3D building models selected for this paper The experiments will analyze the results from four aspects: texture data volume, loading time, frame rate 7 and Figure 8 that although compression can reduce the amount of more texture data, the number of texture files remains unchanged, resulting in an insignificant improvement in the model loading time and rendering efficiency; whereas, the number of texture files after merging is sharply reduced to one, which obviously reduces the texture map loading batch, and can improve the rendering efficiency dramatically; whereas, this paper's method combines the Mipmap texture, although the number of files is relatively increased, but in the process of model rendering, the Depending on the vertex importance a texture map with a lower resolution can be selected and rendered more efficiently.

Figure 7 .
Figure 7. Loading time for different models

Table 2 .
Comparison of loading and rendering efficiency of different models