CN101694726B - Fusing and drawing method based on multi-source terrain data - Google Patents
Fusing and drawing method based on multi-source terrain data Download PDFInfo
- Publication number
- CN101694726B CN101694726B CN2009102361357A CN200910236135A CN101694726B CN 101694726 B CN101694726 B CN 101694726B CN 2009102361357 A CN2009102361357 A CN 2009102361357A CN 200910236135 A CN200910236135 A CN 200910236135A CN 101694726 B CN101694726 B CN 101694726B
- Authority
- CN
- China
- Prior art keywords
- layer
- clipmap
- data
- terrain data
- terrain
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title claims abstract description 47
- 238000009877 rendering Methods 0.000 claims abstract description 26
- 230000004927 fusion Effects 0.000 claims abstract description 17
- 230000007704 transition Effects 0.000 claims description 67
- 230000008569 process Effects 0.000 claims description 9
- 238000004817 gas chromatography Methods 0.000 claims description 8
- 238000010276 construction Methods 0.000 claims description 3
- 230000009466 transformation Effects 0.000 claims 1
- 230000008520 organization Effects 0.000 abstract description 8
- 238000005070 sampling Methods 0.000 description 17
- 238000010586 diagram Methods 0.000 description 5
- 230000015572 biosynthetic process Effects 0.000 description 2
- 230000006837 decompression Effects 0.000 description 2
- 238000010187 selection method Methods 0.000 description 2
- 238000004088 simulation Methods 0.000 description 2
- 230000000007 visual effect Effects 0.000 description 2
- 230000001133 acceleration Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000007906 compression Methods 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 230000001788 irregular Effects 0.000 description 1
- 238000012804 iterative process Methods 0.000 description 1
- 238000007781 pre-processing Methods 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 230000008439 repair process Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 238000012549 training Methods 0.000 description 1
- 238000012800 visualization Methods 0.000 description 1
Images
Landscapes
- Image Generation (AREA)
Abstract
一种基于多源地形数据的融合与绘制方法,步骤为:(1)进行多源地形数据进行高效组织(2)对绘制时刻的规则“F”形空洞进行高效填充:首先求得高精度地形数据与已有大规模地形数据的相交区域,随后根据clipmap层次结构,将此相交区域分解为若干条彼此相邻且长短不一的矩形条带,最后按照由精细到粗糙的顺序往与之对应的条带中插入相应的顶点并保证条带间顶点高度的平滑;(3)进行多源地形数据的绘制。本发明在保留Geometry Clipmap方法绘制大规模地形速度快的优点的基础上,对于所引入的高精度地形数据进行了高效组织,并特别解决了绘制时刻由于clipmap更新所导致数据实时融合时的规则“F”形空洞问题,同时避免了数据融合时不同种分辨率过渡时的跳变问题。
A fusion and rendering method based on multi-source terrain data, the steps are: (1) Efficient organization of multi-source terrain data (2) Efficient filling of regular "F"-shaped holes at the time of rendering: first obtain high-precision terrain The intersection area of the data and the existing large-scale terrain data, and then according to the clipmap hierarchy, decompose the intersection area into several adjacent rectangular strips of different lengths, and finally correspond to them in the order from fine to rough Insert the corresponding vertices in the strips and ensure the smoothness of the height of the vertices between the strips; (3) draw multi-source terrain data. On the basis of retaining the advantages of the Geometry Clipmap method for drawing large-scale terrain at a high speed, the invention efficiently organizes the imported high-precision terrain data, and especially solves the rules of real-time data fusion caused by clipmap update at the time of drawing. F”-shaped hole problem, while avoiding the jump problem when different resolutions are transitioned during data fusion.
Description
技术领域 technical field
本发明属于计算机虚拟现实和计算机图形学技术领域,特别是涉及计算机图形学加速绘制技术中的海量地形绘制方法。The invention belongs to the technical fields of computer virtual reality and computer graphics, and in particular relates to a massive terrain rendering method in computer graphics accelerated rendering technology.
背景技术 Background technique
大规模地形是虚拟环境中的重要可视化要素,它能够为用户提供逼真的视觉感受,并广泛应用在战场仿真、飞行仿真、紧急响应训练和三维游戏等方面。近些年来,地形数据获取手段的快速发展使得数据量急剧增加,为大规模地形的实时绘制带来了新的挑战。Large-scale terrain is an important visualization element in the virtual environment. It can provide users with realistic visual experience and is widely used in battlefield simulation, flight simulation, emergency response training and 3D games. In recent years, the rapid development of terrain data acquisition methods has led to a sharp increase in the amount of data, which has brought new challenges to the real-time rendering of large-scale terrain.
目前有两类大规模地形实时绘制方法。一类是使用基于外存(out-of-core)的大规模地形实时绘制方法。此类方法将大规模地形数据在外存进行有效组织,通过运行时刻的调度策略减少载入数据量从而完成实时绘制。通常在基于规则网格或基于不规则网格方法的基础上进行改进。为避免绘制时刻同一块区域不同细节模型(level of detail,LOD)在层次切换时产生的跳变,并给出了基于视点的连续LOD方法解决此问题。为解决频繁I/O操作导致绘制速度降低的问题,使用高效的外存组织并通过预取策略减少I/O操作的方法完成实时绘制。为解决绘制速度的稳定性,给出了基于视点的平滑调度方法。Pajarola给出了较好总结(“Survey on Semi-Regular Multiresolution Models forInteractive Terrain Rendering”,The Visual Computer,23(8):583-605,2007)。另一类是基于内存的大规模地形实时绘制方法。此类方法首先采用压缩过程降低数据量,使得压缩后数据部分或全部载入内存,其次通过运行时刻的解压操作合成真实数据并完成实时绘制。例如Geometry Clipmap(GC)方法对大规模地形进行高效绘制,该方法将DEM数据当作由高程组成的纹理,采用一组嵌套网格存储并绘制地形;在运行时刻将所需数据从内存中实时解压,减少了数据从外存读入内存的时间;同时使用“L”形更新策略,避免更新过程中额外的空间使用量,大大提高了更新与绘制的速度。目前GC方法已成为大规模地形绘制的研究热点,并被使用在越来越多的地形绘制系统中。There are currently two types of large-scale terrain real-time rendering methods. One is to use out-of-core real-time rendering of large-scale terrain. This type of method effectively organizes large-scale terrain data in external memory, and reduces the amount of loaded data through the scheduling strategy at runtime to complete real-time rendering. It is usually improved on the basis of regular grid-based or irregular grid-based methods. In order to avoid the jump caused by different level of detail (LOD) models in the same area at the time of drawing, a continuous LOD method based on viewpoint is given to solve this problem. In order to solve the problem that frequent I/O operations lead to the reduction of drawing speed, high-efficiency external memory organization and the method of reducing I/O operations through prefetching strategies are used to complete real-time drawing. In order to solve the stability of drawing speed, a smooth scheduling method based on viewpoint is given. Pajarola gave a good summary ("Survey on Semi-Regular Multiresolution Models for Interactive Terrain Rendering", The Visual Computer, 23(8):583-605, 2007). The other is a large-scale real-time rendering method based on memory. This type of method first uses the compression process to reduce the amount of data, so that part or all of the compressed data is loaded into the memory, and secondly synthesizes real data through the decompression operation at runtime and completes real-time rendering. For example, the Geometry Clipmap (GC) method efficiently draws large-scale terrain. This method treats DEM data as a texture composed of elevations, uses a set of nested grids to store and draw terrain; at runtime, the required data is retrieved from the memory. Real-time decompression reduces the time for data to be read from external storage to internal memory; at the same time, the "L"-shaped update strategy is used to avoid extra space usage during the update process and greatly improve the speed of update and drawing. At present, the GC method has become a research hotspot in large-scale terrain rendering, and is used in more and more terrain rendering systems.
随着应用的不断深入,人们希望已有地形数据能够提供更丰富的细节变化以达到特定目标,从而对改变的局部地形进行正确的评估与分析。所变化的细节通常集中在地形的某些区域,导致局部细节数据的采样精度与周围大规模地形数据的采样精度产生了差异,这为地形数据的组织与更新带来了新的问题。若按照基于外存的规则数据组织方法对细节区域进行规则采样并建立层次结构,当细节区域范围较大时会增加索引结构的深度从而增加存储空间与运行时刻的遍历开销。若按照GC方法对此高精度细节数据处理,由于在预处理时对地形进行了分辨率依次降低的规则采样,一旦局部数据的采样率发生改变,若仍按照已有地形的采样率对高精度细节数据进行处理,会产生信息丢失现象。为了不丢失细节,需要按照局部高精度细节数据的采样精度对大规模地形进行重采样,代价较高而且意义不大。因此如何将高精度细节数据与已有地形数据较好融合,并对其进行高效绘制是本文解决的主要问题。With the deepening of the application, people hope that the existing terrain data can provide more detailed changes to achieve specific goals, so as to correctly evaluate and analyze the changed local terrain. The changed details are usually concentrated in some areas of the terrain, resulting in a difference between the sampling accuracy of the local detail data and the sampling accuracy of the surrounding large-scale terrain data, which brings new problems for the organization and update of terrain data. If the detail area is regularly sampled and a hierarchical structure is established according to the regular data organization method based on external memory, when the detail area is large, the depth of the index structure will be increased, thereby increasing the storage space and the traversal overhead at runtime. If the high-precision detailed data is processed according to the GC method, since the terrain is sampled regularly in order to reduce the resolution during preprocessing, once the sampling rate of the local data changes, if the high-precision data is still processed according to the sampling rate of the existing terrain If the detailed data is processed, information loss will occur. In order not to lose details, it is necessary to resample large-scale terrain according to the sampling accuracy of local high-precision detail data, which is expensive and of little significance. Therefore, how to better integrate the high-precision detail data with the existing terrain data and draw them efficiently is the main problem to be solved in this paper.
发明内容 Contents of the invention
本发明要解决的技术问题:克服现有技术的不足,提供一种基于多源地形数据的融合与绘制方法,在保留GC方法绘制速度快、占用内存小优点的基础上,对已有大规模地形数据进行了高效的组织与绘制,同时较好的融合了代表细节的高精度地形数据,并有效解决了clipmap结构更新所引起的数据融合时的“F”形空洞,并用所给出的过渡带结构较好填充的空洞区域,同时避免了不同分辨率数据平滑过渡的问题,形成了一种有效的多源地形数据的融合与绘制方法。The technical problem to be solved by the present invention is to overcome the deficiencies of the prior art and provide a fusion and rendering method based on multi-source topographical data. On the basis of retaining the advantages of the GC method, such as fast rendering speed and small memory occupation, the existing large-scale The terrain data is efficiently organized and drawn, and at the same time, the high-precision terrain data representing the details is well integrated, and the "F"-shaped hole in the data fusion caused by the update of the clipmap structure is effectively solved, and the given transition is used The hole area with better filling structure avoids the problem of smooth transition of different resolution data, forming an effective fusion and rendering method of multi-source terrain data.
本发明采用的技术方案:一种基于多源地形数据的融合与绘制方法,其特点在于步骤如下:The technical solution adopted in the present invention: a method for fusion and rendering based on multi-source terrain data, which is characterized in that the steps are as follows:
(1)进行多源地形数据组织(1) Organize multi-source terrain data
首先对已有大规模地形数据进行clipmap结构的构造,随后对代表细节的高精度地形数据进行mipmap结构组织;First construct the clipmap structure for the existing large-scale terrain data, and then organize the mipmap structure for the high-precision terrain data representing details;
(2)对绘制时刻的规则“F”形空洞进行高效填充(2) Efficient filling of regular "F"-shaped holes at the drawing moment
首先求得多源地形数据与已有大规模地形数据的相交区域,随后将此相交区域分解为若干条彼此相邻且长短不一的矩形条带(过渡带),最后按照由精细到粗糙的顺序在与clipmap相交层对应的条带中插入相应的顶点并使用加权值的方法保证条带间顶点高度的平滑;Firstly, the intersecting area between the multi-source terrain data and the existing large-scale terrain data is obtained, and then the intersecting area is decomposed into several adjacent rectangular strips (transition strips) of different lengths. Sequentially insert the corresponding vertices in the strip corresponding to the clipmap intersecting layer and use the weighted value method to ensure the smoothness of the height of the vertices between the strips;
(3)进行多源地形数据的绘制(3) Drawing multi-source terrain data
使用GC方法对已有大规模地形进行绘制,使用mipmap结构对多源数据进行绘制,并对过渡带使用三角条带的绘制方法,并保证过渡带的加入使得空洞两侧区域过渡的平滑。Use the GC method to draw the existing large-scale terrain, use the mipmap structure to draw multi-source data, and use the triangle strip drawing method for the transition zone, and ensure that the addition of the transition zone makes the transition between the areas on both sides of the hole smooth.
所述步骤(1)中多源地形数据组织的步骤如下:The steps of multi-source terrain data organization in described step (1) are as follows:
(1)根据视点为中心,以公式L=2d的步长为单位构建地形的clipmap结构,其中用L表示视点每时刻更新的步长,d为clipmap的层次数;(1) According to the view point as the center, the clipmap structure of the terrain is constructed with the step size of the formula L=2 d as the unit, wherein L represents the step size updated at each moment of the view point, and d is the number of layers of the clipmap;
(2)对clipmap数据与真实数据间的差,使用LBT变化对其进行压缩。(2) For the difference between the clipmap data and the real data, use the LBT change to compress it.
所述步骤(2)中的多源细节数据与已有大规模地形数据的相交测试步骤如下:The intersecting test steps of the multi-source detail data in the step (2) and the existing large-scale terrain data are as follows:
(1)更新clipmap结构每层的包围盒;(1) Update the bounding box of each layer of the clipmap structure;
(2)将clipmap每层的包围盒与高精度地形的包围盒进行相交检测;(2) The bounding box of each layer of the clipmap is intersected with the bounding box of the high-precision terrain;
(3)记录高精度地形中的相交点,同时记录clipmap各层中的相交点。(3) Record the intersection points in the high-precision terrain, and record the intersection points in each layer of the clipmap at the same time.
所述步骤(2)中的矩形条带构建步骤如下:The rectangular strip construction step in described step (2) is as follows:
(1)求得clipmap相交层中的最大层(最粗糙)与高精度地形数据边界的交点,并记录相交边界的左上、右上顶点;(1) Obtain the intersection point of the largest layer (roughest) in the clipmap intersecting layer and the boundary of high-precision terrain data, and record the upper left and upper right vertices of the intersection boundary;
(2)获得clipmap相交层中最小层(最精细)的两个在一条直线上的相交点,向由左上、右上顶点组成的直线引垂线,求得交点,并根据此交点与高精度地形数据边界上的相交点一起组成clipmap最小层对应的过渡带矩形,并将此矩形中由高精度地形数据边界上交点组成的边记为此过渡带高分辨率边,将对应的另一条边记为此过渡带低分辨率边;(2) Obtain the two intersection points on a straight line of the smallest layer (finest) in the clipmap intersecting layer, draw a vertical line to the straight line composed of upper left and upper right vertices, obtain the intersection point, and use this intersection point with high-precision terrain The intersection points on the data boundary together form the transition zone rectangle corresponding to the smallest layer of the clipmap, and the edge formed by the intersection points on the high-precision terrain data boundary in this rectangle is recorded as this transition zone high-resolution edge, and the corresponding other edge is recorded as For this transition band low-resolution edges;
(3)将clipmap最小层低分辨率边作为输入,求得下一层clipmap层的过渡带矩形;(3) The minimum layer low-resolution edge of the clipmap is used as an input to obtain the transition zone rectangle of the next clipmap layer;
(4)重复(3)一直到构建完clipmap最大层的过渡带矩形。(4) Repeat (3) until the transition zone rectangle of the largest layer of the clipmap is constructed.
所述步骤(2)中clipmap各层过渡带中顶点填充的步骤如下:The steps of vertex filling in the transition zone of each layer of clipmap in the described step (2) are as follows:
(1)取得clipmap相交层中的最小层,将此层相交边上的顶点拷贝到此层过渡带的低分辨率边,同理将此层对应的多源地形数据相交边上的顶点拷贝到此层过渡带的高分辨率边;(1) Obtain the smallest layer in the clipmap intersecting layer, copy the vertices on the intersecting edge of this layer to the low-resolution edge of the transition zone of this layer, and copy the vertices on the intersecting edge of the multi-source terrain data corresponding to this layer to The high-resolution edge of the transition zone of this layer;
(2)取得下一层clipmap的相交层,将此层clipmap相交边上的顶点拷贝到此层过渡带的低分辨率边,再将低分辨率边上的相邻顶点与对应的高精度地形相交边上的进行线性插值后,将所有的点压入此层过渡带的高分辨率边,再将最小层中的低分辨率中的顶点也压入此层高分辨率边;(2) Obtain the intersecting layer of the next layer of clipmap, copy the vertices on the intersecting edge of this layer of clipmap to the low-resolution edge of the transition zone of this layer, and then compare the adjacent vertices on the low-resolution edge with the corresponding high-precision terrain After linear interpolation on the intersecting edge, press all points into the high-resolution edge of the transition zone of this layer, and then push the vertices in the low-resolution layer in the smallest layer into the high-resolution edge of this layer;
(3)迭代过程(2)直至clipmap相交层中的最大层。(3) The iterative process (2) until the maximum layer in the clipmap intersecting layer.
所述步骤(3)中多源地形数据的绘制的步骤如下:The steps of drawing of multi-source terrain data in the described step (3) are as follows:
(1)GC方法绘制已有大规模地形,并使用环形取址方法减少数据间的冗余拷贝;(1) The GC method draws the existing large-scale terrain, and uses the ring addressing method to reduce redundant copies between data;
(2)使用基于误差控制的mipmap结构对表示细节的高精度地形数据进行绘制;(2) Use the mipmap structure based on error control to draw high-precision terrain data representing details;
(3)对每条过渡带使用各自的三角化条带绘制。(3) Draw each transition zone using its own triangulated strip.
本发明与现有技术相比的有益效果在于:给出了一种多源地形数据融合与绘制的实时方法,且具有数据组织方式简洁、利于硬件加速等特点;并发现了多源数据融合时由clipmap结构更新所产生的“F”形空洞,给出了基于过渡带的空洞修补策略;与其他方法相比,过渡带结构具有运行过程中根据空洞区域的大小自动填充的特点,且所填充的顶点保证了空洞两侧数据过渡的平滑,从而达到了多源地形数据的实时融合与绘制。Compared with the prior art, the present invention has the beneficial effects that: it provides a real-time method for multi-source terrain data fusion and rendering, which has the characteristics of simple data organization and is conducive to hardware acceleration; and finds that when multi-source data fusion The "F"-shaped hole generated by the clipmap structure update gives a hole repair strategy based on the transition zone; compared with other methods, the transition zone structure has the characteristics of automatic filling according to the size of the hole area during operation, and the filled The vertices ensure the smooth transition of data on both sides of the hole, thus achieving real-time fusion and rendering of multi-source terrain data.
附图说明 Description of drawings
图1为本发明的整体过程示意图;Fig. 1 is the overall process schematic diagram of the present invention;
图2为本发明使用的过渡带结构的示意图;Fig. 2 is the schematic diagram of the transition zone structure that the present invention uses;
图3为本发明的过渡带中顶点填充的示意图;Fig. 3 is a schematic diagram of vertex filling in the transition zone of the present invention;
图4为本发明的过渡带顶点高度值的示意图;Fig. 4 is the schematic diagram of transition zone apex height value of the present invention;
图5为本发明的运行时刻LOD选择流程;Fig. 5 is the running time LOD selection process of the present invention;
图6a和图6b为本发明使用前后的效果对比示意图。Fig. 6a and Fig. 6b are schematic diagrams showing the effect comparison before and after the use of the present invention.
具体实施方式 Detailed ways
下面结合附图与实施例对本发明作进一步详细描述:Below in conjunction with accompanying drawing and embodiment the present invention is described in further detail:
本发明实施过程包括三个主要步骤:多源地形数据组织,构建过渡带及顶点填充,多源地形数据实时绘制。如图1所示。The implementation process of the invention includes three main steps: multi-source terrain data organization, construction of transition zone and vertex filling, and real-time rendering of multi-source terrain data. As shown in Figure 1.
步骤一多源地形数据组织:
本发明使用clipmap结构对已有大规模地形数据进行组织,为将高精度细节数据与大规模地形数据的clipmap结构在绘制时刻较好的融合,针对高精度细节数据为采样规则的特点,采用mipmap结构对高精度细节数据进行组织。The present invention uses the clipmap structure to organize the existing large-scale terrain data. In order to better integrate the high-precision detail data and the clipmap structure of the large-scale terrain data at the time of drawing, the mipmap is adopted for the characteristics that the high-precision detail data is a sampling rule. Structures organize high-precision detail data.
步骤二构建过渡带及顶点填充,可分为三个阶段,过渡带的构成阶段,过渡带中填充顶点平面坐标的确定,过渡带中填充顶点高度值的确定:The second step is to construct the transition zone and vertex filling, which can be divided into three stages, the formation stage of the transition zone, the determination of the plane coordinates of the filling vertices in the transition zone, and the determination of the height value of the filling vertices in the transition zone:
第一个阶段,过渡带构成阶段:The first stage, the transition zone formation stage:
本文将“F”形空洞区域划分为若干平行的矩形条带,每个条带由两条不同采样率顶点构成的边组成。将这样一个条带称为过渡带(图2)。“F”形空洞通常由多条过渡带组成,将填充“F”形空洞所需的过渡带的集合称为过渡带群。在过渡带群中若干条过渡带彼此相连,每一条过渡带高采样率顶点构成的边为邻接条带低采样率顶点构成的边,从而在过渡带群中完成了数据采样率依次降低或升高的过程,解决了“F”形空洞两侧不同采样精度数据过渡的问题。In this paper, the "F"-shaped cavity area is divided into several parallel rectangular strips, and each strip is composed of two edges composed of vertices with different sampling rates. Such a band is called the transition zone (Fig. 2). The "F"-shaped cavity is usually composed of multiple transition zones, and the set of transition zones required to fill the "F"-shaped cavity is called a transition zone group. In the transition zone group, several transition zones are connected to each other, and the edge formed by the vertices with high sampling rate in each transition zone is the edge formed by the vertices with low sampling rate in the adjacent zone, so that the data sampling rate is successively reduced or increased in the transition zone group. The high-level process solves the problem of data transition with different sampling precision on both sides of the "F"-shaped hole.
第二个阶段,过渡带中填充顶点平面坐标的确定:In the second stage, the determination of the plane coordinates of the filled vertices in the transition zone:
需要往每条过渡带的两条边中填充采样率不同的顶点。因此要将过渡带群中的过渡带按照采样率降低或升高的顺序依次排列。本文使用的顶点填充方向为从“F”形空洞两侧由较低采样率顶点构成的边向由较高采样率顶点组成的边进行。从图3中可以看出,由于高精度细节数据采样精度较高,因此顶点填充方向为从clipmap结构与空洞区域的相交边向mipmap结构中与空洞区域的相交边进行;Vertices with different sampling rates need to be filled into the two edges of each transition zone. Therefore, the transition zones in the transition zone group should be arranged in order of decreasing or increasing sampling rate. The vertex filling direction used in this paper is from the edge composed of vertices with lower sampling rate on both sides of the "F"-shaped hole to the edge composed of vertices with higher sampling rate. It can be seen from Figure 3 that due to the high sampling accuracy of high-precision detail data, the direction of vertex filling is from the intersection edge of the clipmap structure and the hole area to the intersection edge of the mipmap structure and the hole area;
为下文叙述方便,记大规模地形数据为O,用Oc表示clipmap结构中第c层模型,用s(Oc)表示此层模型中顶点的步长;记高精度细节数据为D,用Dd表示mipmap结构中第d层模型,用s(Dd)表示此层模型中顶点的步长;记过渡带数据为TS,用TSi表示第i条过渡带,用TS i 表示此过渡带由低分辨率顶点构成的边,用s(TS i )表示TS i 中顶点的最小步长;用TSi表示此过渡带由高分辨率顶点构成的边,用s(TSi)表示TSi中顶点的最小步长;For the convenience of the following description, record the large-scale terrain data as O, use O c to represent the c-th layer model in the clipmap structure, and use s(O c ) to represent the step size of the vertices in this layer model; record the high-precision detail data as D, use D d represents the dth layer model in the mipmap structure, use s(D d ) to represent the step size of the vertices in this layer model; record the transition zone data as TS, use TS i to represent the i-th transition zone, and use TS i to represent this transition Let s( TS i ) represent the minimum step size of the vertices in TS i ; let TS i represent the edges composed of high-resolution vertices in this transition zone, and use s(TS i ) to represent TS The minimum step size of vertices in i ;
图3中包含三条过渡带。进行填充时首先产生TS1,其中TS 1 的顶点由clipmap结构中Om+1与空洞区域相交边中的顶点组成。TS1的顶点由对TS 1 中顶点进行中点插值后的顶点和TS 1 的顶点两部分组成。完成TS1的顶点填充后生成TS2,从图3可以看出,TS 2 的顶点由TS1的顶点和clipmap结构中Om与空洞区域相交边中的顶点两部分组成。依此类推生成TS2和TS3。在插值过程中,过渡带i(1≤i≤M)所填充顶点的采样率需要满足如下条件:Figure 3 contains three transition zones. When filling, first generate TS 1 , where the vertices of TS 1 are composed of vertices in the edge where O m+1 intersects with the hole area in the clipmap structure. The vertex of TS 1 is composed of the vertex of the vertex in TS 1 and the vertex of TS 1 . TS 2 is generated after the vertex filling of TS 1 is completed. It can be seen from Figure 3 that the vertex of TS 2 is composed of the vertex of TS 1 and the vertex of the edge where O m intersects the hole area in the clipmap structure. And so on to generate TS 2 and TS 3 . During the interpolation process, the sampling rate of the vertices filled by the transition zone i (1≤i≤M) needs to meet the following conditions:
s(TSi)≥s(Ddmin) (1)s(TS i )≥s(D dmin ) (1)
考虑高精度细节数据与clipmap结构四个边都存在“F”裂缝的极限情况,需要填充的顶点总数量totalNumber满足如下关系:Considering the extreme case where there are "F" cracks on all four sides of the high-precision detail data and the clipmap structure, the total number of vertices to be filled, totalNumber, satisfies the following relationship:
totalNumber≤(3*2n+1-3n-6)*4*clipsize (2)totalNumber≤(3*2 n+1 -3n-6)*4*clipsize (2)
第三个阶段,过渡带中填充顶点高度值的确定The third stage, the determination of the height value of the filling vertex in the transition zone
为保证所填充顶点与过渡带两侧地形的顶点在高度域上保持平滑,使用了一种加权平均的方法计算新增顶点的高度值(图4)。设新增顶点为V,用h(V)表示顶点高度值,D为周围顶点对所插入顶点高度的影响综合因子,wi为某一顶点对所插入顶点高度值影响的权值,这里用平面距离代替,则有:In order to ensure that the filled vertices and the vertices of the terrain on both sides of the transition zone remain smooth in the height domain, a weighted average method is used to calculate the height value of the newly added vertices (Fig. 4). Let the newly added vertex be V, use h(V) to represent the height value of the vertex, D is the comprehensive factor of the influence of the surrounding vertices on the height of the inserted vertex, wi is the weight of the influence of a certain vertex on the height of the inserted vertex, here use the plane distance instead, then:
如图4所示为当前条带TS边上的新添加顶点,v3与v4为当前过渡带中TS边上的顶点,v1与v2为与之对应的高精度细节区域边上的顶点。n为插入顶点在细节区域相交的边与clipmap边界上对应的顶点数量之和。As shown in Figure 4, the newly added vertices on the TS edge of the current strip, v3 and v4 are the vertices on the TS edge in the current transition zone, and v1 and v2 are the vertices on the corresponding high-precision detail area edge. n is the sum of the number of vertices corresponding to the edge intersected by the inserted vertex in the detail area and the border of the clipmap.
步骤三:多源地形数据绘制,共分为四个阶段,已有大规模地形数据的绘制,高精度细节地形的更新方法,高精度细节地形的LOD选择方法,过渡带的绘制。Step 3: Multi-source terrain data drawing, which is divided into four stages, the drawing of existing large-scale terrain data, the updating method of high-precision detailed terrain, the LOD selection method of high-precision detailed terrain, and the drawing of transition zone.
第一个阶段:已有大规模地形数据的绘制The first stage: drawing of existing large-scale terrain data
采用将各层clipmap数据存储到VBO中,并进行绘制的方法;但在绘制时刻,将每层clipmap中与高精度地形数据的包围盒相重叠的区域删除掉,随后进行绘制。The method of storing the clipmap data of each layer in the VBO and drawing it is adopted; but at the time of drawing, the area overlapping with the bounding box of the high-precision terrain data in each layer of the clipmap is deleted, and then drawn.
第二个阶段:高精度地形的绘制The second stage: rendering of high-precision terrain
图5给出运行时刻高精度细节数据的更新流程,当视点中心区域未在高精度细节数据所表示区域内时,采用mipmap方法对此区域进行实时更新与绘制。但当视点接近高精度细节数据所表示区域时,导致mipmap各层更新后的数据量随距离的接近而增加,影响运行时刻的绘制速度。Figure 5 shows the update process of the high-precision detail data at runtime. When the center area of the viewpoint is not in the area represented by the high-precision detail data, the mipmap method is used to update and draw the area in real time. However, when the viewpoint is close to the area represented by the high-precision detail data, the amount of updated data of each layer of the mipmap increases with the distance, which affects the rendering speed at runtime.
为提高绘制速度,当视点中心区域完全位于高精度细节数据所表示区域内时,本文从高精度细节数据mipmap结构中提取出clipmap数据,使用GC方法的“L”形更新策略减少数据量以保证高精度细节数据的实时绘制。In order to improve the drawing speed, when the central area of the viewpoint is completely located in the area represented by the high-precision detail data, this paper extracts the clipmap data from the mipmap structure of the high-precision detail data, and uses the "L"-shaped update strategy of the GC method to reduce the amount of data to ensure Real-time rendering of high-precision detail data.
第三个阶段:高精度细节地形的LOD选择方法The third stage: LOD selection method for high-precision detailed terrain
为了降低计算量,本文通过计算mipmap结构各层在视域内边界线段投影的方法,将问题转化为计算线段的投影而不是精确计算面积投影。设pli为mipmap结构某层边界线段在屏幕上的投影,nti为该线段所包含三角形边的数量,q为视域内某层mipmap数据包含的边界个数用公式(4)得出位于视域内mipmap数据在屏幕上的投影P:In order to reduce the amount of calculation, this paper converts the problem into calculating the projection of the line segment instead of accurately calculating the area projection by calculating the projection of the boundary line segments of each layer of the mipmap structure in the field of view. Let pl i be the projection of a boundary line segment of a layer of mipmap structure on the screen, nt i is the number of triangle sides contained in this line segment, and q is the number of boundaries contained in a certain layer of mipmap data in the viewing area. Projection P of mipmap data on the screen in the domain:
第四个阶段:过渡带的绘制。The fourth stage: the drawing of the transition zone.
为减少过渡带中顶点三角化过程带来的时间开销,利用TS i 与TSi间顶点位置的特点,绘制时按照TS i 中顶点步长的大小将此条带分为若干彼此相连的区域(图6中由红色虚线段组成的区域)。并通过对每个区各自进行三角化的方法完成整个条带的三角化。In order to reduce the time overhead brought by the vertex triangulation process in the transition zone, the characteristics of the vertex positions between TS i and TS i are used to divide this strip into several connected regions according to the step size of the vertices in TS i when drawing ( The area formed by the red dotted line segment in Figure 6). And the triangulation of the whole strip is completed by triangulating each region separately.
为避免区域间边界点在三角化时引起的三角形丢失问题,采用将边界点分别存储在前、后两相邻区域的方式解决此问题。In order to avoid the triangle loss problem caused by the triangulation of boundary points between regions, the problem is solved by storing the boundary points in the front and back two adjacent regions respectively.
最终的绘制结果如图6所示,可以看出引入过渡带结构后可以有效的解决多源地形数据的融合与绘制。The final rendering result is shown in Figure 6. It can be seen that the introduction of the transition zone structure can effectively solve the fusion and rendering of multi-source terrain data.
Claims (6)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2009102361357A CN101694726B (en) | 2009-10-20 | 2009-10-20 | Fusing and drawing method based on multi-source terrain data |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2009102361357A CN101694726B (en) | 2009-10-20 | 2009-10-20 | Fusing and drawing method based on multi-source terrain data |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101694726A CN101694726A (en) | 2010-04-14 |
CN101694726B true CN101694726B (en) | 2012-01-11 |
Family
ID=42093695
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2009102361357A Expired - Fee Related CN101694726B (en) | 2009-10-20 | 2009-10-20 | Fusing and drawing method based on multi-source terrain data |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101694726B (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102890829B (en) * | 2011-10-24 | 2015-05-27 | 克拉玛依红有软件有限责任公司 | Method for rendering terrain based on graphic processing unit (GPU) |
CN103425801B (en) * | 2013-09-04 | 2016-08-17 | 中测新图(北京)遥感技术有限责任公司 | A kind of data fusion method towards digital earth and device |
CN109410736B (en) * | 2018-09-14 | 2019-08-30 | 广州海洋地质调查局 | A multi-source DEM data seamless fusion method and processing terminal |
CN109559376B (en) * | 2018-11-21 | 2020-11-24 | 北京理工大学 | A three-dimensional terrain generation method and device |
CN111260780B (en) * | 2020-01-13 | 2021-04-16 | 陕西心像信息科技有限公司 | Real-time terrain modification method based on elevation of altitude map |
CN111724477B (en) * | 2020-07-06 | 2024-08-02 | 中铁二局第一工程有限公司 | Method for constructing multi-level three-dimensional terrain model by multi-source data fusion |
CN111736751B (en) * | 2020-08-26 | 2021-03-26 | 深圳市千分一智能技术有限公司 | Stroke redrawing method, device and readable storage medium |
-
2009
- 2009-10-20 CN CN2009102361357A patent/CN101694726B/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
CN101694726A (en) | 2010-04-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101694726B (en) | Fusing and drawing method based on multi-source terrain data | |
CN107423518B (en) | Comprehensive pipe gallery full-line BIM collaborative design method combining Civil3D and Revit | |
CN108010103A (en) | The quick fine generation method of river with complicated landform | |
CN110111410A (en) | A kind of two three-dimensional pipe network data organizations and display methods based on spatial database | |
CN103699731A (en) | Method for constructing real scene model collaborative design platform of railway engineering | |
CN101281654A (en) | A large-scale complex 3D scene processing method based on octree | |
CN105956165B (en) | A kind of big file storage organization method of the tile type of three-dimensional modeling data | |
CN102203781A (en) | System and method for hybrid solid and surface modeling for computer-aided design environments | |
CN114169055B (en) | Method and system for enabling BIM model to be light | |
CN103077282A (en) | Rapid modeling method for high-speed railway scene based on basic-element combination and multilevel semantic constraint | |
CN101408990B (en) | Progressive compression and transmission method for urban architecture model | |
CN114238488B (en) | Multi-professional digital fruit integration and data interaction method and system | |
CN114359500B (en) | Three-dimensional modeling and visualization method for landslide hazard range prediction | |
KR20240050839A (en) | Construction Management: Development of 3D engine-based geometric optimization method for Building Information Model Visualization in Augmented Reality | |
CN101169871A (en) | HLOD preprocessing method for real-time rendering of large-scale static scenes | |
CN112150582B (en) | An Approximate Expression Method of Geological Profiles for Multimodal Data | |
CN105913475A (en) | Dynamic visualized method of space-time change process | |
CN110349262A (en) | A kind of tunnel geological forecast three-dimensional modeling method and system based on BIM | |
CN113722785B (en) | Linkage adjustment method for railway engineering construction organization image progress chart constrained by topological rules | |
CN114254238A (en) | Three-dimensional Web modeling platform based on digital twinning | |
CN103489217B (en) | Based on the modeling method of the buildings of column system | |
CN117973042A (en) | Method for calculating three-dimensional reconstruction, extension and milling amount of highway | |
CN118071949A (en) | Long-banded three-dimensional engineering geological model construction method based on self-adaptive virtual drilling | |
CN117496077A (en) | Visual analysis method and system for three-dimensional geological model | |
CN116933357A (en) | Geometric linear parameterized road modeling method based on point cloud data |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20120111 Termination date: 20141020 |
|
EXPY | Termination of patent right or utility model |